[Debian-on-mobile-maintainers] Bug#1117384: sxmo-utils: installs a global /usr/share/applications/mimeapps.list affecting nearly every desktop environment
Simon McVittie
smcv at debian.org
Sun Oct 5 16:59:24 BST 2025
Package: sxmo-utils
Severity: normal
X-Debbugs-Cc: debian-desktop at lists.debian.org
While checking which desktop environments in Debian have a
/usr/share/applications/${desktop}-mimeapps.list, I found that
sxmo-utils installs a global /usr/share/applications/mimeapps.list.
This seems undesired for users of other desktop environments: it will
change the default apps for *every* desktop environment or window
manager that does not have its own desktop-specific mimeapps.list (for
example Weston or LXQt), merely by being installed, even if SXMO is not
the desktop environment that is currently in use.
Using this generic filename also means that SXMO will have a file
conflict with any other package that tries to do the same thing: for
example, if the Debian Desktop team wanted to install a basic
/usr/share/applications/mimeapps.list in desktop-base to set Firefox ESR
as the default web browser, they would be unable to do so without
creating a file conflict. The generic filename is only intended to be
used globally for defaults for an entire distribution (like
desktop-base), and individual desktop environments should use their own
desktop-specific filenames instead.
The intended way for desktop environments to set a preference for the
apps that will be used is:
1. Set the XDG_CURRENT_DESKTOP environment variable to a desktop
environment ID or a colon-separated sequence of desktop environment IDs.
As I mentioned previously on #1050919, it wasn't clear to me whether
sxmo-utils uses XDG_CURRENT_DESKTOP=SXMO or XDG_CURRENT_DESKTOP=sway,
but if SMXO is indeed based on Sway, probably the best choice is
XDG_CURRENT_DESKTOP="SXMO:sway".
2. Case-fold the chosen desktop environment ID to lower-case: "sxmo".
3. Create a mimeapps.list prefixed with that lower-case ID and a dash:
"/usr/share/applications/sxmo-mimeapps.list".
For example GNOME, KDE Plasma and Cinnamon currently do this correctly
in unstable, using desktop environment IDs "GNOME", "KDE" and
"X-Cinnamon" respectively. Some other desktop environments "inherit"
from those: for example Phosh and Budgie set
XDG_CURRENT_DESKTOP="Phosh:GNOME" and
XDG_CURRENT_DESKTOP="Budgie:GNOME", so they will inherit GNOME's default
apps unless they define their own.
Please rename SXMO's /usr/share/applications/mimeapps.list to
/usr/share/applications/sxmo-mimeapps.list or similar, and set
XDG_CURRENT_DESKTOP during UI environment startup so that those
defaults will be selected.
Thanks,
smcv
More information about the Debian-on-mobile-maintainers
mailing list