light dm ignores selected session type and always logs me into unity

Bug #862127 reported by Andreas
50
This bug affects 10 people
Affects Status Importance Assigned to Milestone
Light Display Manager
Confirmed
Medium
Unassigned

Bug Description

this started happening two days ago or so. Previously, I've selected "Gnome" or "Gnome Classic" @ the lightdm login (after selecting my username) and lightdm would log me into the selected session. However, whatever I select now, I always end up in unity.
---
ApportVersion: 1.23-0ubuntu2
Architecture: amd64
DistroRelease: Ubuntu 11.10
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release amd64 (20100429)
NonfreeKernelModules: nvidia wl
Package: lightdm 1.0.0-0ubuntu2
PackageArchitecture: amd64
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 3.0.0-12.19-generic 3.0.4
Tags: oneiric running-unity
Uname: Linux 3.0.0-12-generic x86_64
UpgradeStatus: Upgraded to oneiric on 2011-09-23 (5 days ago)
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

Revision history for this message
Andreas (andreas-kotowicz) wrote :

I tried to attach more info to this bug (calling 'apport-collect 862127') but unfortunately I always get a message saying "No additional information collected".
Are there any files that I should upload manually?

tags: added: apport-collected oneiric running-unity
description: updated
Revision history for this message
Andreas (andreas-kotowicz) wrote : Dependencies.txt

apport information

Revision history for this message
Robert Ancell (robert-ancell) wrote :

Hi the appropriate log is /var/log/lightdm/ligthdm.log after you have logged in.

Changed in lightdm:
status: New → Incomplete
importance: Undecided → Medium
Revision history for this message
Andreas (andreas-kotowicz) wrote :

according to this log file, I requested the session 'Ubuntu' - but that's not correct. I always select 'Gnome'

Revision history for this message
Andreas (andreas-kotowicz) wrote :

I just noticed that this issue only occurs on a system that I've updated from 11.04 to 11.10. A clean install is not affected by this bug.

Revision history for this message
Andreas (andreas-kotowicz) wrote :

Once I remove unity completely, I can login back into gnome.

(I removed unity like this:

sudo apt-get remove unity unity-2d-places unity-2d unity-2d-panel unity-2d-spread unity-asset-pool unity-services unity-lens-files unity-lens-music unity-lens-applications gir1.2-unity-4.0 unity-common indicator-sound indicator-power indicator-appmenu libindicator6 indicator-application evolution-indicator indicator-datetime indicator-messages libnux-1.0-0

)

Revision history for this message
ubertoo (ubertoo) wrote :

I'm affected by this as well, upgrade from 11.04. Any lightdm session sends me into Unity, including failsafe xterm. If I switch login managers to gdm it works as expected.

sudo dpkg-reconfigure gdm

Revision history for this message
Andreas (andreas-kotowicz) wrote :

for those who are affected by this bug, here's a workaround:

$ cd /usr/share/gnome-session/sessions
$ sudo mv ubuntu.session ubuntu.session.dontuse
$ sudo mv gnome.session ubuntu.session

restart lightdm and now you will always drop into gnome-shell.

Revision history for this message
kenjo (ken-kenjo) wrote :

I have a me to on this one. The user that fail was upgraded from a 10.10 release to 11.10. Always end up in unity. a newly created account is able to select session.

Is there some way to debug this. Is there some shell script that I can put debug prinouts in.

What command do the lightdm actually run for the different sessions ?? I have no idea of where to look . Is this a fallback effect in that gnome 3 is started fail on something and we fall back to unity or is unity actually started from lightdm even when a different session was selected.

Revision history for this message
kenjo (ken-kenjo) wrote :

well this was interesting.

I found out that it starts /usr/sbin/lightdm-session that is a shell script so I added "set -x" as the first thing to be able to see where things was going wrong and then it actually worked.

Revision history for this message
kenjo (ken-kenjo) wrote :

Ok the last entry was not valid. something else was making it work.

I now started my computer again and have unity AGAIN.

Turns out that it is actually lightdm that provide the incorrect value in GDMSESSION environment variable.
here is a dump of the first part of /usr/sbin/lightdm-session.

