Comment 12 for bug 2036098

Revision history for this message
Simon McVittie (smcv) wrote :

> Yes, and I believe it's been set that way for a while and I haven't seen issues from it.

I suspect this might only work because only the display manager is reading DesktopNames, and it doesn't use that information for anything except populating XDG_CURRENT_DESKTOP. So it reads what it thinks is a single desktop name "ubuntu:GNOME", and copies it into XDG_CURRENT_DESKTOP without any escaping or validation, so that when consumers of this information read it back, they see it as two desktop names.

Something like this Python code:

# in the display manager
desktops = keyfile["DesktopNames"].rstrip(";").split(";") # incorrectly ["ubuntu:GNOME"]
environ["XDG_CURRENT_DESKTOP"] = ":".join(desktops)

# in xdg-desktop-portal or any other consumer
desktops = environ["XDG_CURRENT_DESKTOP"].split(":") # correctly ["ubuntu", "GNOME"]

> We are including the dbus changes

Thank you, I should probably look at getting that into Debian 12 as well.