What is the most elegant way to create desktop shortcuts (e.g. to folders, applications, or documents) in Ubuntu 20.04?
I am on Ubuntu 16.04, I cannot play, pause, go to the next or the previous song in spotify. There are many answers but most are complicated, is there a simple solution that doesn't require a command line?
I have a Logitech bluetooth keyboard.
How can I create a shortcut for URL in my desktop? I want to use them in Firefox or Chrome.
If a copy and paste didn't work.
What script I have to use?
I want to create a shortcut for a command in terminal. Like for a command "ssh [email protected]", I just want a command "user" and the above command will run. Is this possible, and if so how can it be done?
Thank you!
From what I can gather, .desktop
files are shortcuts that allow application's settings to be customized. For instance, I have lots of them in my /usr/share/applications/
folder.
If I open that folder in nautilus
, I can run these applications just by double clicking its associated file, e.g. double-clicking firefox.desktop
runs Firefox. However, I can't find a way to do the same thing via terminal.
If I do gnome-open foo.desktop
it simply opens foo.desktop
as a text file. If I make it executable and then run it in bash it simply fails (which is expected, it's clearly not bash script).
EDIT: Doing exec /fullpath/foo.desktop
gives me a Permission denied
message, even if I change ownership to myself. If I make executable and do the same command, the terminal tab I'm using simply closes (I'm guessing it crashes). Finally, if I do sudo exec /fullpath/foo.desktop
, I get an error reporting sudo: exec: command not found
.
That's my question, how can I run a foo.desktop
file from the terminal?