+ echo Running X session wrapper
Running X session wrapper
+ [ -f /etc/profile ]
+ echo Loading profile from /etc/profile
Loading profile from /etc/profile
+ . /etc/profile
+ [ -d /etc/profile.d ]
+ [ -r /etc/profile.d/ati-fglrx.sh ]
+ . /etc/profile.d/ati-fglrx.sh
+ [ ]
+ LIBGL_DRIVERS_PATH=/usr/lib32/dri:/usr/lib64/dri
+ export LIBGL_DRIVERS_PATH
+ [ -r /etc/profile.d/bash_completion.sh ]
+ . /etc/profile.d/bash_completion.sh
+ [ -z -o -z $ -o -n ]
+ return
+ unset i
+ [ $ ]
+ [ ]
+ id -u
+ [ 1004 -eq 0 ]
+ PS1=$
+ [ -f /home/kenjo/.profile ]
+ [ -f /etc/xprofile ]
+ [ -f /home/kenjo/.xprofile ]
+ xresourcedir=/etc/X11/Xresources
+ [ -d /etc/X11/Xresources ]
+ echo Loading resource: /etc/X11/Xresources/x11-common
Loading resource: /etc/X11/Xresources/x11-common
+ xrdb -nocpp -merge /etc/X11/Xresources/x11-common
+ xresourcefile=/home/kenjo/.Xresources
+ [ -f /home/kenjo/.Xresources ]
+ [ -f /etc/X11/Xkbmap ]
+ [ -f /home/kenjo/.Xkbmap ]
+ [ -z ]
+ [ -f /etc/X11/Xmodmap ]
+ [ -f /home/kenjo/.Xmodmap ]
+ unset XKB_IN_USE
+ xinitdir=/etc/X11/xinit/xinitrc.d
+ [ -d /etc/X11/xinit/xinitrc.d ]
+ xsessionddir=/etc/X11/Xsession.d
+ OPTIONFILE=/etc/X11/Xsession.options
+ USERXSESSION=/home/kenjo/.xsession
+ USERXSESSIONRC=/home/kenjo/.xsessionrc
+ ALTUSERXSESSION=/home/kenjo/.Xsession
+ [ -d /etc/X11/Xsession.d ]
+ ls /etc/X11/Xsession.d
+ script=/etc/X11/Xsession.d/00_handle_guest_session
+ echo Loading X session script /etc/X11/Xsession.d/00_handle_guest_session
Loading X session script /etc/X11/Xsession.d/00_handle_guest_session
+ [ -r /etc/X11/Xsession.d/00_handle_guest_session -a -f /etc/X11/Xsession.d/00_handle_guest_session ]
+ expr 00_handle_guest_session : ^[[:alnum:]_-]\+$
+ . /etc/X11/Xsession.d/00_handle_guest_session
+ GDMSESSION=ubuntu
+ [ xubuntu = xguest-restricted ]
+ script=/etc/X11/Xsession.d/20x11-common_process-args

as can be seen GDMSESSION=ubuntu and it should have been gnome.

kenjo (ken-kenjo)
Changed in lightdm:
status: Incomplete → Confirmed
Revision history for this message
qubix (jakkul) wrote :

I confirm the same issue on my system 11.10 upgraded from 11.04.

Revision history for this message
Matthew Ames (supermatt) wrote :
Download full text (3.3 KiB)

Hi,

I can confirm that I am affected by this bug too.

My lightdm.conf says this:
[SeatDefaults]
user-session=gnome-shell
autologin-user=matthew
autologin-user-timeout=0
greeter-session=unity-greeter

But when I log in, /var/log/lightdm/lightdm.log states:

