XDG_DATA_DIRS XDG_CONFIG_DIRS MANDATORY_PATH DEFAULTS_PATH are not set correctly

Bug #1706126 reported by P
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
X.Org X server
Fix Released
Undecided
Unassigned
xorg (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

after login to my plasma session I noticed the following strange path in some XDG env variables missing the : separator

pascal@minipc:~$ env | grep XDG
XDG_VTNR=7
XDG_SESSION_ID=264
XDG_SESSION_TYPE=x11
XDG_DATA_DIRS=/home/pascal/kde/share:/usr/share//usr/share/xsessions/plasma:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop
XDG_SESSION_DESKTOP=KDE
XDG_SESSION_CLASS=user
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
XDG_CURRENT_DESKTOP=KDE
XDG_SEAT=seat0
XDG_RUNTIME_DIR=/run/user/1026
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session5
XDG_CONFIG_DIRS=/etc/xdg/xdg-/usr/share/xsessions/plasma:/etc/xdg:/usr/share/kubuntu-default-settings/kf5-settings

pascal@minipc:~$ env | grep PATH
LD_LIBRARY_PATH=/home/pascal/kde/lib:
MANDATORY_PATH=/usr/share/gconf//usr/share/xsessions/plasma.mandatory.path
DEFAULTS_PATH=/usr/share/gconf//usr/share/xsessions/plasma.default.path
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session5
PATH=/usr/lib/ccache:/home/pascal/kde/bin:/home/pascal/bin:/home/pascal/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

As you see the following 2 env variables are not setup correctly :

pascal@minipc:~$ env | grep PATH | grep '//'
MANDATORY_PATH=/usr/share/gconf//usr/share/xsessions/plasma.mandatory.path
DEFAULTS_PATH=/usr/share/gconf//usr/share/xsessions/plasma.default.path

The same for :

pascal@minipc:~$ env | grep XDG | grep '//'
XDG_DATA_DIRS=/home/pascal/kde/share:/usr/share//usr/share/xsessions/plasma:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop

You can also notice the 'xdg-/usr/xxx' in the following :

XDG_CONFIG_DIRS=/etc/xdg/xdg-/usr/share/xsessions/plasma:/etc/xdg:/usr/share/kubuntu-default-settings/kf5-settings

For XDG variables they seem to be set up here :

pascal@minipc:~$ dpkg -S /etc/X11/Xsession.d/60x11-common_xdg_path
x11-common: /etc/X11/Xsession.d/60x11-common_xdg_path

ProblemType: Bug
DistroRelease: Ubuntu 17.04
Package: x11-common 1:7.7+16ubuntu3
ProcVersionSignature: Ubuntu 4.10.0-28.32-lowlatency 4.10.17
Uname: Linux 4.10.0-28-lowlatency x86_64
ApportVersion: 2.20.4-0ubuntu4.5
Architecture: amd64
CurrentDesktop: KDE
Date: Mon Jul 24 18:51:03 2017
Dependencies: lsb-base 9.20160110ubuntu5
InstallationDate: Installed on 2016-05-14 (436 days ago)
InstallationMedia: Kubuntu 16.04 LTS "Xenial Xerus" - Release amd64 (20160420.1)
PackageArchitecture: all
SourcePackage: xorg
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
P (p92) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in xorg (Ubuntu):
status: New → Confirmed
Revision history for this message
Kenneth Hanson (khanson679) wrote :

I have the this problem on Xenial. Double slash in XDG_DATA_DIRS and a minus in XDG_CONFIG_DIRS.

Even worse, when I tried to append paths for Flatpak to XDG_DATA_DIRS using an .env file in my home directory, the result was so broken that Plasma failed to start. I've undone the change since then, but I remember a double colon in there, and my additions appearing in the middle of the string rather than the beginning or end as expected.

This seems rather serious to me.

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

fixed in bionic

Changed in xorg (Ubuntu):
status: Confirmed → Fix Released
Changed in xorg-server:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.