Reply to topic

XDG Base Directories Issues (Minor)

User avatar kalopsio
Registered Member
Posts
2
Karma
0

XDG Base Directories Issues (Minor)

Wed May 15, 2019 3:26 am
Hey All,

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:
+ /usr/share//usr/share/xsessions/plasma/
+ /etc/xdg/xdg-/usr/share/xsessions/plasma/

The reason these are formed is because of the file:
/etc/X11/Xsession.d/60x11-common_xdg_path

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.

Thoughts?
NoNameNoBlame
Karma
0
$ 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…
User avatar kalopsio
Registered Member
Posts
2
Karma
0
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.)
NoNameNoBlame
Karma
0
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
non-KDE incarnation.

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.

 
Reply to topic

Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], duns, Exabot [Bot], Google [Bot], interele, lamka02sk, retnev, Rytelier, Snudl, Sogou [Bot]