sublime_terminal
sublime_terminal copied to clipboard
Use default terminal instead of xterm
When running sublime_terminal on my system, a xterm window is opened, instead of the terminal emulator I normally use (terminator). Looking through the code, you seem to try and detect what terminal to use:
ps = 'ps -eo comm | grep -E "gnome-session|ksmserver|' + \
'xfce4-session|lxsession|mate-panel|cinnamon-sessio" | grep -v grep'
wm = [x.replace("\n", '') for x in os.popen(ps)]
if wm:
if wm[0] == 'gnome-session' or wm[0] == 'cinnamon-sessio':
default = 'gnome-terminal'
(...)
if not default:
default = 'xterm'
So, if nothing known is found, it uses xterm.
Now, I might be wrong about this, but can't you take out this entire part and replace it with x-terminal-emulator
? (Or at a minimum put it in place of xterm
). This should always point to your default terminal (set using update-alternatives --config x-terminal-emulator
), meaning you don't need to have this whole list of checks (which will always be incomplete).
You should be able to test this by simply running x-terminal-browser
in your terminal to see which terminal program it will open.