Re: [blfs-support] Wrong prompt and “file not found” with xterm – BLFS 7.5

2014-04-06 Thread rhubarbpieguy

On 04/06/14 16:23, Bruce Dubbs wrote:
> rhubarbpie...@gmail.com wrote:
>
>> BASH=/bin/sh
> This appears to be your problem.  It should be /bin/bash.
>
> Your password file should be:
>
> :x/home/:/bin/bash
>
>
> Bash changes behavior if started with the sh name.
>
> -- Bruce
My /etc/passwd entries contain only /bin/bash.

Again, I'm OK with using rxvt.  I was looking to experiment with other 
terminal emulators anyway.  Perhaps this will work itself out with the 
next release.  I tried the newest kernel yesterday and again got a blank 
screen.  I can't remember a problem with xterm or a blank screen on 
boot, but it's not as if I'm dead in the water as I have easy 
workarounds for both.  I'm up-and-running on 7.5.

If you're still interested in the problem out of curiosity, I admire 
that and you're the better man.  I'll gladly continue testing, but I 
certainly don't expect you to spend more of your time on this.  I've 
been well served by you and everyone on the board with this problem.


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


Re: [blfs-support] Wrong prompt and “file not found” with xterm – BLFS 7.5

2014-04-06 Thread Bruce Dubbs
rhubarbpie...@gmail.com wrote:

> BASH=/bin/sh

This appears to be your problem.  It should be /bin/bash.

Your password file should be:

:x/home/:/bin/bash


Bash changes behavior if started with the sh name.

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


Re: [blfs-support] Wrong prompt and “file not found” with xterm – BLFS 7.5

2014-04-06 Thread rhubarbpieguy


On 04/05/14 11:55, Bruce Dubbs wrote:

rhubarbpie...@gmail.com wrote:

On 04/04/14 15:06, Bruce Dubbs wrote:

rhubarbpie...@gmail.com  wrote:


Yes, I use startx.  My ~/.xinitrc file contains:

/usr/bin/numlock
/usr/bin/fluxbox

I thought it should be startfluxbox.  At least that's what I had the
last time I used fluxbox.  For now use this in ~/.xinitrc:

xterm -g 80x40+0+0 /bin/bash &
exec twm


If I remember correctly, I did test with twm prior to initially posting
the problem.  But I'll use twm for all future testing.

My guess is also xterm.  I replied to a post yesterday that I had tried
rxvt.  That's true, but in retrospect, I believe I brought it up from an
xterm window - hence, not much of a test.

What about xinit or startx?  Xinit is the same size on 7.4 and 7.5 but
startx differs.  I responded to another post that I have great
confidence in my ability to make mistakes.  That is unfortunately true.
I initially missed the libXft-2.3.1-freetype_fix-1.patch in the Xorg
libraries which caused problems with my xclock.  Xinit requires twm,
xclock, and xterm.

startx is a script.  If you go to the bottom, you eventually get to the
only line that means anything:

xinit "$client" $clientargs -- "$server" $display $serverargs

You can edit that file and add just before that:

echo "xinit $client $clientargs -- $server $display $serverargs"

Note in the xterm man page:

xterm [-toolkitoption ...] [-option ...] [shell]

One  parameter (after all options) may be given.  That overrides xterm's
built-in choice of shell program.  Normally xterm checks the "SHELL"
variable. If  that  is  not  set,  xterm tries  to  use the shell
program specified in the password file.  If that is not set, xterm
uses /bin/sh.  If the parameter is not a relative path, i.e., beginning
with "./" or "../", xterm  looks  for  the  file in the user's PATH.  In
either case, it constructs an absolute path.

 -- Bruce


twm comes up, but I still have the wrong prompt and can't source.

The output of your echo suggestion is:

xinit //.xinitrc  -- /usr/bin/X :0  -auth //.serverauth.1307

Something is wrong here.   //.xinitrc and //.serverauth.1307 certainly
shouldn't be in the root directory.  Try to put some echo statements in
startx to see what is going on.

Also, when you are in the xterm, what is the output of 'set|grep BASH'?
echo $SHELL?  echo $SHELLOPTS?  echo $TERM?

-- bruce


-- Bruce


BASH=/bin/sh
BASHOPTS=cmdhist:expand_aliases:extquote:force_fignore:hostcomplete:interactive_comments:progcomp:promptvars:sourcepath
BASH_ALIASES=()
BASH_ARGC=()
BASH_ARGV=()
BASH_CMDS=()
BASH_LINENO=()
BASH_SOURCE=()
BASH_VERSINFO=([0]="4" [1]="2" [2]="45" [3]="1" [4]="release" 
[5]="i686-pc-linux-gnu")
BASH_VERSION='4.2.45(1)-release'

echo $SHELL -> /bin/sh

echo $SHELLOPTS -> 
braceexpand:emacs:hashall:histexpand:history:interactive-comments:monitor:posix

echo $TERM -> xterm



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

Re: [blfs-support] Wrong prompt and “file not found” with xterm – BLFS 7.5

