Creating a desktop/menu/UI entries for running app on Ubuntu Desktop

 Introduction

Let’s get some context. We downloaded for example postman from official site. For Ubuntu it’s usually an *.tar.gz archive. Let’s unpack that:

tar -xvzf postman.tar.gz

and now we have a directory in which we can find a file for running Postman with double-click method, but we still don’t have a menu entry for easy running it without going throw explorer (probably nautilus on Ubuntu) to run it. Let’s create this type of entry, final effect will look like that:







Creating an entry

To create this type of entry we have to create a *.desktop file. In this case let’s do it for a specific user we are logged in terminal. We can create file with touch command:

touch ~/.local/share/applications/postman.desktop

now we can edit the content, for example with nano:

nano ~/.local/share/applications/postman.desktop

While creating Postman entry file we can use that content (of course we have to change the username and file locations accordingly to our case):

[Desktop Entry]
Encoding=UTF-8
Version=1.1
Name=Postman
Comment=Postman Native App
Exec=/home/username/Downloads/Postman/Postman — %u
Icon=/home/username/Downloads/Postman/app/icons/icon_128x128.png
Terminal=false
StartupWMClass=postman
Type=Application
Categories=Network;
MimeType=x-scheme-handler/tg;
X-Desktop-File-Install-Version=0.22


That’s it! If ur file has proper content and location u should see new entry immediately in ur app menu. No restart or additional commands needed. Enjoy!

Popular posts

Basic AKHQ running with docker (HTTP)

AKHQ login with Keycloak

Running keycloak in 4 minutes for development on Windows