serhii.net

In the middle of the desert you can say anything you want

17 Dec 2021

Making a script into an application

For an executable (..qutebrowser.sh) to be an ‘application’, it has to have a .desktop file in ~/.local/share .1

For qutebrowser, created this:

[Desktop Entry]
Name=Qutebrowser
Comment=Qutebrowser
Exec="~/.local/bin/qb %f"
Terminal=true
Type=Application
StartupNotify=true
MimeType=application/x-www-browser;
Keywords=python;
  • To test it, desktop-file-validate qutebrowser.desktop
  • To refresh the db, sudo update-desktop-database
  • sudo desktop-file-install qutebrowser.desktop then put it in /usr/share/applications 2

This describes all the things needed to set qb as default browser: New option for open link with browser · Issue #716 · RocketChat/Rocket.Chat.Electron

At the end, symlinked /usr/bin/qb to it’s location in my home folder, maybe the universe will come crashing on me but then I don’t have to mess with the usual creation of bash runner scripts in ~/.local/bin/.. to have it globally available. Including for things like update-alternatives that seem to want a global thing.


  1. [ Main docu for this is UnityLaunchersAndDesktopFiles - Community Help Wiki↩︎

  2. (learned it when it failed because of no sudo↩︎

Nel mezzo del deserto posso dire tutto quello che voglio.
comments powered by Disqus