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 to scripts
.
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).
F12 Terminal
Hitting F12 in nautilus now will immediately open a terminal in the current folder.
if [ -d "$1" ]; then; cd $1 && xterm; else; xterm; fi
– lcorag Dec 19 '23 at 08:44