On 04/02/14 12:02, Bruce Dubbs wrote:
> rhubarbpie...@gmail.com wrote:
>> On 04/01/14 19:36, Ken Moffat wrote:
>>> On Tue, Apr 01, 2014 at 06:15:05PM -0500,rhubarbpie...@gmail.com  wrote:
>>>> My BLFS 7.5 xterm displays a “sh-4.2#” prompt. My xterm prompt in BLFS
>>>> 7.4 is “/ >” and “PS1=”\w > “ is in my BLFS 7.5 /etc/bashrc file. In
>>>> addition to the wrong prompt, I can't “source” scripts, and receive
>>>> “file not found.” LFS 7.5 seems to be working fine, with the correct
>>>> prompt and without “file not found” or sourcing problems.
>>>> I've apparently done something wrong with X.  I've re-read the
>>>> documentation but am flat-out not seeing my error. What should I check?
>>>     Since you are running as root (the '#' in the prompt), check root's
>>> .bashrc (if it exists) and .bash_login.  In particular, check
>>> anything setting the path.  Also, if bash is invoked as 'sh' the
>>> behaviour is apparently different.  See the "source filename"
>>> explanation in 'man bash'.
>>>     Alternatively, perhaps ~/ (i.e. /root) is not writable by root.  Or
>>> even not readable.  I was going to suggest you checked that '/' and
>>> '/tmp' were not full [ that would be 100% full for root, including
>>> any reserved space ], but I guess that if X starts then it has
>>> managed to write in /tmp.
>>> ĸen
>> $PATH and .bashrc are identical on my BLFS 7.4 and 7.5 partitions. I see
>> no .bash_login, but .bash_profile is identical between my partitions.
>> I can copy files between my BLFS 7.5 and other partitions.  That
>> includes / and I can copy files between / and other directories on my
>> BLFS 7.5 partition.
>> I should mention I can't even bring up an xterm window if I start X as a
>> non-root user.  The window flashes briefly and disappears. Also, while
>> using a root user xterm, I can't "source SomeScript.sh" but can
>> "./SomeScript.sh."
>> I'm really at a loss as to how I messed this up.
> What is your shell in /etc/passwd.  Is it /bin/sh or /bin/bash?
> What is the output of bash --version?
> The startup sequence is /etc/profile followed by the *first* of
> ~/.bash_profile, ~/.bash_login, and ~/.profile.  This is modified by
> instructions in the initialization files.  In the case of BLFS, profile
> runs everyting in /etc/profile.d/*.sh
> The book's ~/.bash_profile runs ~/.bashrc which in turn runs /etc/bashrc.
> /etc/bashrc sets PS1
> If you are running an xterm, it is not a login shell and only ~/.bashrc
> (and thus /etc/bashrc) are run.
> To ensure the correct files are being run, you can insert an echo
> statement into each script.  For example echo '~/.bashrc' in that file.
> You can also see if you get different behavior by running 'bash --login'
> from a command prompt.
>     -- Bruce
>     -- Bruce
My shell is /bin/bash.  My bash version is 4.2.45(1) in my 7.4 and 7.5 
BLFS.  Should they be the same?
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to