lightdm/gdm needs to set $XDG_CURRENT_DESKTOP

Bug #1212408 reported by Marc Deslauriers on 2013-08-14
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Light Display Manager
Medium
Unassigned
gdm (Ubuntu)
Undecided
Unassigned
gnome-session (Ubuntu)
Medium
Robert Ancell
lightdm (Ubuntu)
Medium
Robert Ancell

Bug Description

Since the switch to upstart, some processes in the user environment, such as gnome-screensaver, now get launched without $XDG_CURRENT_DESKTOP being set. This is currently causing screen locking issues.

This used to get set by gnome-session, but it is no longer high enough in the process tree to set it for the complete user session.

Consensus in #ubuntu-desktop was that lightdm should be setting it.

Related branches

Changed in lightdm (Ubuntu):
assignee: nobody → Robert Ancell (robert-ancell)
tags: added: rls-s-incoming
Robert Ancell (robert-ancell) wrote :

Makes sense. As previously raised by mterry it can't be done without putting the name in the xsession file [1] but his proposal makes sense.

[1] http://lists.freedesktop.org/archives/xdg/2011-July/012004.html

Changed in lightdm (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Robert Ancell (robert-ancell) wrote :

BTW, we already set $SESSION, $GDMSESSION (set to the name of the xsession file) so why not just add some more code bloat to the display manager? ;)

Robert Ancell (robert-ancell) wrote :
Changed in lightdm (Ubuntu):
status: Triaged → In Progress
Changed in lightdm (Ubuntu):
status: In Progress → Fix Committed
Changed in lightdm:
status: New → Fix Committed
importance: Undecided → Medium
Changed in gnome-session (Ubuntu):
status: New → Fix Committed
importance: Undecided → Medium
Changed in gnome-session (Ubuntu):
assignee: nobody → Robert Ancell (robert-ancell)
status: Fix Committed → In Progress
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-session - 3.8.2.1-1ubuntu5

---------------
gnome-session (3.8.2.1-1ubuntu5) saucy; urgency=low

  * debian/patches/50_ubuntu_sessions.patch:
    - Set X-LightDM-DesktopName to Unity for Ubuntu session (LP: #1212408)
 -- Robert Ancell <email address hidden> Fri, 23 Aug 2013 15:08:00 +1200

Changed in gnome-session (Ubuntu):
status: In Progress → Fix Released
Changed in lightdm:
milestone: none → 1.7.10
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lightdm - 1.7.11-0ubuntu1

---------------
lightdm (1.7.11-0ubuntu1) saucy; urgency=low

  * New upstream release:
    [ 1.7.11 ]
    - Fix crash when greeter quits due to read watch not being removed
    - Correctly setup Unity System Compositor environment
    - Improve log messages
    [ 1.7.10 ]
    - Fix session locking broken in 1.7.5
    - Load lightdm.conf after lightdm.conf.d/*.conf
    - Also support loading config from /usr/share
    - When switching sessions show a greeter if authentication required
    - Set $XDG_CURRENT_DESKTOP if specified in the xsession file (LP: #1212408)
    - Change logging prefixes to make it easier to troubleshoot multiseat setups
    - Bring Ubuntu packaging in-tree
 -- Robert Ancell <email address hidden> Mon, 26 Aug 2013 14:48:55 +1200

Changed in lightdm (Ubuntu):
status: Fix Committed → Fix Released
Robert Ancell (robert-ancell) wrote :

To enable this in LightDM, set X-LightDM-DesktopName in /usr/share/xsessions/*.desktop. i.e. for Unity:

/usr/share/xsessions/ubuntu.desktop:
[Desktop Entry]
Name=Ubuntu
Comment=This session logs you into Ubuntu
Exec=gnome-session --session=ubuntu
TryExec=unity
Icon=
Type=Application
X-LightDM-DesktopName=Unity
X-Ubuntu-Gettext-Domain=gnome-session-3.0

The registered desktop names are in http://standards.freedesktop.org/menu-spec/latest/apb.html

Tim Lunn (darkxst) on 2013-08-31
summary: - lightdm needs to set $XDG_CURRENT_DESKTOP
+ lightdm/gdm needs to set $XDG_CURRENT_DESKTOP
Tim Lunn (darkxst) on 2013-09-01
Changed in gdm (Ubuntu):
status: New → Confirmed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gdm - 3.8.4-0ubuntu2

---------------
gdm (3.8.4-0ubuntu2) saucy; urgency=low

  * debian/patches/ubuntu_export_XDG_CURRENT_DESKTOP.patch:
    - Set $XDG_CURRENT_DESKTOP if specified in the xsession file.
      (LP: #1212408)
 -- Tim Lunn <email address hidden> Tue, 02 Sep 2013 12:01:11 +1000

Changed in gdm (Ubuntu):
status: Confirmed → Fix Released
Yves-Alexis Perez (corsac) wrote :

It seems that gdm now supports setting XDG_CURRENT_DESKTOP but uses the DesktopNames [1] property. It might make sense to migrate LightDM to uses that too.

[1] https://bugzilla.gnome.org/show_bug.cgi?id=727546

Robert Ancell (robert-ancell) wrote :

LightDM has supported this since 1.11.0 (revision 1952)

Robert Ancell (robert-ancell) wrote :

Please open a bug if this feature is needed in LightDM 1.10

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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