xdg-utils detectDE() fails to handle XDG_CURRENT_DESKTOP properly
Submitted by Michael Catanzaro
Assigned to Rex Dieter
Description
$XDG_CURRENT_DESKTOP is a list, not a single value. It could be, for instance, Endless:GNOME or Unity:GNOME, something like that. In cases like these, detectDE() in xdg-utils-common.in fails to parse $XDG_CURRENT_DESKTOP properly, since it's only expecting one single value.
This is not really a serious issue now because detectDE() has a fallback to check $GNOME_DESKTOP_SESSION_ID, but that variable is always set to this-is-deprecated nowadays and could conceivably disappear in the future. That could break desktop detection in desktops that want to be treated as GNOME by xdg-utils. It'd probably be a good idea to use a glob to see if GNOME (or any other desktop) appears anywhere in the list in the case statement at the start of detectDE() to avoid this.
Version: 1.1.0