Hi. I have read some previous threads about startup scripts but can't work
out the answer to this problem. I beg some patience from those who have been
through all this before. 

My ~/.bash_profile is not run under circumstances where I think it's supposed to
be. 

~/.bash_profile _does_ run when I do:

$ bash --login (at console or xterm)
$ xterm -e bash --login (from a user xterm)
# xterm (from su ) 
$ su - username


It does not get sourced automatically:
at console login (runlevel 3)
invoking xterm from within another user xterm (see .Xresources setting below)
invoking xterm -ls from another xterm (unless as su) (presumably for same 
reason?)

In particular I thought ~/.bash_profile should get sourced automatically at
console login, as described at 
http://www.comptechdoc.org/os/linux/howlinuxworks/linux_hlbash.html
among other places

/etc/profile always gets sourced (as expected?)
`/.bashrc also doesn't get sourced when starting a new xterm. It should,
shouldn't it? It works fine if I just type
$ bash (within xterm or console)

Not sure if this is normal/related:
If I "login" inside an xterm using
$ su - username
(Password)
I can no longer start another xterm from that xterm, getting
xterm Xt error: Can't open display:

~/.bash_profile is set 644
Using LFS 6.1 except kernel 2.6.13 and BLFS by the book as far as I can
remember.
I have the following line in ~/.Xresources
XTerm*LoginShell:       True
which was supposed to avoid having to manually source ~/.bash_profile all the
time. 
I use startx from the console
I have seen it suggested to add "bash --login" to xinitrc but 
a. this was controversial for reasons slightly beyond my understanding, and
b. it caused me the same symptoms as the person it was suggested to, which was
that X starts but window manager does not. I assume there is something wrong
with my syntax

Hope the answer is straightforward but not *too* straightforward!

Thanks
David
-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to