gdm and user login files with non-bourne shells

Nataraj incoming-ubuntu at
Mon Jun 21 01:16:04 UTC 2010

I am running Lucid 10.04 with all updates applied.  I see that GDM does 
not run a login shell (from /etc/gdm/Xsession), but instead, 
/etc/gdm/Xsession invokes the users .profile file itself.

A result of this, is that if a user has his login shell set to a 
non-bourne shell such as tcsh, and he has commands in ${HOME}/.login or 
other non-bourne shell init files they never get invoked.  This is 
somewhat documemented in the comments in /etc/gdm/Xsession.  Gnome in 
other linux distributions such as Fedora, invoke a login shell with 
something like exec -l ${SHELL} from /etc/gdm/Xsession, which guarantees 
that a user will get the expected behaviour based on their choice of 
login shell.  Of course the login shell must be run directly under gdm 
so that it can pass down any environment variables to child processes.

Is this just the documented behavior of Ubuntu or am I missing something 
here?  I managed to create a workaround, but it seems messy to have to 
do this.

Also I tried to create a .xsession file in ${HOME}/.xsession, but it did 
not get invoked. /etc/X11/Xsession.options, which is unmodified from the 
default, contains the line:


Any ideas?

Thank You,

More information about the ubuntu-users mailing list