Re: Sourcing /etc/profile for gdm logins
Paul Galbraith wrote:
> I want all logins from gdm to source /etc/profile so that I can put the
> java_home environment variable (and possibly others) there. How can I
> get all gdm user logins to pickup the settings in /etc/profile?
>
> I tried putting ". /etc/profile" in /etc/gdm/PreSession/Default and that
> didn't seem to work, though that seems the most logical spot for it, as
> far as I can tell.
>
> Can anyone suggest a good way to do this? Thanks!
The best way is to have user's .xsession files be login sessions.
Assuming bash:
#!/bin/bash --login
exec x-session-manager
Make sure it is executable or it will have no effect.
chmod a+x $HOME/.xsession
But you will immediately see the problems of trying to do that
globally. Do all users use bash? Probably not. That is just the
beginning.
Read /etc/X11/Xsession and /etc/X11/Xsession.d/* for details of X
startup especially 50xfree86-common_determine-startup and the option
allow-user-xsession from /etc/X11/Xsession.options. By turning that
off and forcing users into a particular shell then you can turn on
--login for them forcibly. Obviously this has severe undesirable
effects.
Bob
Reply to: