a terminal icon

Being able to instantly open a folder in a terminal on Ubuntu straight from the file manager has its advantages.

It saves time; you don’t need to navigate to a folder in the terminal using the cd command.

Plus (more importantly for a typo-prone input merchant like me) it ensures I end up in right place, i.e. running commands in the directory I intended and not one I mistyped!

Ubuntu has a handy “Open in Terminal” option present in the right-click context menu of Nautilus default. But that shortcut only works with GNOME Terminal. There’s no way to configure the package to launch a different terminal app — not out of the box, and not easily.

Which is presumably why “Nautilus Open Any Terminal” was created.

This succinctly-titled extension for the Nautilus file manager allows you to specify which terminal app is launched.

A full list of terminal emulators supported (at the time of writing; the app continues to be developed and maintained. If you’re reading from the future and a new one has been added do let me know via the tip form) can be gleaned below:

  • alacritty
  • cool-retro-term
  • deepin-terminal
  • gnome-terminal
  • kitty
  • konsole
  • mate-terminal
  • mlterm
  • qterminal
  • st
  • terminator
  • terminology
  • termite
  • tilix
  • urxvt
  • xfce4-terminal

This is a fairly expansive list that covers a wide array of terminal apps, from power-user tools like terminology to the super streamlined stars like st.

I won’t pretend that having right-click access to open a folder in one of these apps is a life changing experience. But it should prove to be a time saver or a convenience maker.

Check the extension out on Github to learn more. There you can find full install instructions covering a raft of Linux distros and setups, including Arch and Fedora.

If you’re on Ubuntu and you have PyPi set-up you can install this Nautilus extension on Ubuntu quite easily.

First install the dependencies:

sudo apt install python-nautilus

Then install the extension:

pip3 install --user nautilus-open-any-terminal

You need to quit Nautilus (nautilus -q) and relaunch it for the “open in terminal” option to appear when right-clicking on/in the file manager.

To configure the plugin’s behaviour using dconf you first need to run:

glib-compile-schemas ~/.local/share/glib-2.0/schemas/

Once done you can the use the dconf-editor or the commands that follow to choose which terminal emulator your new “open in terminal” menu item should launch.

This is as easy as entering the name. For example, to set Terminology as the terminal to launch you’d run:

gsettings set com.github.stunkymonkey.nautilus-open-any-terminal terminal terminology

If you want the shortcut to open the folder at the command line in a new terminal tab rather than the same window, run:

gsettings set com.github.stunkymonkey.nautilus-open-any-terminal new-tab true

Otherwise the plugin defaults to opening the location specified in a new window.

All in all a pretty neat tune-up. Let me know if you plan to make use of this functionality by leaving a comment in the comments section below.

Thanks Felix

How To nautilus