How to create desktop shortcut launcher on Ubuntu 20.04 Focal Fossa Linux

The objective of this tutorial is to show you how to create a desktop shortcut launcher on Ubuntu 20.04 Focal Fossa using the default GNOME user interface.

In this tutorial you will learn:

  • How to create desktop shortcut launcher from existing .desktop files
  • How to create desktop shortcut launcher from scratch

Desktop shortcut launcher on Ubuntu 20.04 Focal Fossa

Desktop shortcut launcher on Ubuntu 20.04 Focal Fossa

Software Requirements and Conventions Used

Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System Installed or upgraded Ubuntu 20.04 Focal Fossa
Software GNOME Shell 3.34.1 or higher
Other Privileged access to your Linux system as root or via the sudo command.
Conventions # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
$ – requires given linux commands to be executed as a regular non-privileged user

Create desktop shortcut launcher on Ubuntu 20.04 step by step instructions

Create desktop shortcut launcher from existing .desktop files

  1. Start by opting your terminal and executing the following command:

    $ nautilus /usr/share/applications/
    
    Open Nautilus

    Open Nautilus showing the /usr/share/applications/ directory. For all Snap installed applications use /var/lib/snapd/desktop/applications/ directory instead.


  2. Find an Application you wish to create a Launcher on your desktop. Perform right click and copy action

    Find an Application you wish to create a Launcher on your desktop. Perform right click and Copy action.
  3. Perform right click and paste on your desktop.

    Perform right click and Paste on your desktop.
  4. Right click on the new desktop file located on your desktop and select Allow Launching

    Right click on the new desktop file located on your desktop and select Allow Launching


  5. Your new Desktop application shortcut is ready

    Your new Desktop application shortcut is ready

    The Entire desktop shortcut launcher creation process is shown on the video below:

    How to create desktop shortcut launcher Ubuntu 20.04 Focal Fossa Linux

Create a desktop application shortcut launcher manually

In case the desktop shortcut for your application is not available with the /usr/share/applications/ directory you have and option to create the Desktop launcher manually. In this example we will create and Desktop application shortcut for Skype application.

  1. Obtain the following information for any given application you wish to create shortcut for. Below you can find an example:

    Path Application Icon: /snap/skype/101/meta/gui/skypeforlinux.png
    Application name: Skype
    Path to executable binary: /snap/bin/skype

    To obtain a full path to executable binary of any program use the which command eg.:

    $ which skype
    /snap/bin/skype
    

    In regards to the application icon, the choice is yours. You can either head over to /usr/share/icons/hicolor/ directory and search for any relevant icon to use, or simply download new icon from the web.



  2. Now that we have all the necessary information, create a new file Skype.desktop within ~/Desktop directory using your favourite text editor and paste the following lines as part of the file’s content. Change the code where necessary to fit your application specific details.
    $ gedit ~/Desktop/Skype.desktop
    
    #!/usr/bin/env xdg-open
    [Desktop Entry]
    Version=1.0
    Type=Application
    Terminal=false
    Exec=/snap/bin/skype
    Name=Skype
    Comment=Skype
    Icon=/snap/skype/101/meta/gui/skypeforlinux.png
    
  3. Allow launching

    Right click on the new desktop file located on your desktop and select Allow Launching
    Your new custom desktop shortcut is ready to use

    Your new custom desktop shortcut is ready to use.