0

I am often opening terminal app in opened directory (in Nautilus on Ubuntu 22.04) with the context menu and its option "Open in terminal", but in this case, the terminal app is opened and not konsole app, which is set as default.

See the output of the command: sudo update-alternatives --config x-terminal-emulator

result of command as picture

When I used keyboard shorcut Ctrl + Alt + T, Konsole opens as expected. So Only this context option is not working as I expected. Is there any way how to reconfigure it?

karel
  • 122,292
  • 133
  • 301
  • 332
Kuba
  • 1

5 Answers5

2

The solution provided by AreaEuro worked pretty fine, but as I wanted my gnome-terminal I did this also:

sudo apt install nautilus-extension-gnome-terminal

and of course I also ran:

nautilus -q

Now I have both in the contextual menu of Nautilus (also called Files in Ubuntu).

Contextual menu in Nautilus:

Screenshot of my contextual menu in Nautilus

karel
  • 122,292
  • 133
  • 301
  • 332
linxsys
  • 21
0

I found this answer, tried it myself and found out that the package name and installation has changed.(Ubuntu 20.04)

The package is now called filemanager-actions and there is a necessary nautilus extension called nautilus-extension-fma, so to install;

sudo apt install filemanager-actions nautilus-extension-fma

After installing these packages, open filemanager-actions from applications menu, follow the steps on the linked answer (in order to open Konsole, you'll need to replace "/usr/bin/terminator" with "/usr/bin/konsole"), restart nautilus via nautilus -q on a terminal, and you'll be able to open a konsole session from selected directory.

0

I found another solution, I hope this works on Ubuntu 22.04 too.

You'll need to create a script file in /home/$USER/.local/share/nautilus/scripts. The name of the file is not important, you can choose whatever you want. For simplicity, I'll go with "konsole".

  1. Create a file in ~/.local/share/nautilus/scripts/ called konsole.
  2. Edit the file with your choice of text editor and copy these lines
#!/bin/bash

directory="$(pwd | sed 's/[ ]/\ /g')" konsole --workdir "$directory"

(sed part makes possible opening a directory that has spaces in its name)

  1. Make the file executable
chmod +x ~/.local/share/nautilus/scripts/konsole
  1. In order to start the script, you'll need to right-click on any file/folder located in the desired directory, then you'll see an option "scripts" and in that submenu there will be your script.
0

This maybe slightly off topic, but may help someone get the "Open in Terminal" back....

To get the context menu "Open in Terminal" back after upgrading to 22.04 I had to do the following: sudo apt install nautilus-extension-gnome-console

nautilus -q

On opening the filemanager again, I now have right click option to "Open in Terminal"

AreaEuro
  • 1
  • 1
0

So I tried different things to get this working.

Finally This worked for me like a charm.

https://github.com/Stunkymonkey/nautilus-open-any-terminal

Just follow the instructions about how to install.

You may have to install gettext sudo apt install gettext

Command glib-compile-schemas /usr/share/glib-2.0/schemas did not work so I used the schema in available in the path nautilus_open_any_terminal/schemas.