Setting nautilus-open-terminal to launch Terminator rather than gnome-terminal
The nautilus-open-terminal
package adds a menu/right-click option to open a terminal in the current directory.
I want to change this from opening gnome-terminal
to opening terminator
. There is some advice on changing the default terminal emulator here, however these instructions do not appear to be valid any more, and I can't find any place in the system settings where the default emulator can be changed.
I also tried:
$ sudo update-alternatives --config x-terminal-emulator
choosing
* 0 /usr/bin/terminator 50 auto mode
But this does not appear to have any effect. Any idea how I can get this to work?
Solution 1:
Install nautilus-actions (AKA filemanager-actions)
We may define our own right-click context menu items with nautilus-actions.
-
Run the Nautilus-Actions Configuration Tool either from the Dash, or from a terminal with
nautilus-actions-config-tool
-
In the Action tab give your action a sensible label, e.g. "Open in Terminator" and choose to display this in the selection or the context menu.
-
Next open the Command tab to enter the commands to run
-
Give in the full path to your command (
/usr/bin/terminator
) and program options (--working-directory=%d/%b
) for opening the current path in Terminator. -
After logging out and in again (or just restarting nautilus with
nautilus -q
) the right click context menu below will be displayed:
Solution 2:
Ubuntu 13.04: (in case you came here via google)
You can't change the terminal app used anymore.
Details:
nautilus-open-terminal
uses GAppInfo
to launch the terminal process, which uses a hard coded list of terminal emulators: https://gitlab.gnome.org/GNOME/glib/-/blob/main/gio/gdesktopappinfo.c#L2581
Solution:
-
Remove gnome-terminal:
sudo apt-get remove gnome-terminal
-
Symlink terminator to gnome-terminal:
sudo ln -s /usr/bin/terminator /usr/bin/gnome-terminal
Solution 3:
To configure the default terminal in gnome you need to install dconf-tools (sudo apt-get install dconf-tools).
After that you can use dconf-editor or gsettings to set your favorite terminal emulator. This guide uses gsettings
.
After installing terminator
type this command
gsettings set org.gnome.desktop.default-applications.terminal exec /usr/bin/terminator
Set the exec-args
for the terminal you need, in your case -x
to execute the rest of the necessary arguments of nautilus-open-terminal
.
gsettings set org.gnome.desktop.default-applications.terminal exec-arg "-x"
After this terminator will be your default terminal emulator, when nautilus-open-terminal
calls the default terminal it should open terminator
instead of gnome-terminal
.