[+0.00s] DEBUG: Logging to /var/log/lightdm/lightdm.log
[+0.00s] DEBUG: Starting Light Display Manager 1.0.6, UID=0 PID=10997
[+0.00s] DEBUG: Loaded configuration from /etc/lightdm/lightdm.conf
[+0.00s] DEBUG: Using D-Bus name org.freedesktop.DisplayManager
[+0.00s] DEBUG: Registered seat module xlocal
[+0.00s] DEBUG: Registered seat module xremote
[+0.00s] DEBUG: Adding default seat
[+0.00s] DEBUG: Starting seat
[+0.00s] DEBUG: Starting new display for automatic login as user matthew
[+0.00s] DEBUG: Starting local X display
[+0.00s] DEBUG: Using VT 7
[+0.00s] DEBUG: Activating VT 7
[+0.00s] DEBUG: Logging to /var/log/lightdm/x-0.log
[+0.01s] DEBUG: Writing X server authority to /var/run/lightdm/root/:0
[+0.01s] DEBUG: Launching X Server
[+0.01s] DEBUG: Launching process 11001: /usr/bin/X :0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
[+0.01s] DEBUG: Waiting for ready signal from X server :0
[+0.01s] DEBUG: Acquired bus name org.freedesktop.DisplayManager
[+0.01s] DEBUG: Registering seat with bus path /org/freedesktop/DisplayManager/Seat0
[+0.78s] DEBUG: Got signal 10 from process 11001
[+0.78s] DEBUG: Got signal from X server :0
[+0.78s] DEBUG: Connecting to XServer :0
[+0.78s] DEBUG: Automatically logging in user matthew
[+0.79s] DEBUG: pam_start("lightdm-autologin", "matthew") -> (0xb099a0, 0)
[+0.79s] DEBUG: pam_authenticate(0xb099a0, 0) -> 0 (Success)
[+0.79s] DEBUG: pam_acct_mgmt(0xb099a0, 0) -> 0 (Success)
[+0.79s] DEBUG: User matthew authorized
[+0.80s] DEBUG: Using session ubuntu
[+0.80s] DEBUG: Starting user session
[+0.81s] DEBUG: Dropping privileges to uid 1000
[+0.81s] DEBUG: Restoring privileges
[+0.81s] DEBUG: Dropping privileges to uid 1000
[+0.81s] DEBUG: Writing /home/matthew/.dmrc
[+0.85s] DEBUG: Restoring privileges
[+0.87s] DEBUG: Starting session ubuntu as user matthew
[+0.87s] DEBUG: Logging to /home/matthew/.xsession-errors
[+0.87s] DEBUG: Launching session
[+0.87s] DEBUG: pam_set_item(0xb099a0, 3, ":0") -> 0 (Success)
[+0.87s] DEBUG: pam_open_session(0xb099a0, 0) -> 0 (Success)
[+0.90s] DEBUG: Opened ConsoleKit session 3e924aabbe6a65f6b372503900000010-1330695884.447217-1893360978
[+0.90s] DEBUG: Dropping privileges to uid 1000
[+0.90s] DEBUG: Adding session authority to /home/matthew/.Xauthority
[+0.93s] DEBUG: Restoring privileges
[+0.93s] DEBUG: Launching process 11013: /usr/sbin/lightdm-session '/usr/bin/gnome-session --session=ubuntu'
[+0.94s] DEBUG: New display ready, switching to it
[+0.94s] DEBUG: Activating VT 7
[+0.94s] DEBUG: pam_setcred(0xb099a0, PAM_ESTABLISH_CRED) -> 0 (Success)
[+0.94s] DEBUG: PAM returns environment 'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games LANG=en_GB.UTF-8 LANGUAGE=en_GB:en'
[+0.94s] DEBUG: Registering session with bus path /org/freedesktop/DisplayManager/Session0

As you can see, there is some confusion somewhere and it's getting the wrong session type from somewhere. I know ...

Read more...

Revision history for this message
johnathan schwartz (johnathanschwartz) wrote :

This effects me, persistent live-usb session, not upgraded from 11.04, it's the standard ubuntu-11.10-desktop-i386.iso

Revision history for this message
Benjamin (nailartcenter) wrote :

Can the problem be dependent on graphics card driver? I mean, in terms of installed drivers, but can not be used because your video card is not installed..

Revision history for this message
kenjo (ken-kenjo) wrote : Re: [Bug 862127] Re: light dm ignores selected session type and always logs me into unity

On Mon, 2012-04-23 at 00:37 +0000, Benjamin wrote:
> Can the problem be dependent on graphics card driver? I mean, in terms
> of installed drivers, but can not be used because your video card is not
> installed..
>

No this is not it as I can use the session if I start it manually by
overriding the value light-dm uses. It probably is some configuration
value that is invalid or something so it gets the default value of
ubuntu as session.

It works if I create e new user and login with that.

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.