Creating a Desktop File in Linux

Recently, I downloaded TeamSpeak which is a voice application. I extracted the application to a folder and inside was which would allow me to run the application.

Over time it became redundant to continually open the terminal to navigate and run the script to use the application. Here are the steps I took to enable it to be run from the application launcher.

I wanted the application to be used regardless of which user I was logged in as. So I moved it from my Downloads folder into /usr/local/share/

sudo cp -R ~/Downloads/TeamSpeak3/ /usr/local/share/teamspeak/

I needed to ensure that any user could run the script now in /usr/local/share/teamspeak. I gave read, write and execute permissions to the entire teamspeak folder.

sudo chmod +rwx -R /usr/local/share/teamspeak/

With this done, any user would have access to teamspeak and be able to run it. Next up I needed the launcher to be aware of it. I downloaded an image to use as an icon and saved it to /usr/local/share/teamspeak/ts3icon.png

Here comes the part where we create a desktop file for your user.

touch $home/.local/share/applications/teamspeak.desktop

Use your favourite editor and place the following inside your teamspeak.desktop file.

[Desktop Entry]

That’s it you’re done. You’ve got a teamspeak application in the application launcher with a pretty icon to boot.