I think adding the standard paths in case $XDG_DATA_DIRS was not set
before is mandatory. It's also how the other Xsession scriptlets work.

Consider a user who does not care about the paths (like me). Quoting
from the XDG Base Directory Specification [1]: "If $XDG_DATA_DIRS is
either not set or empty, a value equal to /usr/local/share/:/usr/share/
should be used." If any script needs to add to the paths, it must follow
this recommendation in order to not mess up previously working
applications. The first patch's approach effectively REPLACES the
default paths with only the snappy path. IMO removing or changing any
default paths should be a conscious choice reserved for the power user.

[1]: https://specifications.freedesktop.org/basedir-spec/basedir-spec-
latest.html#variables

Regarding my own case, I traced it back to a very rude and messy script
added by the "cadence" package from the unofficial KXStudio
repositories. It prepends a command to the $STARTUP Xsession variable,
which causes the check in 55gnome-session_gnomerc to fail. Afterwards,
60x11-common_xdg_path does a different check for GNOME and skips the
XDG_DATA_DIRS setting. A comment there claims that "gnome is already
added if gnome-session installed".

Maybe the check in 60x11-common_xdg_path should be changed to not
explicitly check for GNOME, and possibly 55gnome-session_gnomerc should
look at the $DESKTOP_SESSION instead of $STARTUP. Please share any
opinions on this, then I will open the respective bug reports.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1575014

Title:
  /etc/X11/Xsession.d/65snappy cause XRDP error

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1575014/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to