2014-04-05 Thread Bruce Dubbs
rhubarbpie...@gmail.com wrote:
>
> On 04/04/14 15:06, Bruce Dubbs wrote:
>> rhubarbpie...@gmail.com  wrote:
>>
>>> Yes, I use startx.  My ~/.xinitrc file contains:
>>>
>>> /usr/bin/numlock
>>> /usr/bin/fluxbox
>> I thought it should be startfluxbox.  At least that's what I had the
>> last time I used fluxbox.  For now use this in ~/.xinitrc:
>>
>> xterm -g 80x40+0+0 /bin/bash &
>> exec twm
>>
>>> If I remember correctly, I did test with twm prior to initially posting
>>> the problem.  But I'll use twm for all future testing.
>>>
>>> My guess is also xterm.  I replied to a post yesterday that I had tried
>>> rxvt.  That's true, but in retrospect, I believe I brought it up from an
>>> xterm window - hence, not much of a test.
>>>
>>> What about xinit or startx?  Xinit is the same size on 7.4 and 7.5 but
>>> startx differs.  I responded to another post that I have great
>>> confidence in my ability to make mistakes.  That is unfortunately true.
>>> I initially missed the libXft-2.3.1-freetype_fix-1.patch in the Xorg
>>> libraries which caused problems with my xclock.  Xinit requires twm,
>>> xclock, and xterm.
>> startx is a script.  If you go to the bottom, you eventually get to the
>> only line that means anything:
>>
>> xinit "$client" $clientargs -- "$server" $display $serverargs
>>
>> You can edit that file and add just before that:
>>
>> echo "xinit $client $clientargs -- $server $display $serverargs"
>>
>> Note in the xterm man page:
>>
>> xterm [-toolkitoption ...] [-option ...] [shell]
>>
>> One  parameter (after all options) may be given.  That overrides xterm's
>> built-in choice of shell program.  Normally xterm checks the "SHELL"
>> variable. If  that  is  not  set,  xterm tries  to  use the shell
>> program specified in the password file.  If that is not set, xterm
>> uses /bin/sh.  If the parameter is not a relative path, i.e., beginning
>> with "./" or "../", xterm  looks  for  the  file in the user's PATH.  In
>> either case, it constructs an absolute path.
>>
>> -- Bruce
>>
>
> twm comes up, but I still have the wrong prompt and can't source.
>
> The output of your echo suggestion is:
>
> xinit //.xinitrc  -- /usr/bin/X :0  -auth //.serverauth.1307

Something is wrong here.   //.xinitrc and //.serverauth.1307 certainly 
shouldn't be in the root directory.  Try to put some echo statements in 
startx to see what is going on.

Also, when you are in the xterm, what is the output of 'set|grep BASH'?
echo $SHELL?  echo $SHELLOPTS?  echo $TERM?

   -- bruce


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


Re: [blfs-support] Wrong prompt and “file not found” with xterm – BLFS 7.5

2014-04-05 Thread rhubarbpieguy

On 04/04/14 15:06, Bruce Dubbs wrote:
> rhubarbpie...@gmail.com wrote:
>
>> Yes, I use startx.  My ~/.xinitrc file contains:
>>
>> /usr/bin/numlock
>> /usr/bin/fluxbox
> I thought it should be startfluxbox.  At least that's what I had the
> last time I used fluxbox.  For now use this in ~/.xinitrc:
>
> xterm -g 80x40+0+0 /bin/bash &
> exec twm
>
>> If I remember correctly, I did test with twm prior to initially posting
>> the problem.  But I'll use twm for all future testing.
>>
>> My guess is also xterm.  I replied to a post yesterday that I had tried
>> rxvt.  That's true, but in retrospect, I believe I brought it up from an
>> xterm window - hence, not much of a test.
>>
>> What about xinit or startx?  Xinit is the same size on 7.4 and 7.5 but
>> startx differs.  I responded to another post that I have great
>> confidence in my ability to make mistakes.  That is unfortunately true.
>> I initially missed the libXft-2.3.1-freetype_fix-1.patch in the Xorg
>> libraries which caused problems with my xclock.  Xinit requires twm,
>> xclock, and xterm.
> startx is a script.  If you go to the bottom, you eventually get to the
> only line that means anything:
>
> xinit "$client" $clientargs -- "$server" $display $serverargs
>
> You can edit that file and add just before that:
>
> echo "xinit $client $clientargs -- $server $display $serverargs"
>
> Note in the xterm man page:
>
> xterm [-toolkitoption ...] [-option ...] [shell]
>
> One  parameter (after all options) may be given.  That overrides xterm's
> built-in choice of shell program.  Normally xterm checks the "SHELL"
> variable. If  that  is  not  set,  xterm tries  to  use the shell
> program specified in the password file.  If that is not set, xterm
> uses /bin/sh.  If the parameter is not a relative path, i.e., beginning
> with "./" or "../", xterm  looks  for  the  file in the user's PATH.  In
> either case, it constructs an absolute path.
>
> -- Bruce
>
An update.  I again compiled rxvt, but opened it using my /.fluxbox/keys 
file.  All is well using rxvt.  My prompt is correct and the source 
command works.

This solves the problem for me and I'll simply continue with rxvt.

However, if you're still interested in solving the xterm problem I'll be 
happy to continue with whatever tests you suggest.  I do thank everyone 
for their help and suggestions.


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


Re: [blfs-support] Wrong prompt and “file not found” with xterm – BLFS 7.5

2014-04-05 Thread rhubarbpieguy


On 04/04/14 15:06, Bruce Dubbs wrote:

rhubarbpie...@gmail.com  wrote:


Yes, I use startx.  My ~/.xinitrc file contains:

/usr/bin/numlock
/usr/bin/fluxbox

I thought it should be startfluxbox.  At least that's what I had the
last time I used fluxbox.  For now use this in ~/.xinitrc:

xterm -g 80x40+0+0 /bin/bash &
exec twm


If I remember correctly, I did test with twm prior to initially posting
the problem.  But I'll use twm for all future testing.

My guess is also xterm.  I replied to a post yesterday that I had tried
rxvt.  That's true, but in retrospect, I believe I brought it up from an
xterm window - hence, not much of a test.

