Let's add some fresh knowledge to the forum now Ubuntu 20.04 is out =). My question today is simple; what is the most elegant way to create desktop shortcuts (e.g. to folders, applications or documents) in Ubuntu 20.04?
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.
For Application Shortcuts:
I think TheBuntuNewb's answer is pretty good. Do that using file manager:
- Copy the application shortcut to desktop
- 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>
Open the folder in the file manager (nautilus), navigate to the directory to which you want to create a shortcut to.
Right click and select Open in Terminal.
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/
ln -s $PWD/dirname ~/Desktop/
A very easy and elegant way to create a shortcut to an file or folder is to create a symlink to the desktop. I have tested this on Lubuntu 20.04 LTS
To do this do the following:
create symlink here
- Finally a shortcut should have been created!
As I said before, this will probably only work on Lubuntu 20.04 (featuring the LXQt desktop)
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.desktopfile is copied: `cp /usr/share/applications/anydesk.desktop ~/Desktop/
google-chrome.desktopis symlinked using
ln -s /usr/share/applications/google-chrome.desktop /home/user/Desktop/
Documentslink is created by:
ln -st /home/user/Desktop /home/user/Documents
Downloads.desktopfile 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:
Easy graphical way:
- show your desktop in your home directory
1.1. enable symbolic links in nautilus: Settings → Behavior → [x] Show action to create symbolic links
open two windows of nautilus. one for the desktop, second for the shortcut you want to produce.
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.
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...
For folder shortcut, first you need to enable the simlink creation under Files --> Preferences in the Behavior tab (Show action to create symbolic links) in order that the Create link menu can appear when you right click on a folder. You can do the same with SHIFT+CTRL+M but this key combination works only if the simlink creation is enabled as described above (otherwise useless), and you will also need to turn on Capslock before using the keys to trigger capital 'M'...
For an average desktop user this is pain, and could be all enabled as default.
To keep working with GUI one have to enable symbolic link creation in Nautilus by visiting its settings: Settings → Behavior → [x] Show action to create symbolic links and then user will be able to create symbolic links for executables, folders and files on the
But the most elegant way for average non-techinal user who is scared by the terminal - would be to not use GNOME Shell and install Unity or MATE DE instead with one of the two solutions below:
sudo apt-get install ubuntu-unity-desktop
sudo apt-get install ubuntu-mate-desktop^
then select one of these sessions on the login screen and as the result to forget this new GNOME Shell nightmare (the Desktop without DESKTOP is a pain, but not the real desktop).
More technical users who prefer traditional desktop with traditional habbits have to remove GNOME Shell completely and install other DE of their preference. I have a solution for such method which was tested on Ubuntu 20.04 LTS freshly installed VM.