right click on desktop; how to modify?

houghi houghi at houghi.org
Sat Aug 19 12:56:14 CEST 2017


On 2017-08-19 09:42, Todd Chester wrote:
> On 08/19/2017 12:14 AM, Zenaan Harkness wrote:
<snip>
> I have been going crazy with terminals and xterm for about 20 years 
> now.
> I firmly believe the purpose of a GUI is so I can have many, many
> more terminal open!  Why only have one (init 3) when you can have 10
> (init 5)!
> 
> That is why having the path open up in Desktop drive me nuts!
> If I had my way, the context menu would have a about 5 of them
> opening in various places -- none of which would be the desktop.

Look at 'alacarte' a menu editor. I personally seldom use the right 
click on the desktop.
Instead I have my terminals open on specific workspaces. I have by 
default 15 terminals open on 4 desktops on 2 screens, so not a default 
setting.
Why close prfograms if you can just switch to a different desktop, 
right?

I have a script that opens them if they are not yet open. That I have as 
an icon on my taskbar using Quicklauncher.
Part of the script is below. It only shows two terminals, but you could 
add as many as you desite. Explanation below it.


#!/bin/bash
# Run different terminals
# set -x
# Parameters
OPTION="--disable-server --hide-menubar --hide-borders -T 
Terminal.below"
LOCK="/tmp/test.lock."

# Screen: 0 Desk: 2 Config: large
exec 200>$LOCK.04
flock -n 200 && \
DISPLAY=:0.0 && \
wmctrl -s 2 && \
XDG_CONFIG_HOME=/home/houghi/.config/Terminal/large xfce4-terminal 
$OPTION --geometry=122x79-66-6  > /dev/null 2>&1 &
sleep 0.1

# Screen: 1 Desk: 3 Config: largeroot
exec 200>$LOCK.09
flock -n 200 && \
DISPLAY=:0.1 && \
wmctrl -s 3 && \
XDG_CONFIG_HOME=/home/houghi/.config/Terminal/largeroot xfce4-terminal 
$OPTION --geometry=150x35+9-6 -e 'sudo /usr/local/sbin/termr' > 
/dev/null 2>&1 &
sleep 0.1


exec 200>$LOCK.09
This is the locked file. See man flock for more.

flock -n 200 && \
The actual locking. If the program already runs, it skips the rest and 
goes on.

DISPLAY=:0.1 && \
Selects the monitor. If you only have one, no need to use it

wmctrl -s 3 && \
Go to the desktop 3.

XDG_CONFIG_HOME=/home/houghi/.config/Terminal/largeroot xfce4-terminal
Different colors/fonts/whatever for different groups of terminals. No 
guiessing if I am on my local machine, root or on a remote machine.
The first time they are default, but when you change them, you will keep 
those settings for that XDG_CONFIG_HOME.
I use green backgrounds for local, red for root, grey for remote. You 
can obviously do whatever

OPTION="--disable-server --hide-menubar --hide-borders -T 
Terminal.below"
See 'man xfce4-terminal' for what you want. --disable-server is best to 
use if you want to use XDG_CONFIG_HOME

--geometry=150x35+9-6
Need to play around a bit, so each one is where you like it to be,


-e 'sudo /usr/local/sbin/roottermstarter'
The script logs in as root, so I do not need to enter a password.
You can use any program there, including a cd or ssh or directly start 
to run tail log.
Obviously you can also add --working-directory or anythiong else.

sleep 0.1
Needed on my machine Only needed when I go from one deskt op to the 
next, so I have my
terminals grouped per desktop. So you could add extra lines from "exec" 
till "sleep"


Perhaps this won't help you at all. If so, sorry for wasting your time.

houghi


More information about the Xfce mailing list