3

I've seen this question, and this one, and neither one is addressing my question. I have already used sudo update-alternatives to set Xterm as my default terminal. I much prefer Xterm as a terminal application, as it loads faster than gnome-terminal.

How can I get the right-click action "Open in Terminal", located in the Files application, to use Xterm? Changing the above defaults did not change this behavior, though I would have thought it should.

Thanks for your time!

Adrian Keister
  • 227
  • 2
  • 5
  • 17

2 Answers2

5

The "Open in terminal" right-click menu is provided by a nautilus extension, and hard coded to open gnome-terminal through dbus, so you cannot directly change that menu item.

There are a couple of approaches you could try:

  1. Ubuntu 20.04: Install nautilus-extensions-fma. That was formerly known as "Nautilus actions". It allows you to add custom actions to the right-click menu. Ubuntu 18.04: You have to add a PPA.

  2. Create a nautilus script. Nautilus scripts are scripts in the ~/.local/share/nautilus/scripts folder. They appear under a "Scripts" entry in the right-click menu. You can assign a shortcut key to such script that will work from within nautilus.

  3. If you are sufficiently skilled with python, you may write a nautilus python script or change an existing one. nautilus-open-any-terminal supports a lot of terminal emulators, but xterm is not one of them.

To remove the existing right-click menu for "Open in terminal", remove the package nautilus-extension-gnome-terminal.

vanadium
  • 88,010
  • How do you install the nautilus-extensions-fma? The instructions here were no good: http://ubuntuhandbook.org/index.php/2019/01/install-nautilus-actions-ubuntu-18-04/#:~:text=Nautilus%20actions%20is%20a%20file%20manager%20extension%20allows,it%E2%80%99s%20been%20deprecated%20and%20renamed%20to%20FileManager%20actions. – Adrian Keister Sep 11 '20 at 20:13
  • Just a "sudo apt install...", but that is in Ubuntu 20.04. I added a link to an AskUbuntu question with instructions for 18.04. – vanadium Sep 11 '20 at 20:39
  • All right, true confessions: I'm actually on Pop!_OS 20.04, not Ubuntu 20.04. Perhaps this is one of those annoying differences? – Adrian Keister Sep 11 '20 at 20:41
  • For #2: I can get xterm to open, but it's not pointed at the current folder. How would I do that in the script? – Adrian Keister Sep 11 '20 at 21:15
  • For me, xterm also opens in the current folder just by calling xterm, and also starts in the current folder when I launch it from gnome-terminal. Thus, check your xterm configuration first. Alternatively, there are variables you can use in a nautilus script if you would need command line options to change the working directory. – vanadium Sep 14 '20 at 08:02
0

How to OPEN TERMINAL HERE in Ubuntu 20.04

For the sake of informing other users that may search for my same question ( I have landed here googling for the question How to OPEN TERMINAL HERE in Ubuntu 20.04 )

It is built in in Nautilus

Just browse to the directory you want in Nautilus and right click on the background of the window

In the context menu you'll find the needed command

Robert
  • 177