Most of the session startup scripts in /etc/X11/gdm/Sessions/ have a hard-coded "#!/bin/bash -login" as their first line. This means that if the user uses /bin/ksh and hasn't cleaned up the .bash* files that are supplied in /etc/skel, these files will get executed instead of their .profile. (I don't know what happens if tcsh or similar is used, but i expect it would be even worse.) I recommend that these scripts be modified to remove the '-login' option to bash, and have gdm exec the user's login shell manually the way /bin/login does (by prefixing a '-' to $0), and specify the script to execute on the command line. A similar change will likely be required in /etc/X11/xdm/Xsession.
Release 23 of gdm2.0-beta2 has an attempted fix for this, if it doesn't work for you then please let us know.
No luck. Here's what i did: - Use useradd to create a dummy test user (including the default .bash*) files - Use vipw to change their shell to /bin/ksh - Add a line to each of the startup files (.bash_profile, .bashrc, .bash_logout, .kshrc, .profile) which echos the date and the filename to a file, e.g.: echo `date`: .profile >> $HOME/output - Login as the test user and start a terminal window - cat output. The output given is: Fri Feb 25 11:16:14 EST 2000: .bashrc Fri Feb 25 11:16:14 EST 2000: .bash_profile Fri Feb 25 11:16:14 EST 2000: .bashrc So, even though the user's shell is ksh, their bash startup files get executed instead of their ksh files, and they get confused! :-)
It turns out that this needs fixing in the Xsession script, rather than in gdm.
*** Bug 46475 has been marked as a duplicate of this bug. ***
The needed changes were made to Xsession by removing its own -login invocation and replacing "exec foo" calls with: exec -l $SHELL -c foo Handing this back to Havoc to close if he believes gdm is ready to roll with this change. Havoc, also note, any scripts in gnome/kde that rely on this new xinitrc package should have their dependancies updated to reflect that also. Good idea to also comment why the dep is there too as I've learned. ;o)