70gconfd_path-on-session doesn't quote DESKTOP_SESSION and fails if it contains a space

Bug #1588395 reported by Boris Gjenero
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
gconf (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

In /etc/X11/Xsession.d/70gconfd_path-on-session these lines fail if there is a space in ${DESKTOP_SESSION}:

  export MANDATORY_PATH=${GCONF_PREFIX}/${DESKTOP_SESSION}.mandatory.path
  export DEFAULTS_PATH=${GCONF_PREFIX}/${DESKTOP_SESSION}.default.path

The error output to ~/.xsession-errors is:

/etc/X11/Xsession: 6: export: Session.mandatory.path: bad variable name

I'm not sure why the error is pointing to the wrong file. Adding quotes around the variables in those lines makes the error go away. This error totally prevents logging into X. It happens when using LXDM to start Xfce, because LXDM sets DESKTOP_SESSION to Name from /usr/share/xsessions/xfce.desktop :
Name=Xfce Session

These LXDM bugs relate to the problem, but I guess the lack of quoting here is the root cause. I'm not sure if setting DESKTOP_SESSION to the Name from the .desktop file and having a space in it is wise, but everything seems to work after fixing the quoting. Proper quoting is used elsewhere.

https://sourceforge.net/p/lxde/bugs/420/

https://bugs.launchpad.net/ubuntu/+source/lxdm/+bug/875991

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: gconf2-common 3.2.6-3ubuntu6
ProcVersionSignature: Ubuntu 4.4.0-22.40-generic 4.4.8
Uname: Linux 4.4.0-22-generic x86_64
NonfreeKernelModules: nvidia_uvm nvidia
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: amd64
CurrentDesktop: XFCE
Date: Thu Jun 2 10:16:46 2016
PackageArchitecture: all
ProcEnviron:
 LANGUAGE=en_CA:en
 TERM=xterm
 PATH=(custom, no user)
 LANG=en_CA.UTF-8
 SHELL=/bin/bash
SourcePackage: gconf
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Boris Gjenero (boris-gjenero) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in gconf (Ubuntu):
status: New → Confirmed
Revision history for this message
Kevin Dalley (nereocystis) wrote :

Add double quotes around the right hand side of the assignment definitely solved the problem for me.

Changed in gconf (Ubuntu):
importance: Undecided → Low
status: Confirmed → In Progress
Changed in gconf (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gconf - 3.2.6-5ubuntu2

---------------
gconf (3.2.6-5ubuntu2) eoan; urgency=medium

  * debian/70gconfd_path-on-session:
    - correctly escape the session specific default/mandatory paths
      (lp: #1588395)

 -- Sebastien Bacher <email address hidden> Tue, 02 Jul 2019 17:20:09 +0200

Changed in gconf (Ubuntu):
status: Fix Committed → 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.