/etc/gdm/Xsession does not call /etc/X11/Xsession

Bug #465349 reported by Damien Robert on 2009-10-30
This bug affects 4 people
Affects Status Importance Assigned to Milestone
gdm (Ubuntu)

Bug Description

Binary package hint: gdm

On /etc/gdm/Xsession i see the following:

if [ -d /etc/X11/Xsession.d ]; then
    for i in `ls /etc/X11/Xsession.d/` ; do
        if [ -r "/etc/X11/Xsession.d/$i" ] && expr "$i" : '^[[:alnum:]_-]\+$' > /dev/null; then
            . "/etc/X11/Xsession.d/$i"

so that the files in /etc/X11/Xsession.d are read.

1) The following variables are not set:

but they are used by the scripts in /etc/X11/Xsession.d

they are set by /etc/X11/Xsession, so a workaround would be to source this file rather than the script in /etc/X11/Xsession.d

2) the script in /etc/gdm continues with
if [ "x$command" = "xcustom" ] ; then
  if [ -x "$HOME/.xsession" ]; then
    echo "$0: Cannot find ~/.xsession will try the default session"

But this will never be called, because the sourced file
Numenor /etc/gdm $ cat /etc/X11/Xsession.d/99x11-common_start
# $Id: 99x11-common_start 305 2005-07-03 18:51:43Z dnusinow $

# This file is sourced by Xsession(5), not executed.

will exec $STARTUP so that the rest of the gdm script after sourcing the scripts in /etc/X11/Xsession.d
are not read. I understand this as a fallback in case nothing is launched by /etc/X11/Xsession.d, but this should be commented, I have the impression the maintenair expect the rest of the script to be read.

(This is a regression compared to jaunty, see bug #229199)

ProblemType: Bug
Architecture: i386
Date: Fri Oct 30 19:38:56 2009
DistroRelease: Ubuntu 9.10
Package: gdm 2.28.1-0ubuntu1
 PATH=(custom, user)
ProcVersionSignature: Ubuntu 2.6.31-14.48-generic
SourcePackage: gdm
Uname: Linux 2.6.31-14-generic i686

Damien Robert (robertdamien) wrote :
Mikael Ståldal (mikaelstaldal) wrote :

I just wondered why my ~/.xsession did not execute any more after upgrade to 9.10, here is the answer.

Are there any workaround for this bug?

Mikael Ståldal (mikaelstaldal) wrote :

It seems like removing the file /etc/X11/Xsession.d/99x11-common_start is a workaround for this.

aporter (aporter) on 2009-11-23
Changed in gdm (Ubuntu):
status: New → Confirmed
aporter (aporter) wrote :

Removing the file /etc/X11/Xsession.d/99x11-common_start did not work for me.

My workaround was to add: STARTUP="$HOME/.xsession" to /etc/X11/Xsession.d/99x11-common_start but that will give you an error if you *don't* have an .xsession file.

wmatheos (wmatheos) wrote :

Add to /etc/X11/Xsession.d/99x11-common_start :
if [ -f $HOME/.xsession ]
If the is a .xsession file it will be run, If not, start the default session.

Damien Robert (robertdamien) wrote :

Well the recommanded way to source your xsession is given in bug: #398300.

There are two things that happen here:
You have to add a file named "Xsessions.desktop" to /etc/X11/sessions with the contents:
[Desktop Entry]
Comment=This runs ~/.xsession

Exec=default should be the right way, but it is not because of the bug i reported here.
The problem is that with Exec=/etc/X11/Xsession, the files in Xsession.d get sourced twice, so it would be nice if we could put Exec=default instead.

Changed in gdm (Ubuntu):
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers