Wed May 15, 2019 3:26 am
I develop libraries for parsing xdg-basedir and xdg-userdir information. I just recently moved my daily driver to KDE Neon, and while building and auditing my tools I noticed that there are some funny entries in the XDG_DATA_DIRS and XDG_CONFIG_DIRS. I don't appear to be having any issues because of this, but I just wanted to let the Neon team know in case it's some funny misconfiguration or something.
Basically, what I see are the following entries:
The reason these are formed is because of the file:
My theory is that on startup it expands whatever $DESKTOP_SESSION is set to, which looks to be "/usr/share/xsessions/plasma/".
Anyways, not a huge issue (I don't think), but definitely doesn't look like intended usage of the DESKTOP_SESSION variable - at least from how this script is written.
Wed May 15, 2019 4:29 am
$ strings /etc/X11/Xsession.d/* | grep DESKTOP_SESSION
shows: The '/xdg-' part seems hardcoded.
And the double '/', too.
Interesting. And funny.
Someone doesn't seem to be good at shell-scripting.
Let's give the "YOUNG ONES"™ time to learn…
Wed May 15, 2019 6:38 am
To be clear, I did read the file and get that it is hard-coded. I just can't tell if this is an issue with KDE neon using a path value for DESKTOP_SESSION, or if the issue is with Xsession script hardcoding the prefixes. From the looks of the script, it seems to me the expected input for DESKTOP_SESSION wasn't actually a path.
I'm leaning towards "DESKTOP_SESSION shouldn't be a path", in which case the Xsession script is fine, and DESKTOP_SESSION should be a shortname like "plasma" or something. Mostly based on surrounding evidence and ddg searches which show other people's variables saying simple things like "xfce" or "gnome".
EDIT: Does anyone know where DESKTOP_SESSION gets set? Also, should I file a bug report? Not sure exactly what to do here, but this does seem wrong. (Trying to figure out who to tell or if anyone even cares, which is more why I'm posting here than anything.)
Wed May 15, 2019 2:41 pm
I fully agree with Your analysis.
It seems to be copy-and-paste scripting.
The source-usage was probably intended to be
some GNOME configuration.
I asked myself, as You did, where the DESKTOP_SESSION did
get set (most probably incorrectly for this script).
Don't know as yet, myself.
I suspect, DESKTOP_SESSION is good KDE-data.
But the script itself seems not to belong there in its current
Or there's a conflict (double unrelated meanings) of
the DESKTOP_SESSION variable.
My inclination to look further into the details is small.
Maybe, someone else knows more.
I looked a bit into the XDG-specs, but found nothing.
Maybe I looked into the wrong places. Don't know.