How to enable 'open terminal here' from nautilus when in 'list' (not tiled) mode
I would like to add an option to 'open terminal here' from the context menu that results from clicking on a file in the list mode of nautilus. This already exists when nautilus is in tiled mode and you right click on white space, but I find it annoying that I have to switch to this mode and then back every time I want to open a terminal (which is a lot).
I tried to illustrate my point with screenshots, but I can't figure out how to take a screenshot of a context menu. Let me know if this is not a clear question. Thanks.
Solution 1:
You are facing an issue in Files (nautilus) that comes with Ubuntu 18.04. Indeed, if the list view is full, there is no empty space where you can right-click to obtain the folder-specific righ-click menu. That is the menu that contains the "Open terminal here" option.
The issue is solved in more recent versions by making the breadcrumb path items, i.e., the buttons of the folders above the file list, more functional. You now can click (or right-click) the folder name in the breadcrumb to obtain the menu, making that context menu available with the mouse anytime.
Still, you can work around in the Nautilus version that comes with 18.04.
Keyboard shortcut in Nautilus
The shortcut key Ctrl+F10 opens the empty-space context menu anytime. Thus, just press Ctrl+F10 then e to open the terminal here.
Using a Nautilus script
If that is not enough and you also want mouse accessibility to the Open Terminal Here command, then there is still a way to implement the function using nautilus scripts.
- Create a script,
Terminal
, that contains following code
Script code:
#!/bin/sh
gnome-terminal
(yes, it cannot be more simple than that!).
-
Put the script in the folder
.local/share/nautilus/scripts
under your home folder. Enable "Show hidden files". Then you will see the hidden.local
folder and be able to navigate toscripts
. -
Make the script executable. (Right-click, Properties tab, Permissions: "Allow executing file as program")
-
Restart nautilus (
killall nautilus
). Now, you will have a new "scripts" menu when right-clicking any file, which contains your "Terminal" command
Optional: assign a hotkey to the script
(Update: unfortunately the following does not anymore work in Ubuntu 20.10).
-
If it does not exist, create a text file
~/.config/nautilus/scripts-accels
-
Add a line:
F12 Terminal
Hitting F12 in nautilus now will immediately open a terminal in the current folder.