Bash shell being displayed twice?
Err, something like that. I wish I could make the topic more specific
After building LFS, and starting working on the BLFS parts, I rebooted to my LFS base system (after re-building shadow like the book tells me to when I install PAM) in order to login as a different user to test su. PROBLEM: It seems my bash shell gets displayed twice, something like this: seph64@LFS - /home/seph64:seph64@LFS - $: Any reason why it is doing this, and what configuration file I need to edit to fix it (so far I've done everything the install book told me to)? Thanks in advance. |
I'm guessing you messed with ~/.bash_profile or /etc/profile. Check to make sure you didn't make an "oops" when setting the PS1 environment variable.
I would bet money that in one of those files, there's a line containing something like this: Code:
PS1="$PS1:\u@\h - \$" |
If I find something like that in one of the files specified, I should take out the extra $PS1?
I looked at the /etc/profile and /etc/bashrc And both has something similar in the export PS1 fields. Should only one of those files have the export? |
Yeah, sorry for leaving you hanging... :)
You'd want to remove the $PS1 reference in the assignment. As a safety measure, copy the line, comment the original, make changes to the copy, and see where it gets you. If all's well, delete the original. If you'd like a second pair of eyes, go ahead and post the contents of both files. I don't think they'd be too terribly long to look at. EDIT: I changed the line above to use red text indicating what should probably be removed. By you can play with any of those assignments to suit yourself. Keep in mind that /etc/profile is looked at first, and then ~/.bash_profile. Also, changes you make won't be reflected until you log out, and log back in again. |
Thanks, I had the same problem and it's fixed. :cool:
|
You mis understood me.
In /etc/profile there was this: Quote:
|
No misunderstanding ;)
What I mentioned was a possible explanation, not necessarily the cause of your situation specifically. There's probably still some funny business going on in one of the startup files. If you want to experiment, at a command prompt, type this: Code:
export PS1='\u@\h:\w\$ ' Having an identical "export PS1=something" statement in multiple files won't hurt anything, but if the statement had a reference to "$PS1" in the example above, then that's a problem. If the export command at the prompt doesn't fix your problem, then there is something really strange going on. None of the software in the LFS of BLFS books should mess with the prompt at all. If there's something non-standard that's been installed, that would be a good place to start looking through documentation. |
Nope, doesn't fix the prompt.
I looked through various files (/etc/profile, /etc/profile.d/, and the bash files) I am still puzzled why this problem exists. I think the problem is with the /etc/profile file. as I have copied the /etc/profile from my gentoo install to the LFS install, and I don't get the problem. I think I will post the text from the /etc/profile that the BLFS books states. Code:
root@localhost / # cat /etc/profile.backup |
Execute this command at a command prompt:
Code:
grep -lr "PS1" /etc/* |
Nope, only /etc/bashrc and /etc/profile
|
Could you post /etc/bashrc as well?
|
Code:
bash-3.00# cat /etc/bashrc |
Honestly, I don't see anything wrong with those files.
If you want to find the culprit, then all I can suggest is start with your Gentoo version of /etc/profile and work your way back toward the LFS /etc/profile. Make a small change and see if it breaks. When/if it does break, it should give some idea where to look next. |
Whoa, whoa, whoa...
BLFS book, Chapter 3: "After LFS Configuration Issues" Slightly past the middle of the page it says: Quote:
|
There's one oddity in all this. If I press up and scroll through the list of commands I used, it'll sometimes show the prompt as it should, but only til the next command.
Doesn't seem like it helps much. Actually I just exited my chroot and re-entered the chroot, and now it appears to work. Thanks. |
All times are GMT -5. The time now is 12:39 AM. |