How to make "open in terminal" in the right click menu use Terminator instead of gnome terminal? [duplicate]

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


Solution 1:

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.

Solution 2:

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.

Solution 3:

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