Want to let “Open in Terminal” context (right-click) menu option work for another terminal emulator? Here’s an extension to do the similar job for Nautilus.
When right-clicking on either a folder or blank area in file manager, there’s an “Open in Terminal” menu option to launch system default terminal with that folder as working directory.
The option in Ubuntu so far is provided by the built-in
gnome-terminal package. Meaning no way to use the option for another terminal emulator. However, there’s an extension can add similar option to open terminal from in-side folder.
And not only for Gnome Terminal, the extension supports many other terminal emulators:
tilix(the package itself supports this stuff)
The extension adds the menu option “
Open XXX Here“, with XXX changes automatically according which terminal emulator is in use.
How to Install the Nautilus Extension
This tutorial is tested and works in Ubuntu 22.04, Ubuntu 23.04, and Ubuntu 20.04. It should also work in Fedora Workstation and other Linux with GNOME & Nautilus.
1. First, press Ctrl+Alt+T on keyboard to open terminal. Then run command to install git and python3-nautilus package:
sudo apt install git python3-nautilus
2. Then, clone the source code from Github project page, by running command:
git clone https://github.com/Stunkymonkey/nautilus-open-any-terminal.git
3. Finally, run the installer in the source code to install the extension:
cd nautilus-open-any-terminal && ./tools/update-extension-user.sh install
It installs the extension for current user only. If you would like to make it work for all users in system, run
sudo ./tools/update-extension-system.sh install instead.
Apply and Set your Terminal Emulator
After installed the extension, apply it by running command to quit Nautilus:
Then, open “Dconf Editor” (install it from Ubuntu Software) and navigate to ‘com/github/stunkymonkey/nautilus-open-any-terminal‘. Finally, set the value of ‘terminal’ to tell which terminal emulator to use.
You can of course choose another terminal emulator by running command (replace
kgx with yours):
gsettings set com.github.stunkymonkey.nautilus-open-any-terminal terminal "kgx"
Tip: You may also remove the built-in ‘Open in Terminal’ option by running command:
sudo apt remove nautilus-extension-gnome-terminal
There seems no uninstaller script at the moment of writing. User can however manually removed the installed files by running command:
If you installed the extension system wide for all users, use the commands below instead to remove all the files:
sudo rm /usr/share/nautilus-python/extensions/open_any_terminal_extension.py
sudo rm /usr/share/glib-2.0/schemas/com.github.stunkymonkey.nautilus-open-any-terminal.gschema.xml
sudo rm /usr/share/locale/.nautilus-open-any-terminal.mo
Also quit file manager via
nautilus -q command to apply change.