23

I have set the default terminal emulator to terminator using update-alternatives and I can open terminator now with ctrl-alt-t, but when I use the right click menu on the desktop or in a folder it will open gnome-terminal.

Is there another setting to change to fix this?

I've edited compiz to try the 3d cube effect and from then had to reset compiz to default settings to revert which reset my terminal default. To get ctrl-alt-t working after this I also had to do gsettings set org.gnome.desktop.default-applications.terminal exec 'terminator'. I found this suggestion in How can I set default terminal used in Unity?, but this did not make it so the right click option open terminator.

I am using Ubuntu 15.10

Zanna
  • 70,465
TomC
  • 233
  • 1
    The problem is that it's not supposed to be changed: the entry is "Open in Terminal" (mind the uppercase "T"). It's supposed to open Terminal, which is the Unity .desktop front-end to gnome-terminal, not a generic terminal. Nonetheless it would be indeed nice to have options. – kos Nov 01 '15 at 17:15

4 Answers4

16

The settings in gsettings set org.gnome.desktop.default-applications.terminal exec doesn't affect the behavior of the context menu entry. The used terminal is gnome-terminal and that's hard coded in libterminal-nautilus.so in the package gnome-terminal. And this library is used by Nautilus.

Perhaps this will be changed in future versions, but currently it is a fact.

A.B.
  • 90,397
  • 4
    This is why some people rather strongly dislike the GNOME project. "We know better than our users" indeed. – Kevin Nov 01 '15 at 21:56
  • 1
    The relevant bug is https://bugzilla.gnome.org/show_bug.cgi?id=627943. Mostly the developers answers are the one outlined by @Kevin... The only solution now is using a workaround like the one suggested here in http://askubuntu.com/a/692785/16395 – Rmano Nov 03 '15 at 21:39
  • 2
    I even proposed a patch... https://bug743626.bugzilla-attachments.gnome.org/attachment.cgi?id=295624 – Rmano Nov 03 '15 at 21:46
  • This issue is not fixed yet https://gitlab.gnome.org/GNOME/glib/-/issues/338 But they did a workaround which will be available in the next reelease https://gitlab.gnome.org/VannTen/glib/-/commit/17af5d0ae9bbad3634bb9a4b3a8a783788b65f4e – pktiuk Aug 03 '22 at 21:30
9

A solution that might work is to add a custom right-click option to the Ubuntu context menu entry instead of changing the pre-existing one.

For that purpose you can use the Nautilus-Actions Configuration Tool that you can get from the repository using sudo apt-get install nautilus-actions.

A quite well detailed tutorial can be found here.

Prolix
  • 345
  • 2
    I liked this answer but it did not say what to put into that nautilus action, I found it out though: terminator into Path and --working-directory=%d/%b into Parameters then as it says later in the tutorial: "click the Preferences button in the Nautilus-Actions Configuration Tool window and uncheck the “Create a root ‘Nautilus-Actions’ menu” option" – Cold_Class May 15 '18 at 22:18
6

Add this to your ~/.bashrc file

if ps -o cmd= -p $(ps -o ppid= -p $$) | grep -q gnome; then
  nohup terminator &> /dev/null &
  sleep 0.1s
  exit
fi
muru
  • 197,895
  • 55
  • 485
  • 740
4

If you don't want to use gnome-terminal on a regular basis, and you don't mind the possibility of having your hack disturbed by package upgrades, and other occasional problems, you could try removing /usr/bin/gnome-terminal (or renaming it) and replacing it with a symlink to terminator.

A slightly less intrusive approach, that would work if the context menu respects PATH, would be to leave /usr/bin/gnome-terminal alone, but add a symlink from /usr/local/bin/gnome-terminal to /usr/bin/terminator, so that anything running gnome-terminal without a fully-qualified path actually gets terminator.

hobbs
  • 1,128