How to create a launcher for an application on Ubuntu

Victor Ferreira
1 min readSep 30, 2018

Let’s say you just downloaded a tar.gz file, extracted the contents to a folder and now you’re running the application using its executable.

The first thing you can do is to create an alias to this executable. Open .bashrc file by running in Terminal:

gedit ~/.bashrc

Add a line to this file like the following

alias mynewcmd=’<Path to the executable>’

Save and close the file. Reload it by running: source ~/.bashrc and now you can execute the application by running mynewcmd .

But you still can’t create shortcut icons, pin it to the Favorites bar, chance the shortcut. To create a Launcher to this application, navigate to /usr/share/applications, open any of these files with gedit, copy its contents. Create a new .desktop file in this same directory

sudo gedit mynewlauncher.desktop

mynewlauncher.desktop should contain something like this

[Desktop Entry]
Type=Application
Name=<App name>
GenericName=<Some description>
Icon=<An absolute path to the icon, it could be any PNG file, for example>
TryExec=<Absolute path to the executable>
Exec=<Absolute path to the executable>
Terminal=false
MimeType=<Some mimetype, I just copied and changed with my app name>;
Categories=<Keywords separated by ;>;
StartupWMClass=<Application shortname>

Save and add some permissions to the file.

sudo chmod a+x mynewlauncher.desktop

And that’s it, you just created a brand new launcher!

--

--