Re: stuff in ~/bin won't run
Tzafrir Cohen <tzafrir@cohens.org.il> writes:
>On Wed, Jan 14, 2009 at 04:16:57PM -0800, Mike Castle wrote:
>>
>> I don't think .bash_profile gets sourced when you log in via an
>> XDM/GDM type session. (After all, when would it, since you don't
>> really have a login shell.)
>Possible fix:
> echo 'if [ $SHELL = /bin/bash ]; then . $HOME/.bash_profile; fi' > /etc/X11/Xsession.d/91bash_profile
>This looks all too simple so someone must have thought of it previously
>and decided not to use it. Why?
Probably because of this line:
#!/bin/sh
at the start of /etc/X11/Xsession, which is the master script that will
source your 91bash_profile script.
So, $SHELL will not be /bin/bash and $HOME/.bash_profile will not be
sourced. If you try to source .bash_profile unconditionally from there,
any bashisms in it will cause Xsession to fail.
Reply to: