- I am on my Desktop.
- I perform a right mouse click and select "Open in terminal".
- I envision this to open the terminal in
~/Desktopand not my home folder.
- Ubuntu 16.10
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
Make link. You will be presented with
Link to Desktopfile.
Open in Terminalit will open terminal with current working directory set as desktop.
A quick & easy one coincidentally, since I only needed to change a script I already had a bit :).
The script assumes you have at least one item on your desktop though.
terminal_here2(no extension), and make it executable
Now right-click on any file on your desktop, choose Scripts --> open_terminal2:
and a terminal window will open in the desktop's directory ("Bureaublad" in my case)
#!/usr/bin/env python3 import subprocess import os def replace(path): for c in [("%23", "#"), ("%5D", "]"), ("%5E", "^"), ("file://", ""), ("%20", " ")]: path = path.replace(c, c) return path # get the current path current = replace(os.getenv("NAUTILUS_SCRIPT_CURRENT_URI")) # raise the found terminal window os.chdir(os.path.realpath(current)) subprocess.Popen("gnome-terminal")