💾 Archived View for perso.pw › blog › articles › qubes-os-custom-application.gmi captured on 2024-08-18 at 17:25:37. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2024-02-05)
-=-=-=-=-=-=-
If you use Qubes OS, you already know that installed software in templates are available in your XFCE menu for each VM, and can be customized from the Qubes Settings panel.
Qubes OS documentation about How to install software
However, if you want to locally install a software, either by compiling it, or using a tarball, you won't have a application entry in the Qubes Settings, and running this program from dom0 will require using an extra terminal in the VM. But we can actually add the icon/shortcut by creating a file at the right place.
In this example, I'll explain how I made a menu entry for the program DeltaChat, "installed" by downloading an archive containing the binary.
In the VM (with a non-volatile /home) create the file `/home/user/.local/share/applications/deltachat.desktop`, or in a TemplateVM (if you need to provide this to multiple VMs) in the path `/usr/share/applications/deltachat.desktop`:
[Desktop Entry] Encoding=UTF-8 Version=1.0 Type=Application Terminal=False Exec=/home/user/Downloads/deltachat-desktop-1.36.4/deltachat-desktop Name=DeltaChat
This will create a desktop entry for the program named DeltaChat, with the path to the executable and a few other information. You can add an `Icon=` attribute with a link toward an image file, I didn't have one for DeltaChat.
With the .desktop file created, open the Qubes settings and refresh the applications list, you should find an entry with the Name you used. Voilà!
Knowing how to create desktop entries is useful, not even on Qubes OS but for general Linux/BSD use. Being able to install custom programs with a launcher in Qubes dom0 is better than starting yet another terminal to run a GUI program from there.
If you want to read more about the .desktop files specifications, you can read the links below: