How to create a shortcut on the Raspberry Pi (Raspbian)

While on any Windows / Mac user it's an easy task, for the Raspbian / Linux it is not. Fortunately, you can create a shortcut for an app or a folder easily.

Shortcut for an App

To add a shortcut on the Raspbian desktop, create a file with the ".desktop" extension (start with a dot) and name it as you want: AppName.desktop.

Here is the content of a sample shortcut:
[Desktop Entry]
Version=1.1
Type=Application
Encoding=UTF-8
Name=MyApp
Comment=Open MyApp
Icon=/home/pi/documents/my_app_icon.png
Exec=/home/pi/documents/MyApp
Terminal=false
Categories=Accessories

That's it. Now move this file on the desktop and you are done. If you want to start the program with admin rights, add the "sudo" command in the Exec entry:

Exec=sudo /home/pi/documents/MyApp

Shortcut for an folder

In case you want to add a shortcut for a folder, open a terminal window and type the below command(s):

cd ~/Desktop
ln -s /path/to/directory LinkName

29 Reads | Added:December 7, 2020

Leave a Reply

Your email address will not be published.