PDA

View Full Version : .bash_profile in X11 xterm


rusto
02-10-2003, 09:34 PM
Install of X11 (pb 0.2) and Fink and am wondering why it seems that xterm does not "see" my existing .bash_profile as it launches. It has no problem with .bashrc as my funky prompt shows up as expected.

mervTormel
02-10-2003, 09:58 PM
xterm is not run as a 'login' shell and the .bash_profile is not sourced. you could put a check for terminal type xterm and source the profile from .bashrc, but you have to be careful that your profile doesn't then source .bashrc and get into a loop

sao
02-10-2003, 11:24 PM
rusto,

Check the following thread at x11-users list:


http://lists.apple.com/mhonarc/x11-users/msg01232.html

rusto
02-11-2003, 07:14 AM
This is the tip that worked for me:

>I put this in my ~/.Xdefaults;

>XTerm*.LoginShell: True
>

Note: for those flummoxed by trying to login to the link in Sao's post, see the info here: http://search.lists.apple.com/x11-users

ericw13
02-11-2003, 07:15 AM
Originally posted by mervTormel
xterm is not run as a 'login' shell and the .bash_profile is not sourced. you could put a check for terminal type xterm and source the profile from .bashrc, but you have to be careful that your profile doesn't then source .bashrc and get into a loop

If this is correct, then is there something wrong with my xinitrc:

$ tail -2 /etc/X11/xinit/xinitrc
/sw/bin/blackbox &
exec xterm -geometry 80x24+0+20 -fg white -bg black -name login
$

I know this is the file that executes, as X11.app comes up with the blackbox wm, not quartz-wm, but my .bash_profile is not sourced...

Thanks
Eric

PS Everything above the last two lines is left unchanged from the original XDarwin install... yes, I still have both lying around.

wryder
04-17-2012, 08:52 AM
Rusto, that's what worked for me too. Thanks! Note: I had to actually create that file; it wasn't there beforehand.