Launch AppImage applications from desktop
Tags: linux, appimage, freedesktop, launcher
Published: 2022-10-21 06:31:48

---
title: Launch AppImage applications from desktop
published: true
description: How to configure AppImage applications to be launched from desktop.
tags: linux, AppImage, freedesktop, launcher
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xle4dn9cgivkjf8b6z73.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2022-10-21 05:22 +0000
---
Cover image by [Sergey Kuznetsov](https://unsplash.com/@cr0t).

There are at least three ways of distributing applications in Linux: AppImage, Flatpak, and Snap. Each one of these have different advantages and disadvantages but often it is not that important as a user since the format to use is a decision to be taken by the developer. Some applications already take care of this step for you, in case they don't keep reading, in this post I will show you a way to configure [AppImage](https://appimage.org/) applications to be available from your desktop.

First I want to say I am not an expert in the subject, it is just a problem I had been facing for some time now and today I decided to spend some time putting the pieces together and documenting my solution, if you happen to know a bit more about the topic I encourage you to leave a note in the comments and I'll be happy to update. First some questions you will probably need to answer at some point.

## Where to put the app file?

This is totally opinionated, my only important recommendation is to move them out of the `~/Downloads`, `~/Desktop` or `~/Documents` common folders. I like to use `/opt`, since I believe it is a nice way to keep things in a place I know I have to look for when moving my things from one computer to another.

## How to find mime types?

If you happen to need a mime type for the configuration, you can use this command that will be available in most Linux distros,

`xdg-mime query filetype README.md`

For a more detailed explanation read [How to Determine MIME Type of a File in Linux](https://www.linuxshelltips.com/find-file-mime-type-linux/).

## How desktop environments find apps?

Fortunately for us, the users, desktop environments like GNOME adopted a standard configuration file to describe how an application will be displayed in the start menu and later launched, you can read about it in the latest [Desktop Entry Specification](https://specifications.freedesktop.org/desktop-entry-spec/latest/).

### Where are those files located?

One common place to look for these files is `/usr/share/applications/`, it is good for learning and looking for examples of categories, but probably not a good idea to put your files there. Apparently the recommendation is to use `~/.local/share/applications/` where `~` stand for your home directory. This recommendation makes sense because it is usually better to have system configuration you made contained in your own directory.

Inside of these directories you will find a dozen of files using the desktop extension. Those are just text files that describe how to display and launch your applications.

### How does a .desktop file looks like?

As I mentioned above, there is a full specification, but for the sake of learning, I'll show here the file I created for [Beekeeper Studio](https://www.beekeeperstudio.io/):

```
[Desktop Entry]
Name=Beekeeper Studio
Comment=Modern and easy to use SQL client for MySQL, Postgres, SQLite, SQL Server, and more.
TryExec=/opt/Beekeeper-Studio-3.5.1.AppImage
Exec=/opt/Beekeeper-Studio-3.5.1.AppImage
Icon=beekeeper-studio
Terminal=false
StartupWMClass=Beekeeper
Type=Application
Categories=Development;
Keywords=sql;db;database;
X-GNOME-UsesNotifications=true
X-GNOME-SingleWindow=true
```

To be honest I don't know if all lines are valid, I used another file as a template and left most properties that seemed to make sense.

One important note is that the `Icon` refers to an icon I downloaded from the project's Github repository and placed in `~/.local/share/icons/beekeeper-studio.png`, I saw in StackOverflow that svg seemed to be valid, but didn't try that. About the `Category` I just copied it from another entry as well, but in [this answer](https://askubuntu.com/questions/674403/when-creating-a-desktop-file-what-are-valid-categories) you can read a bit more about it.

## Why not use an automated method?

There seem to be two ways of doing this automatically and are explained in AppImage's documentation for [desktop integration](https://docs.appimage.org/user-guide/run-appimages.html#integrating-appimages-into-the-desktop).

Probably those are better suited, but I was looking for something very straight-forward and the description there was not something like copy & paste solution, it implied more reading, and after seeing that Alacritty [included the desktop file](https://github.com/alacritty/alacritty/blob/master/extra/linux/Alacritty.desktop) I thought it was way easier to just type a few lines in a text file instead of reading documentation and installing another thing in my system.

---

While I was looking for how to do it, I came to some YouTube videos, while I am not much of a video guy I did use some of the description as confirmation of what I was doing, and I think it is probably worth watching them, so here are the links:

- [How to use AppImages and Integrate them into your system](https://www.youtube.com/watch?v=bXZma0t0PKE)

{% youtube bXZma0t0PKE %}

- [HUGE Speed Differences! Flatpak vs. Snap vs. AppImage](https://www.youtube.com/watch?v=OftD86RgAcc)

{% youtube OftD86RgAcc %}

If you found this information useful, please give it a like to let me know you care and continue writing. You can follow me here or in [Twitter](https://twitter.com/MigsarNavarro) to keep you informed when I write a new post.