What about xinit or startx?  Xinit is the same size on 7.4 and 7.5 but
startx differs.  I responded to another post that I have great
confidence in my ability to make mistakes.  That is unfortunately true.
I initially missed the libXft-2.3.1-freetype_fix-1.patch in the Xorg
libraries which caused problems with my xclock.  Xinit requires twm,
xclock, and xterm.

startx is a script.  If you go to the bottom, you eventually get to the
only line that means anything:

xinit "$client" $clientargs -- "$server" $display $serverargs

You can edit that file and add just before that:

echo "xinit $client $clientargs -- $server $display $serverargs"

Note in the xterm man page:

xterm [-toolkitoption ...] [-option ...] [shell]

One  parameter (after all options) may be given.  That overrides xterm's
built-in choice of shell program.  Normally xterm checks the "SHELL"
variable. If  that  is  not  set,  xterm tries  to  use the shell
program specified in the password file.  If that is not set, xterm
uses /bin/sh.  If the parameter is not a relative path, i.e., beginning
with "./" or "../", xterm  looks  for  the  file in the user's PATH.  In
either case, it constructs an absolute path.

-- Bruce



twm comes up, but I still have the wrong prompt and can't source.

The output of your echo suggestion is:

xinit //.xinitrc  -- /usr/bin/X :0  -auth //.serverauth.1307

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

Re: [blfs-support] Wrong prompt and “file not found” with xterm – BLFS 7.5

2014-04-04 Thread Bruce Dubbs
rhubarbpie...@gmail.com wrote:

> Perhaps, but 'll /bin/sh' shows -> bash.  Doesn't that answer that question?

Not really.  bash behaves differently if invoked as sh.

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


Re: [blfs-support] Wrong prompt and “file not found” with xterm – BLFS 7.5

2014-04-04 Thread Bruce Dubbs
rhubarbpie...@gmail.com wrote:

> Yes, I use startx.  My ~/.xinitrc file contains:
>
> /usr/bin/numlock
> /usr/bin/fluxbox

I thought it should be startfluxbox.  At least that's what I had the 
last time I used fluxbox.  For now use this in ~/.xinitrc:

xterm -g 80x40+0+0 /bin/bash &
exec twm

> If I remember correctly, I did test with twm prior to initially posting
> the problem.  But I'll use twm for all future testing.
>
> My guess is also xterm.  I replied to a post yesterday that I had tried
> rxvt.  That's true, but in retrospect, I believe I brought it up from an
> xterm window - hence, not much of a test.
>
> What about xinit or startx?  Xinit is the same size on 7.4 and 7.5 but
> startx differs.  I responded to another post that I have great
> confidence in my ability to make mistakes.  That is unfortunately true.
> I initially missed the libXft-2.3.1-freetype_fix-1.patch in the Xorg
> libraries which caused problems with my xclock.  Xinit requires twm,
> xclock, and xterm.

startx is a script.  If you go to the bottom, you eventually get to the 
only line that means anything:

xinit "$client" $clientargs -- "$server" $display $serverargs

You can edit that file and add just before that:

echo "xinit $client $clientargs -- $server $display $serverargs"

Note in the xterm man page:

xterm [-toolkitoption ...] [-option ...] [shell]

One  parameter (after all options) may be given.  That overrides xterm's 
built-in choice of shell program.  Normally xterm checks the "SHELL" 
variable. If  that  is  not  set,  xterm tries  to  use the shell 
program specified in the password file.  If that is not set, xterm
uses /bin/sh.  If the parameter is not a relative path, i.e., beginning 
with "./" or "../", xterm  looks  for  the  file in the user's PATH.  In 
either case, it constructs an absolute path.

   -- Bruce

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


Re: [blfs-support] Wrong prompt and “file not found” with xterm – BLFS 7.5

2014-04-04 Thread rhubarbpieguy

On 04/03/14 17:17, Bruce Dubbs wrote:
> rhubarbpie...@gmail.com wrote:
>
>> I echoed the file names as you suggested and prior to invoking X the
>> order is:
>>
>> /etc/profile
>> .bash_profile
>> .bashrc
>> /etc/bashrc
> That is correct.
>
>> However, I saw nothing when starting X.
> That's wrong.
>
> So I redirected the output to a
>> file.  Prior to starting X I see the above.  I then nuked the output
>> file and started X but nothing wrote to the file.  I attempted the same
>> with BLFS 7.4 and my output after starting X is:
>>
>> .bashrc
>> /etc/bashrc
> That's what you should see in 7.5 also.
>
>> Yes, 'type source' produces "source is a shell builtin" from my BLFS 7.5
>> command prompt and xterm window.
> OK.
>
> I don't recall if you are using ?dm or using startx.  I assume right now
> it's startx.  What are the contents of ~/.xinitrc.  This is starting to
> point to a possible xterm issue.  If you are not doing so right now,
> please use twm for testing.
>
> -- Bruce
>
Yes, I use startx.  My ~/.xinitrc file contains:

/usr/bin/numlock
/usr/bin/fluxbox

If I remember correctly, I did test with twm prior to initially posting 
the problem.  But I'll use twm for all future testing.

My guess is also xterm.  I replied to a post yesterday that I had tried 
rxvt.  That's true, but in retrospect, I believe I brought it up from an 
xterm window - hence, not much of a test.

