I installed Terminator and made it my default terminal with this solution, but now Ctrl–Alt–T opens Terminator as a root terminal. How do I get it to open Terminator as a normal terminal?
Ubuntu – Ctrl-Alt-t opens root terminal instead of normal terminal
command linerootterminator
Best Answer
What happens ?
TL;DR #1: Basically, you spawn
x-terminal-emulator
and Unity searches for anything that hasx-terminal-emulator
in their shortcut file.x-terminal-emulator
. In Debian Alternatives system,x-terminal-emulator
is a symlink to a whatever terminal emulator app you would want to use./usr/share/applications
. It finds thegksu.desktop
file, which hasExec=gksu /usr/bin/x-terminal-emulator
line and then takes out the lineName=Root Terminal
. ThatRoot Terminal
is then displayed on the Unity's panelWhy the same thing doesn't happen with gnome-terminal?
TL;DR #2:
gnome-terminal
is actually spawned by a wrapper script, to which the default shortcut is linked.When you run
sudo update-alternatives --config x-terminal-emulator
you are presented with choices, but none of them is/usr/bin/gnome-terminal
. Rather you have/usr/bin/gnome-terminal.wrapper
which is a perl script that sets upgnome-terminal
first ! If you read through that script, at the end it has the following line :The
exec
call then spawns/usr/bin/gnome-terminal
, as separate app. Unity again searches/usr/share/applications/
directory and findsgnome-terminal.desktop
file which hasName=Terminal
line, and it shows it on the launcher.What can be done?
TL;DR #3: reassign keyboard shortcut,use custom wrapper, or create custom
.desktop
file. I recommend the.desktop
way.Easiest way is to reassign the shortcut. Use gsettings for that
But that still doesn't solve the quirk with Unity's dash. My preferred solution is to create the custom
.desktop
file/usr/share/applications/x-terminal-emulator.desktop
with the following contentsThat way , you don't have to change anything, but Unity will display
MY CUSTOM NAME
on the launcher.Third way, if you are feeling adventurous is to write a wrapper script, something like this:
Then you can add it as one of the options in the alternatives system using
Side note: priority is an integer, such as 10.
More info