in the Ubuntu default file manager when right-clicking there is an option toOpen in Terminal.
How can I change the terminal-emulator for the "Open in Terminal" option? I have changed my terminal emulator with the following command:
sudo update-alternatives --config x-terminal-emulatorBut it did not change for the "Open in Terminal" option.
2 Answers
The option to open a terminal by right-clicking a file in nautilus is provided by a nautilus extension. That extension, unfortunately, is hard coded to work with gnome-terminal.
You can install an extension, nautilus-open-any-terminal, that allows to select a terminal of choice to be used for the "Open terminal here" option. As a very valuable added bonus, it also allows you to set a shortcut key to open a terminal in the current directory. Yes, you may feel that I use the extension myself, even if it is for gnome-terminal.
Removing the default extension
Remove the default extension with the command:
sudo apt remove nautilus-extension-gnome-terminalThis is the name as of Ubuntu 21.10. In older versions, the package was named nautilus-open-terminal.
Installing the python extension gnome-open-terminal
Install the dependency:
sudo apt install python-nautilusThen install the extension
pip3 install --user nautilus-open-any-terminalThen run the following command to allow configuring the extension using dconf:
glib-compile-schemas ~/.local/share/glib-2.0/schemas/Configuring
Set your preferred terminal using a command like the following (example for alacritty, see on the extension's website for the list of supported terminals):
gsettings set com.github.stunkymonkey.nautilus-open-any-terminal terminal alacrittyTo set the shortcut key for opening the terminal:
gsettings set com.github.stunkymonkey.nautilus-open-any-terminal keybindings '<Ctrl><Alt>t'If your terminal supports tabs, and you want the new terminal opened as a new tab instead of as a new window:
gsettings set com.github.stunkymonkey.nautilus-open-any-terminal new-tab true You should change your file browser configuration to point at new terminal emulator.
For Ubuntu default Nautilus you could see several options here.
1