What about xinit or startx?  Xinit is the same size on 7.4 and 7.5 but 
startx differs.  I responded to another post that I have great 
confidence in my ability to make mistakes.  That is unfortunately true.  
I initially missed the libXft-2.3.1-freetype_fix-1.patch in the Xorg 
libraries which caused problems with my xclock.  Xinit requires twm, 
xclock, and xterm.

However, I quickly re-ran the Xorg libraries with the necessary patch 
and xclock came up.  I also restored my raw LFS image and compiled X 
from square one (several times) before posting.  X starts, and 
everything works but for the xterm prompt and inability to source.

I bird-dogged the compiling of every package.  I also had a friend check 
from twm on this morning.  If there's an error, we're just not seeing 
it.  But with that said, there very probably is an error we're just not 
seeing.

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


Re: [blfs-support] Wrong prompt and “file not found” with xterm – BLFS 7.5

2014-04-04 Thread rhubarbpieguy

On 04/04/14 00:04, Christopher Gregory wrote:
> On Thu, 03 Apr 2014 4:53:31 PM rhubarbpie...@gmail.com wrote:
>> On 04/03/14 16:14, Ken Moffat wrote:
>>> On Thu, Apr 03, 2014 at 09:21:34AM -0500, rhubarbpie...@gmail.com wrote:
 This is a stretch, but I should mention I compiled BLFS/X with an older
 kernel than I used in compiling LFS.  I found I booted to a blank screen
 after compiling LFS with the 3.13.13 kernel so I reverted to my LFS/BLFS
 3.10.10 kernel.  I did post the problem to LFS support "Blank screen
 when booting with 3.13.3 kernel. - LFS 7.5" but didn't get a resolution
 and wasn't told I couldn't use an older kernel.  It was a surprise to me
 I could revert to an older kernel.  I specifically asked the question in
 my post.  I will re-compile LFS with the 3.10.10 kernel if suggested.

>>>I thought you did get a reply to that point, but it looks as if I'm
>>>
>>> confusing it with a different thread and perhaps that was on
>>> lfs-support.  Short answer : as long as the kernel version is at least
>>> what you used for --enable-kernel= when compiling glibc everything
>>> should continue to work.
>>>
>>>I say "should" because you have already discovered that things
>>>
>>> sometimes break with newer releases, and equally newer releases
>>> contain fixes for older versions.  In awkward areas (I'm guessing
>>> you have an intel video controller), fixes for some machines can
>>> break other machines.  By the same token, an up-to-date kernel
>>> release might have already fixed the problem.  But getting a working
>>> term in X is obviously more important.
>>>
 I should also mention I've continued past my basic X installation and
 have no problems other than xterm.  I can run X, connect to the
 internet, and run all programs I ran with BLFS 7.4 without incident.

