Running Ubuntu 18.04.1 LTS. Full credit to this solution. I'm posting here to fully elaborate on the process which worked for me:
Navigate to the location where scripts are stored for nautilus:
cp ~/.local/share/nautilus/scripts/
Then create a new file for the script in your text editor of choice (you might like to call it "Open in Guake")
sudo nano "Open in Guake"
Add the following code to the file:
#!/bin/bash
base="`echo $NAUTILUS_SCRIPT_CURRENT_URI | cut -d'/' -f3- | sed 's/%20/ /g'`"
if [ -z "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" ]; then
dir="$base"
else
while [ ! -z "$1" -a ! -d "$base/$1" ]; do shift; done
dir="$base/$1"
fi
guake -n "$dir" -r "`echo ${dir%/} | rev | cut -d'/' -f1 | rev`" -t
Save the file, and change the permissions to make it executable
sudo chmod +x "Open in Guake"
Fingers crossed, you should now be able to click on a file or folder, and a scripts menu should now appear, with a sub-option to open the directory of that file/folder in Guake. I didn't need to reboot or restart Nautilus to get it going.
NOTE: You can't click in white space for this to work (I wasn't able to find a solution to this). The scripts menu is hard-coded to work only when right-clicking on files/folders.
Also, if Guake is not open, it probably won't pop up either. However, if you hit F12 or your defined mapping to open Guake, it should open to the tab with the folder.
nautilus ~/.local/share/nautilus/scripts/
, then I get:/home/teoman/.local/share/nautilus/scripts/Open Guake: line 2: cd: file:///home/teoman/.local/share/nautilus/scripts: No such file or directory
– teoman Jun 05 '18 at 14:06Nautilus-Share-Message: 19:53:59.566: Called "net usershare info" but it failed: Failed to execute child process “net” (No such file or directory)
at the end. – teoman Jun 05 '18 at 16:55net usershare info
is something else entirely. What did you do to get that error? Trying to share something from Nautilus? – Fabby Jun 05 '18 at 18:13