xdm and user's profiles
I have noticed that when you login to a Debian system through xdm the
system's /etc/profile and your own .*profile is not loaded, this is
not the case on Redhat systems, I compared the system Xsession files
and the only substantial difference I could find is that Redhat has
#!/bin/bash -login in their Xsession which will start bash (version
1) as a login shell when executing the script which is probably how
they profiles are properly loaded there. this does not work on
Debian (I added #!/bin/bash --login since Debian uses bash 2 and
Redhat uses bash 1)
I saw this was mentioned on the -user list before and the general
suggestion was to start your *terms with the -ls option to start a
login shell, there are however some issues with this solution:
if you start a *term from your window-manager's menus they will NOT
be started with the -ls option, so you either must start one from the
menu and then use it to start a new one with -ls or you must modify
all your menus.
another potential(*) problem is if you have a X program which uses
environment variables of some sort, if it is started from the
window-manager's menus it will not get your profile information since
that is only inherited from *terms run with -ls and not from the
window-manger since it is unaware of your environment.
(*) while I have not yet encountered this, i see it as a possibility.
if the user adds programs to his own ~/bin he must create menus with
the absolute pathname, none of the other menus are done this way why
should the user's?
so far the only solution I have found is to add source /etc/profile
and source .bash_profile (or whatever file goes with your preferred
shell) to the user's .xsession before starting the window-manger.
I am wondering if there is a better solution to this? I think that
Redhat's solution (if it worked with bash2) is not ideal since it
probably does not load the right environment if the user uses a shell
other then bash, I am not sure if something could be added to the
global Xsession to check what the user's shell is and load the
proper environments for it...
one way or another i think this behavior is broken, this is the only
place where you must manually take special action to get your
environment loaded correctly, either modify the system menu's or your
To obtain my PGP key: http://www.alaska.net/~erbenson/pgp/