[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: .bash_profile and X



On Tue, Mar 11, 2003 at 04:57:46PM +0800, Dai Yuwen wrote:
> Hi, Dear All
> 
> I'm running xdm + fvwm. And my shell is /bin/bash.  I find any variable I 
> set in ~/.bash_profile doesn't take effect after I've login X.  If I use 
> gdm+fvwm, it's OK.   So maybe I missed thing related to X?  this is my 
> ~/.xsession:
> 
> #! /bin/sh
> 
> xmodmap ~/.Xmodmap
> gnome-terminal &
> exec fvwm
> #end
> 
> Any idea?  Thanks in advance.

The INVOCATION section of the bas man page kinda explains this.  It's
because ~/.bash_profile is only sourced when bash is invoked as a login
shell; this is not the case in an xterm (by default, anyway, you can
change it), and ~/.xsession doesn't source it either.  You could
potentially just source ~/.bash_profile from your ~/.xsession, since
this would effect your entire X session.  

Just make sure that your ~/.bash_profile doesn't run any interactive
commands...

-- 
Rob Weir <rweir@ertius.org>				http://ertius.org/

Attachment: pgpA6V0jeoMzR.pgp
Description: PGP signature


Reply to: