How to Create a Shortcut File Launcher in Ubuntu 18.04

(Editor’s Note: We are not responsible over any form of content available on other websites. Download their content or software at your own risk.)

Oftentimes you want to install some specific software on your Ubuntu machine but the software creator only provides a compressed file (e.g. .zip, .txz, .tar.gz, etc.) and not an installable file.

What some Ubuntu users do in this situation is copy the compressed file into a specific folder on their machine, uncompress it, go to the uncompressed folder, and click on the executable file to launch the software.

But it looks wrong and tedious going into that folder and clicking that executable file over and over again every time you want to launch that software, right?

Here are the steps to create a shortcut launcher for that executable file in an Ubuntu 18.04 computer:

1. Download the compressed software from the software creator’s website to your Ubuntu computer and uncompress it.

2. Copy the uncompressed folder of the software and save it into your Ubuntu machine’s Home directory. (If you don’t know where the Home directory is, go to your computer’s file launching bar and click the File launcher — the icon that looks like an opened folder. You can find the Home directory listed first on the left of the launched folder.)

3. Go back to the software creator’s website and look for a small logo of the software, or you may go to a search engine and search for that logo from there.

4. Click on the logo to save it. Give it the file name logo.png and save it into the software’s uncompressed folder that you had saved in your Home directory in Step 2.

5. Open a text editor and copy the following lines of text (This is a sample for a video editing software; you may edit it to suit your needs.):

#!/usr/bin/env xdg-open
[Desktop Entry]
Type=Application
Name=MyVideoEditor
GenericName=Video Editor
Comment=Video Editor
Exec=sh -c "/home/username/TheSoftwareFolder/TheExecutableFile "%F""
Icon=/home/username/YourSoftwareFolder/logo.png
Terminal=false

(The capital letters in TheSoftwareFolder and TheExecutableFile are only capitalized for easy reading. Please note that for some programs, you can simply write the software name after the equal sign next to Exec.)

6. Save the lines of text in Step 5 on the desktop of your Ubuntu machine as videoeditor.desktop.

7. Go to your desktop and click on videoeditor.desktop to launch the software.

How to Create a Shortcut Folder Launcher

If you want a shortcut launcher for a folder, open a text editor and copy the lines of text below (you may edit it to suit your needs):

#!/usr/bin/env xdg-open
[Desktop Entry]
Type=Application
Name=MyFolder
GenericName=MyFolder
Comment=MyFolder
Exec=xdg-open FullDirectoryPathForFolder
Icon=FullDirectoryPathForImage/program-icon.png
Terminal=false

Save it as a .desktop file on the desktop of your computer.

How to Put File or Folder Shortcuts on the Ubuntu Dock

If you want to be able to open a file or folder through a shortcut on the Ubuntu Dock, open a text editor and copy the lines of text below (you may edit it to suit your needs):

#!/usr/bin/env xdg-open
[Desktop Entry]
Type=Application
Name=MyFolder
GenericName=MyFolder
Comment=MyFolder
Exec=xdg-open FullDirectoryPathForFolder
Icon=FullDirectoryPathForImage/program-icon.png
Terminal=false

Save it as a .desktop file into this directory: /home/username/.local/share/applications.

After which, click on Show Applications (the square of dots on the Ubuntu Dock) and type in the name of the .desktop file to look it up. When its icon appears, right-click on it and choose Add to Favorites to put the shortcut on the Ubuntu Dock.