How to make a desktop shortcuts on Ubuntu 20.04?

Solution 1:

For Application Shortcuts:

I think TheBuntuNewb's answer is pretty good. Do that using file manager:

  1. Open /usr/share/applications
  2. Copy the application shortcut to desktop
  3. Right click on the shortcut on the desktop and select Allow Launching

For Folder/File shortcuts:

Either directly use the terminal to create a symbolic link

ln -s <complete path to dir> <shortcut save location>

or

  1. Open the folder in the file manager (nautilus), navigate to the directory to which you want to create a shortcut to.

  2. Right click and select Open in Terminal.

  3. For shortcut to current directory, type and execute

    ln -s $PWD ~/Desktop/
    

    For shortcut to a file/folder inside the current directory, type and execute

    ln -s $PWD/filename ~/Desktop/
    

    or

    ln -s $PWD/dirname ~/Desktop/
    

Solution 2:

You can copy a file from /usr/share/applications to your desktop folder (~/Desktop) using the cp command. Then right click the .desktop file and select 'allow launching'.

An example would be

cp /usr/share/applications/nautilus.desktop ~/Desktop

Make sure to include the .desktop ending.


You might also have to allow launching for an existing .desktop file after upgrading to Ubuntu 20.04.

Solution 3:

Easy graphical way:

  1. show your desktop in your home directory

1.1. enable symbolic links in nautilus: Settings → Behavior → [x] Show action to create symbolic links

  1. open two windows of nautilus. one for the desktop, second for the shortcut you want to produce.

  2. click the item the shortcut has to produced for with the left mouse button and drag it to the desktop folder in your home directory with the ALT-key pressed.

  3. when you leave the item on the desktop folder a context meune appears, that give you three options. One of them is "create symbolic link" or so.

Then you're done.

Its awful, that this simple feature has to be done the complex way...

Solution 4:

On default DE (Gnome 3) symlinking does not work, but .desktop files copying works as TheBuntuNewb said: enter image description here enter image description here enter image description here

For Lubuntu 20.04 desktop the next works:

Displaying items on the desktop could be done using .desktop file copying, .desktop file or folder symlinking or .desktop file creating.

user@ubuntu:~$ ls -ailh ~/Desktop/
total 32K
8126477 drwxrwxr-x  2 user user 4,0K тра  1 12:58 .
8126465 drwxr-xr-x 21 user user 4,0K тра  1 11:49 ..
8130587 -rwxr-xr-x  1 user user  239 кві 20 17:38 anydesk.desktop
8126512 -rw-rw-r--  1 user user   90 тра  1 12:48 computer.desktop
8130987 lrwxrwxrwx  1 user user   22 тра  1 12:58 Documents -> /home/user/Documents
8130976 -rw-rw-r--  1 user user   97 тра  1 12:51 Downloads.desktop
8129570 lrwxrwxrwx  1 user user   45 тра  1 12:30 google-chrome.desktop -> /usr/share/applications/google-chrome.desktop
8126514 -rw-rw-r--  1 user user   94 тра  1 12:48 network.desktop
8129813 -rw-rw-r--  1 user user  102 тра  1 12:58 trash-can.desktop
8126513 -rw-rw-r--  1 user user   89 тра  1 12:48 user-home.desktop
  • anydesk.desktop file is copied: `cp /usr/share/applications/anydesk.desktop ~/Desktop/
  • google-chrome.desktop is symlinked using ln -s /usr/share/applications/google-chrome.desktop /home/user/Desktop/
  • Documents link is created by: ln -st /home/user/Desktop /home/user/Documents
  • Downloads.desktop file which opens the Downloads directory by nautilus is created the next way:

    [Desktop Entry]
    Type=Application
    Exec=nautilus /home/user/Downloads
    Icon=folder
    Name=Downloads
    

In my case file properties changing is not required for .desktop file - it asks to execute it anyway:

enter image description here enter image description here

Solution 5:

In ubuntu 20.04 you need to make the file executable first, then you'll find the "allow launching" option, anyway I can't add it to the launcher, there's simply no way to do it.

[Desktop Entry]
Version=1.0
Name=blender
Type=Application
Exec=/home/ego/blender-2.93.0-9b87d3f02962-linux64/blender
TryExec=/home/ego/blender-2.93.0-9b87d3f02962-linux64/blender
Terminal=false
StartupNotify=true

It's ridiculous that there's no easy way to do this. You need to search google and become crazy simply to add one icon. One icon. Great OS.