10

I realize the default of the Nemo's right-click "Open in Terminal" is to launch "gnome-terminal", however, my installation is opening "xfce4-terminal" instead.

A while back when "gnome-terminal" was broken, I installed "xfce4-terminal" as an alternative. I configured the system-wide defaults to call "xfce4-terminal" for the terminal.

After the issue with Gnome-terminal was resolved, I moved the system-wide defaults back to Gnome-terminal. Nautilus starting using Gnome-terminal again, however Nemo continues to only launch "xfce4-terminal".

I uninstalled "xfce4-terminal" then the "Open in a Terminal" feature of Nemo stopped working.

In attempts to resolve this issue I have done the following:

  • ReInstalled Ubuntu 16.04
  • Purged and reinstalled Nemo

Nemo still will only launch "xfce4-terminal". It appears to be a problem with in my home folder's Nemo configuration or some other per user cache.

Creating a new user, and Nemo properly launches "Gnome-Terminal".

Can someone help me with where to check and fix Nemo's functionality in my '/home/username` settings.

Is there some type of editible configuration to check what happens when clicking on the "Open in Terminal" function?

21

Google brought me here, so I'm reviving this thread in hope of saving at least one person from a few unnecessary headaches.

I'm using Debian and the suggestion from L. D. James here didn't work for me. So I took a look at Nemo's source code, and on line 132 of nemo-global-preferences.c I found that the (upstream) config schema is the following:

org.cinnamon.desktop.default-applications.terminal

I'm using Nemo as a substitute for Nautilus, and since I'm using Gnome3 instead of Cinnamon, for me this schema didn't even exist. So, I created it with the following command. After issuing this command, the 'Open in Terminal' action opens gnome-shell, in the correct directory:

gsettings set org.cinnamon.desktop.default-applications.terminal exec gnome-shell 

Just replace gnome-shell in the command with whatever terminal you'd like to use. Ex: for gnome-terminal, use:

gsettings set org.cinnamon.desktop.default-applications.terminal exec gnome-terminal

And for terminator (sudo apt install terminator) use:

gsettings set org.cinnamon.desktop.default-applications.terminal exec terminator
| improve this answer | |
  • 1
    I don't understand how executing gnome-shell with bring up a preferring terminal emulator. I tested what would happen if the command gnome-shell was executed. It doesn't bring up a terminal. On the particular computer running the test it returned this error message: org.gnome.Shell already exists on bus and --replace not specified. It appears that you misunderstood the question. I run Ubuntu, 16.04 at the time... currently 18.04 functions properly with the same schema. By the way, default setting is x-terminal-emulator, which brings up gnome-terminal. – L. D. James Jan 21 '19 at 23:53
  • 2
    With above, replace gnome-shell with whatever terminal application you want to use and it should work. Works on Arch... – Dorian Jul 2 '19 at 22:15
16

Nemo uses the gsettings configuration. This restored the intended behavior:

$ gsettings set org.gnome.desktop.default-applications.terminal exec gnome-terminal

On Ubuntu it's different for some reason:

$ gsettings set org.cinnamon.desktop.default-applications.terminal exec gnome-terminal
| improve this answer | |
  • Actually, on Ubuntu, BOTH of those commands are required! The first one changes which terminal opens with Ctrl + Alt + T, and the 2nd command changes which terminal opens up with the right-click menu option in Nemo. – Gabriel Staples Jun 21 at 2:44
  • Note: I've detailed installing Nemo in Ubuntu here: askubuntu.com/a/1173861/327339. I really think it should be the default file manager in Ubuntu, NOT Nautilus. – Gabriel Staples Jun 21 at 2:45
5

On Xubuntu 18.10 this helps me (I use sakura as a terminal):

$ gsettings set org.cinnamon.desktop.default-applications.terminal exec sakura
| improve this answer | |
2

Find and Open "Preferred Application" in the main menu.

Menu to find Preferred Application

Choose "Terminator" in the "Preferred Application" dialog.

Preferred Application

This will set terminator as the default terminal app for the system.

  1. You can use "CTRL + ALT + T" to open terminal.
  2. RClick and open context menu in Nemo File Manager in any directory and open the terminal from there.

These will all open Terminator or the default terminal that you've set.

| improve this answer | |
2

First set the default X terminal:

sudo update-alternatives --config x-terminal-emulator

Then you can set the default terminal for cinnamon to this x-terminal-emulator (Nemo is the Cinnamon file manager, so it takes its settings from Cinnamon config):

gsettings set org.cinnamon.desktop.default-applications.terminal exec x-terminal-emulator

Now your desktop environment (eg Gnome) and Cinnamon applications will all use the same terminal, and if you use the first command to change the X terminal in the future, your Cinnamon applications should also use that new terminal.

| improve this answer | |
  • 1
    Unfortunately, in Ubuntu 18.04 at least, this doesn't work. The first command does but the 2nd one must be gsettings set org.cinnamon.desktop.default-applications.terminal exec terminator. – Gabriel Staples Jun 21 at 2:40
2

In case you want not to replace, but to add "Open in Terminator" in your right-click menu,

  1. go to /home/$USER/.local/share/nemo/actions folder,

  2. create open_in_terminator.nemo_action file:

     [Nemo Action]
    
     Name=Open in Terminator
     Comment=Open the 'terminator' terminal in the selected folder
     Exec=terminator --working-directory=%F
     Icon-Name=terminator
     Selection=any
     Extensions=dir;
    

enter image description here

References:

  1. Blog post: "Add Right-Click Commands in Linux Mint / Ubuntu", by Angelos Kyritsis
  2. Sample Nemo right-click menu action file from /usr/share/nemo/actions/sample.nemo_action
| improve this answer | |
  • I love this answer! But, here's some improvements: 1) change Comment to Comment=Open the 'terminator' terminal in the selected folder, 2) change Exec=terminator --working-directory=%P to Exec=terminator --working-directory=%F, and use Selection=any and Extensions=dir; so that right-clicking on a folder and going to "Open in Terminator" opens it in the selected folder, but right-clicking on files won't give you this option. – Gabriel Staples Jun 23 at 1:49
  • Thanks! I personally have a habit of clicking empty space inside the folder I want to open terminator in, so this solution suited my needs at the time. If you can tweak the solution so it works both for right-clicking on empty space and right-clicking on a folder, that would be great! Feel free to edit all you like :) – BanAnanas Jun 23 at 18:29
  • 1
    Done: I've edited your answer to match my own open_in_terminator.nemo_action file exactly. Now you can also right-click on a folder and choose to open the folder in terminator, as well as still right-click on the background in any folder to open up terminator there too. – Gabriel Staples Jun 23 at 19:01
  • 1
    Click the "edited 17 mins ago" link and you'll see my edit in the history already. It must have been approved before you could approve it. The "credit" is only in the edit history, and in these comments here. I'll do one more minor edit to improve that <user> line still, so it will work on anyone's machine automtically using the environment variable $USER. – Gabriel Staples Jun 23 at 19:14
  • 1
    FYI I've added this nemo action file to my GitHub repository here, in case anyone just wants to download it: github.com/ElectricRCAircraftGuy/eRCaGuy_dotfiles/blob/master/… – Gabriel Staples Jul 11 at 17:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.