Creating custom desktop launchers on the linux desktop

 · Systeemkabouter

Right now I'm switching out some flatpak installed apps in favor of manually downloaded and installed apps on my Debian12 desktop. Main reasons are inconsistent window decoration, some bug when switching external displays where some flatpak based windows are borked and performance.

This adds the 'burden' of having to manually manage software and versions somewhere on disk. I choose to install alle random custom stuff (may it be binaries or bigger packages) in /opt/ which clearly reveals my Sun Solaris past and run stuff from there.

Creating custom desktop entries so these manually untarred applications show up in the launchers/menus is well documented and easy enough. It is just checking which binary to run and what to use as an application icon.

Then there is moving your settings, because flatpak based apps store it somewhere else than traditional apps. So it is somewhat involved and I would not take the time if I wasn't trying to fix some minor annoyances over X-mas break.


I downloaded the betterbird archive from the betterbird website and unpacked it in /opt/betterbird

tar -xf betterbird*tar.bz2 -C /opt

Then created the desktop entry:

eelco@tux:~/.local/share/applications$ cat ~/.local/share/applications/betterbird.desktop 
[Desktop Entry]
GenericName=Mail client
Comment=Handle your email better

lastly, I figured out flatpak based profile was somewhere in


and used that as the import folder for my new copy of betterbird.

Intellij IDEA

Downloading and unzipping Intellij IDEA was easy enough, it unpacked in /opt/idea-IU-[version], I symlinked that to /opt/idea and created a desktop entry. At first I was unable to pin this new entry to the dock and it took some searching to get it right. There is an attribute StartWMClass that needed to be added for pinning to work. But what value should it get? It turns out you need to run the application, run a X utility to get the window name and use that as the value for this key. After that, pinning works fine!

  • start intellij
  • run xprop WM_CLASS and select the Intellij application window
  • set the returned value as StartWMClass value
  • profit!

So the desktop entry ended up looking like this:

eelco@tux:~$ cat ~/.local/share/applications/idea.desktop 
[Desktop Entry]
Name=Intellij IDEA
Exec=/opt/idea/bin/ %u

There was also the find of my flatpak based settings and importing them to my manually installed version of Intellij. In the new copy of Intellij I imported the settings from ~/.var/app/com.jetbrains.IntelliJ-IDEA-Ultimate/config/JetBrains/IntelliJIdea[version]]

If I ever need to do this again, I hope I will remember this blogpost :-)