5
1
How would one detect which terminal emulator (xterm
, gnome-terminal
...) is used in the current desktop environment ? Like xdg-open
, but for the terminal emulator.
I already tried the xdg-terminal
script on my Xubuntu installation, with no luck :
./xdg-terminal.sh: 305: [: x: unexpected operator
./xdg-terminal.sh: 399: [: xxterm: unexpected operator
xdg-terminal: configured terminal program 'xterm' not found or not executable
It would be for using in a C++ program, so any script, package or built-in command will do.
Thanks for the help !
1Are you running that script with the correct shell? Those seem like the sort of errors I'd expect if you were using a different shell from the one in which the script was written or something like that – Eric Renouf – 2016-12-07T16:07:35.917
Do you really need to be able to identify which terminal emulator is the default? Or just launch it? – egmont – 2016-12-07T16:24:17.207
I just need to launch it – natinusala – 2016-12-07T16:34:19.530
1On Debian/Ubuntu it's
x-terminal-emulator
. I don't know if it's generic across distros or not. – egmont – 2016-12-07T18:15:12.337It doesn't seem to be – natinusala – 2016-12-08T20:34:54.550
Did you find a solution? – andrew – 2017-07-23T15:48:35.350
I ended up using
xterm
– natinusala – 2017-07-23T19:46:02.980