Add ‘Open Terminal Here’ for other Terminal Apps in Ubuntu 24.04/22.04

Last updated: May 5, 2024 — 1 Comment

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:

  • alacritty
  • blackbox
  • cool-retro-term
  • deepin-terminal
  • foot/footclient
  • guake
  • hyper
  • kermit
  • kgx (GNOME Console)
  • kitty
  • konsole
  • mate-terminal
  • mlterm
  • qterminal
  • sakura
  • st properly patched
  • tabby
  • terminator
  • terminology
  • termite
  • tilix (the package itself supports this stuff)
  • urxvt
  • urxvtc
  • wezterm
  • xfce4-terminal

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 24.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 python3-nautilus python3-pip gir1.2-gtk-4.0

2. Then, install the extension as pip package, by running command:

pip install nautilus-open-any-terminal --break-system-packages

The --break-system-packages is required for Ubuntu 24.04 due to policy change. Skip it in 22.04

3. Finally, run command to generate the dconf configuration file.

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

Apply and Set your Terminal Emulator

After installed the extension, apply it by running command to quit Nautilus:

nautilus -q

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 terminal app):

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

 

Uninstall

To get rid of the context menu option, simply open terminal (Ctrl+Alt+T) and run command to uninstall the python package:

pip uninstall nautilus-open-any-terminal --break-system-packages

Skip --break-system-packages for Ubuntu 22.04, and run nautilus -q to apply changes.

Twitter

I'm a freelance blogger who started using Ubuntu in 2007 and wishes to share my experiences and some useful tips with Ubuntu beginners and lovers. Please comment to let me know if the tutorial is outdated! And, notify me if you find any typo/grammar/language mistakes. English is not my native language. Contact me via [email protected] Buy me a coffee: https://ko-fi.com/ubuntuhandbook1

One response to Add ‘Open Terminal Here’ for other Terminal Apps in Ubuntu 24.04/22.04

  1. Ow yeah

Leave a Reply

Text formatting is available via select HTML.

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> 

*