>>>My evil twin suggests that you build a better terminal (urxvt), but
>>>
>>> that would be working around the problem even if it did work for
>>> you.  And to be honest I'm not at all convinced it will help, and it
>>> would definitely need to be configured [ in .XResources or wherever,
>>> and ensure that gets pulled in with "xrdb -merge /path/to/resources]
>>> so there would be more things which could go wrong.
>>>
>>>Apart from what Bruce has suggested, compare _all_ the bash files
>>>
>>> in your 7.5 and 7.4 builds.  Is /home shared by the two builds ?  If
>>> it isn't, also compare the bash files for your regular user account.
>>>
>>> ĸen
>> Yes, I did get some good replies to my blank screen post.  I meant that
>> I didn't see a solution to the problem and everyone seemed OK with my
>> using an older kernel.
>>
>> I should have mentioned that prior to posting my xterm problem I did
>> compile rxvt with the same thought.  Unfortunately, I still had a wrong
>> prompt and couldn't source scripts.
> I have read through these threads, and am wondering if you actually are using
>   bash as your default shell?
>
> In the shell's section there is DASH which has the prompt of
> sh-4.2# when I typed sh from my root terminal.
>
> This is the 7.5 version of the BLFS book on shell's I am talking about.
>
> In that section you have the option of replacing root's shell with dash by a
> symlink.
>
> I would try recompiling bash from source and see if that fixes the issue that
> your having.
>
> I would even go so far as to delete the .bash files from your system (after
> backing them up) just in-case there is some weirdness there.
>
> Regards,
>
> Christopher.
>
>

Perhaps, but 'll /bin/sh' shows -> bash.  Doesn't that answer that question?  I 
also have only bash in my directory of packages.

But with that said, I have enormous confidence in my ability to make 
mistakes.  I have no better idea and may well try recompiling bash.


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

Re: [blfs-support] Wrong prompt and “file not found” with xterm – BLFS 7.5

2014-04-03 Thread Christopher Gregory
On Thu, 03 Apr 2014 4:53:31 PM rhubarbpie...@gmail.com wrote:
> On 04/03/14 16:14, Ken Moffat wrote:
> > On Thu, Apr 03, 2014 at 09:21:34AM -0500, rhubarbpie...@gmail.com wrote:
> >> This is a stretch, but I should mention I compiled BLFS/X with an older
> >> kernel than I used in compiling LFS.  I found I booted to a blank screen
> >> after compiling LFS with the 3.13.13 kernel so I reverted to my LFS/BLFS
> >> 3.10.10 kernel.  I did post the problem to LFS support "Blank screen
> >> when booting with 3.13.3 kernel. - LFS 7.5" but didn't get a resolution
> >> and wasn't told I couldn't use an older kernel.  It was a surprise to me
> >> I could revert to an older kernel.  I specifically asked the question in
> >> my post.  I will re-compile LFS with the 3.10.10 kernel if suggested.
> >> 
> >   I thought you did get a reply to that point, but it looks as if I'm
> > 
> > confusing it with a different thread and perhaps that was on
> > lfs-support.  Short answer : as long as the kernel version is at least
> > what you used for --enable-kernel= when compiling glibc everything
> > should continue to work.
> > 
> >   I say "should" because you have already discovered that things
> > 
> > sometimes break with newer releases, and equally newer releases
> > contain fixes for older versions.  In awkward areas (I'm guessing
> > you have an intel video controller), fixes for some machines can
> > break other machines.  By the same token, an up-to-date kernel
> > release might have already fixed the problem.  But getting a working
> > term in X is obviously more important.
> > 
> >> I should also mention I've continued past my basic X installation and
> >> have no problems other than xterm.  I can run X, connect to the
> >> internet, and run all programs I ran with BLFS 7.4 without incident.
> >> 
> >   My evil twin suggests that you build a better terminal (urxvt), but
> > 
> > that would be working around the problem even if it did work for
> > you.  And to be honest I'm not at all convinced it will help, and it
> > would definitely need to be configured [ in .XResources or wherever,
> > and ensure that gets pulled in with "xrdb -merge /path/to/resources]
> > so there would be more things which could go wrong.
> > 
> >   Apart from what Bruce has suggested, compare _all_ the bash files
> > 
> > in your 7.5 and 7.4 builds.  Is /home shared by the two builds ?  If
> > it isn't, also compare the bash files for your regular user account.
> > 
> > ĸen
> 
> Yes, I did get some good replies to my blank screen post.  I meant that
> I didn't see a solution to the problem and everyone seemed OK with my
> using an older kernel.
> 
> I should have mentioned that prior to posting my xterm problem I did
> compile rxvt with the same thought.  Unfortunately, I still had a wrong
> prompt and couldn't source scripts.

I have read through these threads, and am wondering if you actually are using
 bash as your default shell?

In the shell's section there is DASH which has the prompt of 
sh-4.2# when I typed sh from my root terminal.

This is the 7.5 version of the BLFS book on shell's I am talking about.

In that section you have the option of replacing root's shell with dash by a 
symlink.

I would try recompiling bash from source and see if that fixes the issue that 
your having.

I would even go so far as to delete the .bash files from your system (after 
backing them up) just in-case there is some weirdness there.

Regards,

Christopher.


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

Re: [blfs-support] Wrong prompt and “file not found” with xterm – BLFS 7.5

2014-04-03 Thread Bruce Dubbs
rhubarbpie...@gmail.com wrote:

> I echoed the file names as you suggested and prior to invoking X the
> order is:
>
> /etc/profile
> .bash_profile
> .bashrc
> /etc/bashrc

That is correct.

> However, I saw nothing when starting X.

That's wrong.

So I redirected the output to a
> file.  Prior to starting X I see the above.  I then nuked the output
> file and started X but nothing wrote to the file.  I attempted the same
> with BLFS 7.4 and my output after starting X is:
>
> .bashrc
> /etc/bashrc

That's what you should see in 7.5 also.

> Yes, 'type source' produces "source is a shell builtin" from my BLFS 7.5
> command prompt and xterm window.

OK.

I don't recall if you are using ?dm or using startx.  I assume right now 
it's startx.  What are the contents of ~/.xinitrc.  This is starting to 
point to a possible xterm issue.  If you are not doing so right now, 
please use twm for testing.

   -- Bruce

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


Re: [blfs-support] Wrong prompt and “file not found” with xterm – BLFS 7.5

2014-04-03 Thread rhubarbpieguy

On 04/03/14 15:19, Bruce Dubbs wrote:
> rhubarbpie...@gmail.com wrote:
>> On 04/03/14 10:44, Bruce Dubbs wrote:
>> Your suggested "~/.bashrc" then "source ~/.bashrc" steps fix the
>> prompt.  But I still can't source a script and subsequent xterm windows
>> show the old prompt.
> Edit four files:  /etc/profile, /etc/bashrc, ~/.bash_profile, ~/.bashrc
>
> In each file, add as the second line:
>
> echo 
>
> Then when xterm comes up, see what is being run.  It should be:
>
> ~/.bashrc
> /etc/bashrc
>
> Note: I do this to ensure the files are being run and the sequence of
> the files.
>
> What happens if you do 'type source'?  The result should be:
>
> source is a shell builtin
>
>
> -- Bruce
I echoed the file names as you suggested and prior to invoking X the 
order is:

/etc/profile
.bash_profile
.bashrc
/etc/bashrc

However, I saw nothing when starting X.  So I redirected the output to a 
file.  Prior to starting X I see the above.  I then nuked the output 
file and started X but nothing wrote to the file.  I attempted the same 
with BLFS 7.4 and my output after starting X is:

.bashrc
/etc/bashrc

Yes, 'type source' produces "source is a shell builtin" from my BLFS 7.5 
command prompt and xterm window.

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


Re: [blfs-support] Wrong prompt and “file not found” with xterm – BLFS 7.5

2014-04-03 Thread rhubarbpieguy

On 04/03/14 16:14, Ken Moffat wrote:
> On Thu, Apr 03, 2014 at 09:21:34AM -0500, rhubarbpie...@gmail.com wrote:
>> This is a stretch, but I should mention I compiled BLFS/X with an older
>> kernel than I used in compiling LFS.  I found I booted to a blank screen
>> after compiling LFS with the 3.13.13 kernel so I reverted to my LFS/BLFS
>> 3.10.10 kernel.  I did post the problem to LFS support "Blank screen
>> when booting with 3.13.3 kernel. - LFS 7.5" but didn't get a resolution
>> and wasn't told I couldn't use an older kernel.  It was a surprise to me
>> I could revert to an older kernel.  I specifically asked the question in
>> my post.  I will re-compile LFS with the 3.10.10 kernel if suggested.
>>
>   I thought you did get a reply to that point, but it looks as if I'm
> confusing it with a different thread and perhaps that was on
> lfs-support.  Short answer : as long as the kernel version is at least
> what you used for --enable-kernel= when compiling glibc everything
> should continue to work.
>
>   I say "should" because you have already discovered that things
> sometimes break with newer releases, and equally newer releases
> contain fixes for older versions.  In awkward areas (I'm guessing
> you have an intel video controller), fixes for some machines can
> break other machines.  By the same token, an up-to-date kernel
> release might have already fixed the problem.  But getting a working
> term in X is obviously more important.
>
>> I should also mention I've continued past my basic X installation and
>> have no problems other than xterm.  I can run X, connect to the
>> internet, and run all programs I ran with BLFS 7.4 without incident.
>>
>   My evil twin suggests that you build a better terminal (urxvt), but
> that would be working around the problem even if it did work for
> you.  And to be honest I'm not at all convinced it will help, and it
> would definitely need to be configured [ in .XResources or wherever,
> and ensure that gets pulled in with "xrdb -merge /path/to/resources]
> so there would be more things which could go wrong.
>
>   Apart from what Bruce has suggested, compare _all_ the bash files
> in your 7.5 and 7.4 builds.  Is /home shared by the two builds ?  If
> it isn't, also compare the bash files for your regular user account.
>
> ĸen
Yes, I did get some good replies to my blank screen post.  I meant that 
I didn't see a solution to the problem and everyone seemed OK with my 
using an older kernel.

I should have mentioned that prior to posting my xterm problem I did 
compile rxvt with the same thought.  Unfortunately, I still had a wrong 
prompt and couldn't source scripts.
-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Re: [blfs-support] Wrong prompt and “file not found” with xterm – BLFS 7.5

2014-04-03 Thread Ken Moffat
On Thu, Apr 03, 2014 at 09:21:34AM -0500, rhubarbpie...@gmail.com wrote:
> 
> This is a stretch, but I should mention I compiled BLFS/X with an older 
> kernel than I used in compiling LFS.  I found I booted to a blank screen 
> after compiling LFS with the 3.13.13 kernel so I reverted to my LFS/BLFS 
> 3.10.10 kernel.  I did post the problem to LFS support "Blank screen 
> when booting with 3.13.3 kernel. - LFS 7.5" but didn't get a resolution 
> and wasn't told I couldn't use an older kernel.  It was a surprise to me 
> I could revert to an older kernel.  I specifically asked the question in 
> my post.  I will re-compile LFS with the 3.10.10 kernel if suggested.
> 

 I thought you did get a reply to that point, but it looks as if I'm
confusing it with a different thread and perhaps that was on
lfs-support.  Short answer : as long as the kernel version is at least
what you used for --enable-kernel= when compiling glibc everything
should continue to work.

 I say "should" because you have already discovered that things
sometimes break with newer releases, and equally newer releases
contain fixes for older versions.  In awkward areas (I'm guessing
you have an intel video controller), fixes for some machines can
break other machines.  By the same token, an up-to-date kernel
release might have already fixed the problem.  But getting a working
term in X is obviously more important.

> I should also mention I've continued past my basic X installation and 
> have no problems other than xterm.  I can run X, connect to the 
> internet, and run all programs I ran with BLFS 7.4 without incident.
> 

 My evil twin suggests that you build a better terminal (urxvt), but
that would be working around the problem even if it did work for
you.  And to be honest I'm not at all convinced it will help, and it
would definitely need to be configured [ in .XResources or wherever,
and ensure that gets pulled in with "xrdb -merge /path/to/resources]
so there would be more things which could go wrong.

 Apart from what Bruce has suggested, compare _all_ the bash files
in your 7.5 and 7.4 builds.  Is /home shared by the two builds ?  If
it isn't, also compare the bash files for your regular user account.

ĸen
-- 
das eine Mal als Tragödie, dieses Mal als Farce
-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Re: [blfs-support] Wrong prompt and “file not found” with xterm – BLFS 7.5

2014-04-03 Thread Bruce Dubbs
rhubarbpie...@gmail.com wrote:
>
> On 04/03/14 10:44, Bruce Dubbs wrote:

> Your suggested "~/.bashrc" then "source ~/.bashrc" steps fix the
> prompt.  But I still can't source a script and subsequent xterm windows
> show the old prompt.

Edit four files:  /etc/profile, /etc/bashrc, ~/.bash_profile, ~/.bashrc

In each file, add as the second line:

echo 

Then when xterm comes up, see what is being run.  It should be:

~/.bashrc
/etc/bashrc

Note: I do this to ensure the files are being run and the sequence of 
the files.

What happens if you do 'type source'?  The result should be:

source is a shell builtin


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


Re: [blfs-support] Wrong prompt and “file not found” with xterm – BLFS 7.5

2014-04-03 Thread rhubarbpieguy

On 04/03/14 10:44, Bruce Dubbs wrote:
> rhubarbpie...@gmail.com  wrote:
>> On 04/02/14 21:50, Bruce Dubbs wrote:
>>> What's the output of 'echo $PS1'?
>>>
>>> How about 'ldd /bin/bash'?  Is libreadline.so.6 there?
>> ldd /bin/bash:
>>
>>  linux-gate.so.1 (0xb7732000)
>>  libreadline.so.6 => /lib/libreadline.so.6 (0xb76f2000)
>>  libhistory.so.6 => /lib/libhistory.so.6 (0xb76ea000)
>>  libncursesw.so.5 => /lib/libncursesw.so.5 (0xb768c000)
>>  libdl.so.2 => /lib/libdl.so.2 (0xb7687000)
>>  libc.so.6 => /lib/libc.so.6 (0xb74dc000)
>>  /lib/ld-linux.so.2 (0xb7733000)
> That's OK.
>
>> echo PS1: \s-\v\$
> I don't know where this came from.
>
>> Echo PS1 from LFS shows "\w >" as I would expect.  As I can
>> "./SomeScript.sh" but cannot "source SomeScript.sh" I attempted to
>> manually execute /etc/bashrc from /etc in xterm with ./bashrc but
>> received "file not found."
> Go back to BLFS Chapter 3 and redo the section "The Bash Shell Startup
> Files"
>
>> This is a stretch, but I should mention I compiled BLFS/X with an older
>> kernel than I used in compiling LFS.  I found I booted to a blank screen
>> after compiling LFS with the 3.13.13 kernel so I reverted to my LFS/BLFS
>> 3.10.10 kernel.  I did post the problem to LFS support "Blank screen
>> when booting with 3.13.3 kernel. - LFS 7.5" but didn't get a resolution
>> and wasn't told I couldn't use an older kernel.  It was a surprise to me
>> I could revert to an older kernel.  I specifically asked the question in
>> my post.  I will re-compile LFS with the 3.10.10 kernel if suggested.
> The kernel has nothing to do with this.
>
>> I should also mention I've continued past my basic X installation and
>> have no problems other than xterm.  I can run X, connect to the
>> internet, and run all programs I ran with BLFS 7.4 without incident.
> In the problematic xterm, what do you get if you run '. ~/.bashrc'.  The
> dot by itself is important.
>
> In the problematic xterm, run '/bin/bash' to go into a subshell.  Now
> try running 'source ~/.bashrc'.
>
> -- Bruce
Your suggested "~/.bashrc" then "source ~/.bashrc" steps fix the 
prompt.  But I still can't source a script and subsequent xterm windows 
show the old prompt.

I reviewed chapter 3 and "The Bash Shell Startup Files" several times 
before initially posting this problem.  However,  I ran diff's on the 
chapter 3 text and my files:

/.bash_profile
/.bash_logout
/.bashrc
/etc/bashrc
/etc/profile.d/dircolors.sh
/etc/profile.d/extrapaths.sh
/etc/profile.d/readline.sh
/etc/profile.d/umask.sh

All but for /etc/bashrc came back with no differences.  Etc/bashrc 
differed with "PS1="\w > " which I earlier referenced.  I knew the 
difference existed and, before posting, ran diff's on the above 
mentioned files on my BLFS 7.4 and 7.5 systems.  My thinking was that if 
they worked with 7.4 they should probably work with 7.5. Regardless, I 
removed anything unique in my /etc/bashrc file and ran a diff between 
the documentation and my /etc/bashrc file with no difference.  I still 
have the "sh-4.2" prompt and can't source scripts.

I mentioned the kernel difference as I'm fully aware this problem is 
almost certainly a mistake on my part.  The kernel switch is the only 
"funky" thing I can think of between 7.4 and 7.5.  I've successfully 
built BLFS many times and I'd hate to have someone help with the problem 
and then learn I had to switch kernels.  Better safe than sorry.

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


Re: [blfs-support] Wrong prompt and “file not found” with xterm – BLFS 7.5

2014-04-03 Thread Bruce Dubbs
rhubarbpie...@gmail.com wrote:
>
> On 04/02/14 21:50, Bruce Dubbs wrote:

>> What's the output of 'echo $PS1'?
>>
>> How about 'ldd /bin/bash'?  Is libreadline.so.6 there?
>
> ldd /bin/bash:
>
>   linux-gate.so.1 (0xb7732000)
>   libreadline.so.6 => /lib/libreadline.so.6 (0xb76f2000)
>   libhistory.so.6 => /lib/libhistory.so.6 (0xb76ea000)
>   libncursesw.so.5 => /lib/libncursesw.so.5 (0xb768c000)
>   libdl.so.2 => /lib/libdl.so.2 (0xb7687000)
>   libc.so.6 => /lib/libc.so.6 (0xb74dc000)
>   /lib/ld-linux.so.2 (0xb7733000)

That's OK.

> echo PS1: \s-\v\$

I don't know where this came from.

> Echo PS1 from LFS shows "\w >" as I would expect.  As I can
> "./SomeScript.sh" but cannot "source SomeScript.sh" I attempted to
> manually execute /etc/bashrc from /etc in xterm with ./bashrc but
> received "file not found."

Go back to BLFS Chapter 3 and redo the section "The Bash Shell Startup 
Files"

> This is a stretch, but I should mention I compiled BLFS/X with an older
> kernel than I used in compiling LFS.  I found I booted to a blank screen
> after compiling LFS with the 3.13.13 kernel so I reverted to my LFS/BLFS
> 3.10.10 kernel.  I did post the problem to LFS support "Blank screen
> when booting with 3.13.3 kernel. - LFS 7.5" but didn't get a resolution
> and wasn't told I couldn't use an older kernel.  It was a surprise to me
> I could revert to an older kernel.  I specifically asked the question in
> my post.  I will re-compile LFS with the 3.10.10 kernel if suggested.

The kernel has nothing to do with this.

> I should also mention I've continued past my basic X installation and
> have no problems other than xterm.  I can run X, connect to the
> internet, and run all programs I ran with BLFS 7.4 without incident.

In the problematic xterm, what do you get if you run '. ~/.bashrc'.  The 
dot by itself is important.

In the problematic xterm, run '/bin/bash' to go into a subshell.  Now 
try running 'source ~/.bashrc'.

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


Re: [blfs-support] Wrong prompt and “file not found” with xterm – BLFS 7.5

2014-04-03 Thread rhubarbpieguy

On 04/02/14 21:50, Bruce Dubbs wrote:
> rhubarbpie...@gmail.com wrote:
>
>
>> 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?
> I don't recall, but bash-4.2.45 is fine.  You are slightly ambiguous
> here.  bash behavior changes if it is called as sh.  I assume you mean
> it's being called as bash.
>
> What's the output of 'echo $PS1'?
>
> How about 'ldd /bin/bash'?  Is libreadline.so.6 there?
>
> -- Bruce
>
>
>
>
>
>
ldd /bin/bash:

linux-gate.so.1 (0xb7732000)
libreadline.so.6 => /lib/libreadline.so.6 (0xb76f2000)
libhistory.so.6 => /lib/libhistory.so.6 (0xb76ea000)
libncursesw.so.5 => /lib/libncursesw.so.5 (0xb768c000)
libdl.so.2 => /lib/libdl.so.2 (0xb7687000)
libc.so.6 => /lib/libc.so.6 (0xb74dc000)
/lib/ld-linux.so.2 (0xb7733000)

echo PS1: \s-\v\$

Echo PS1 from LFS shows "\w >" as I would expect.  As I can 
"./SomeScript.sh" but cannot "source SomeScript.sh" I attempted to 
manually execute /etc/bashrc from /etc in xterm with ./bashrc but 
received "file not found."

This is a stretch, but I should mention I compiled BLFS/X with an older 
kernel than I used in compiling LFS.  I found I booted to a blank screen 
after compiling LFS with the 3.13.13 kernel so I reverted to my LFS/BLFS 
3.10.10 kernel.  I did post the problem to LFS support "Blank screen 
when booting with 3.13.3 kernel. - LFS 7.5" but didn't get a resolution 
and wasn't told I couldn't use an older kernel.  It was a surprise to me 
I could revert to an older kernel.  I specifically asked the question in 
my post.  I will re-compile LFS with the 3.10.10 kernel if suggested.

I should also mention I've continued past my basic X installation and 
have no problems other than xterm.  I can run X, connect to the 
internet, and run all programs I ran with BLFS 7.4 without incident.



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


Re: [blfs-support] Wrong prompt and “file not found” with xterm – BLFS 7.5

2014-04-02 Thread Bruce Dubbs
rhubarbpie...@gmail.com wrote:


> 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?

I don't recall, but bash-4.2.45 is fine.  You are slightly ambiguous 
here.  bash behavior changes if it is called as sh.  I assume you mean 
it's being called as bash.

What's the output of 'echo $PS1'?

How about 'ldd /bin/bash'?  Is libreadline.so.6 there?

   -- Bruce






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


Re: [blfs-support] Wrong prompt and “file not found” with xterm – BLFS 7.5

2014-04-02 Thread rhubarbpieguy

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?
-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Re: [blfs-support] Wrong prompt and “file not found” with xterm – BLFS 7.5

2014-04-02 Thread Ken Moffat
On Wed, Apr 02, 2014 at 11:37:40AM -0500, rhubarbpie...@gmail.com wrote:
> 
> 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 starting to think that you have more than one problem.  They
might be related, but you probably need to tackle one at a time.

 I think it might be easier to start with the xterm-for-regular-user
problem.  I guess you are trying to do this from your .xinitrc file,
so I would _log_ the output of startx (both stdout and stderr), and
end X as soon as you can after the term window has disappeared.
Then look at the stdout/stderr messages and also the log from X
itself, and perhaps the system log too [ segfaults often show up in
that ].

 You might also try the same thing on the non-broken system, to
compare the messages - X generally reports a lot of things, some of
which can look scary [ particularly when shutting X down ] but what
you want to examine are the new/different messages from the broken
system.

> I'm really at a loss as to how I messed this up.
> 

 That's the "joy" of this pasttime - we each get to make our own
unique mistakes, and then try to reassemble something from the
broken pieces.  With luck, we learn from whatever we do wrong and
also remember enough to either not make the same mistake again, or
at least to recognise it when we do.

 Generally, understanding what we have done wrong only comes when we
have understood the resulting problem.  And sometimes the
explanation for what really triggered it may only become apparent
_much_ later, at least in my own experience.  For the moment,
concentrate on understanding the problem(s), and then on resolving
it/them.

 Unfortunately, you have to do most of the legwork yourself.
Sometimes, 'strace' is sort-of-useful in finding where a program is
getting an unexpected result [ albeit with voluminous output ], but
I think you first need to pin down where a problem is happening.

 At the moment, all I can do is try to encourage you and wish you
good luck.

ĸen
-- 
das eine Mal als Tragödie, dieses Mal als Farce
-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Re: [blfs-support] Wrong prompt and “file not found” with xterm – BLFS 7.5

2014-04-02 Thread Bruce Dubbs
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



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

Re: [blfs-support] Wrong prompt and “file not found” with xterm – BLFS 7.5

2014-04-02 Thread rhubarbpieguy

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.

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

Re: [blfs-support] Wrong prompt and “file not found” with xterm – BLFS 7.5

2014-04-01 Thread Ken Moffat
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
-- 
das eine Mal als Tragödie, dieses Mal als Farce
-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page