6

I've just installed Ubuntu GNOME 16.04 and while trying to add terminix as the default terminal emulator I messed up really bad the x-terminal-emulator alternative, totally my fault!

I entered the update-alternatives --install command wrong and now I don't have that alternative anymore, this is what I got now:

$ sudo update-alternatives --config x-terminal-emulator
There is only one alternative in link group x-terminal-emulator (providing /usr/bin/x-terminal-emulator): /usr/bin/gnome-terminal.wrapper
Nothing to configure.
update-alternatives: warning: forcing reinstallation of alternative /usr/bin/gnome-terminal.wrapper because link group x-terminal-emulator is broken
update-alternatives: warning: not replacing /usr/bin/x-terminal-emulator with a link

Fortunately, the only problem is that I can't use the Ctrl+Alt+T shortcut to open the terminal (or any terminal emulator for that matter). Invoking them with Super and searching using the name of the application works without any problem. Like I said, it's not a big problem but it bothers me having it.

I've tried reinstalling the emulators but without any luck. If you know any possible solution to my dilemma I'll really appreciated!

  • The shortcut thing can be set via gsettings set org.gnome.desktop.default-applications.terminal exec 'x-terminal-emulator' (replace the x-terminal-emulator with whatever you want). As for the alternatives, I'd suggest you try --install part again. Alternatives system is nothing more than symlinks, so you could also do that manually , link /etc/alternatives/x-terminal-emulator to whatever terminal you want – Sergiy Kolodyazhnyy Jun 24 '16 at 06:02

3 Answers3

2

I ran into the same problem. What fixed it for me was to simply re-install gnome-terminal i.e. typing the following command:

sudo apt-get install --reinstall gnome-terminal

This seems to automatically reset the alternatives.

1

I had the same problem and I fixed it by reading the update-alternatives man page.

According to that, update-alternatives has the following option:

--config <name>
    show alternatives for the <name> group and ask the user to select which one to use". 

So run sudo update-alternatives --config x-terminal-emulator. In my case it gave me the following output:

  Selection    Path                             Priority   Status
------------------------------------------------------------
  0            /usr/bin/gnome-terminal.wrapper   40        auto mode
  1            /usr/bin/gnome-terminal.wrapper   40        manual mode
* 2            /usr/bin/guake                    1         manual mode

Press <enter> to keep the current choice[*], or type selection number:

I specified 0 and hit Enter and got:

update-alternatives: using /usr/bin/gnome-terminal.wrapper to provide /usr/bin/x-terminal-emulator (x-terminal-emulator) in auto mode

Now the Ctrl+Alt+T shortcut again opens the default terminal.

If you want to know more about the auto mode vs manual mode options shown in the output above, check heemayl's answer in Difference between auto mode and manual mode in update-alternatives.

Paloha
  • 1,037
0

I think, reconfiguring may help easily here:

$ sudo  dpkg-reconfigure your_terminal_program
wk.
  • 600