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

Re: Does X11 ignore ~/.bash_profile?



On Fri, 1999-09-24 at 00:42:35 +0200, Johann Spies wrote:
> I am trying to install real player and have the following lines in my
> ~/.bash_profile:
> 
> LD_LIBRARY_PATH=/usr/local/src/rvplayer5.0
> export LD_LIBRARY_PATH
> PATH=$PATH:/usr/local/src/rvplayer5.0
> 
> When I do an "echo $PATH" in the console, I get:
> 
> .::/home/jhspies/bin:/usr/gnu/bin:/usr/bin/X11:/use/X11R6/bin:
> /usr/local/bin:/usr/ucb:/bin:/usr/bin:/usr/etc:/etc:/sbin:
> /usr/sbin:/usr/games:/usr/local/sbin:/home/jhspies/bin:
> /usr/arx/bin:/usr/local/lib:/usr/local/pgsql/bin:
> /home/jhspies/Office51/bin:/usr/local/src/rvplayer5.0
> 
> However when I do it in xterm I get 
> 
> .::/home/jhspies/bin:/usr/gnu/bin:/usr/bin/X11:/use/X11R6/bin:
> /usr/local/bin:/usr/ucb:/bin:/usr/bin:/usr/etc:/etc:/sbin:
> /usr/sbin:/usr/games:/usr/local/sbin:/home/jhspies/bin:
> /usr/arx/bin:/usr/local/lib
> 
> Does X11 ignore ~/.bash_profile?
> 
> Johann.

The answer to your explicit question is:
	"It depends on what you tell xterm you want."
as the following quote from the xterm man page describing
one of the resources available in the xterm.vt100 widget:
       loginShell (class LoginShell)
               Specifies  whether  or  not the shell to be run in
               the window should be started  as  a  login  shell.
               The default is ``false.''
hopefully makes clear.
Thus putting
	xterm.vt100.loginShell: true
in your .Xresources file would make each xterm shell a login shell,
which would then read ~/.bash_profile during its initialization.
(xterm also has command line options -ls and +ls to determine this,
if you are starting xterm from a command line.
But the Xresources approach also catches all those xterms
that get started up implicitly somehow or another.)

But the common solution to your implicit question is as others have suggested:
put most all of your initialization into ~/.bashrc,
and then in ~/.bash_profile source ~/.bashrc.
The usage of ENV may be influenced by this quote from the bash FAQ:
        bash reads ~/.bashrc for interactive shells, $ENV for non-interactive

Keith


Reply to: