LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 12-19-2006, 05:42 AM   #1
arnuld
Member
 
Registered: Dec 2005
Location: Punjab (INDIA)
Distribution: Arch
Posts: 211

Rep: Reputation: 30
live CD 6.2 install trouble


hai all,

this is my very 1st post & also my 1st try at LFS.

installtion from LiveCD 6.2 works fine. i only had a trouble at one place.when i issue the command:

"source ~/.bash_profile"

i get an error,something like:

-su "u:w$": command not found

[ i checked the file ".bash_profile" to make sure that it contains this line:

"exec env -i HOME=$HOME TERM=$TERM PS1=`\u:\w\$ ` bin/bash"


i know, PS1 here has "ticks" not "inverted commas" ]

i tried to ignore it but after the error i can't get back my "$" sign of "user at command-line", even Ctrl-C does not help. Ctrl-D helps & logs out but when i do:

su - lfs


to login, i get same error. what could be the trouble?

also why a "space" after "$" in "PS1"?
 
Old 12-19-2006, 05:49 AM   #2
Narc0tiq
LQ Newbie
 
Registered: Dec 2006
Posts: 15

Rep: Reputation: 0
Try
Code:
exec env -i HOME=$HOME TERM=$TERM PS1="\u:\w\$ " bin/bash
. That's quotes, not backticks.

To explain: PS1 is the default prompt. The backtick (`) character is the execution character - it tells bash to execute the command inside backticks as if you'd written it on the command line. Since there is no command called "\u\w\$" (as well there shouldn't be!), bash will fail to make any sense of it, and will unset PS1, which makes your prompt a null string.

The space after the \$ in the PS1 string is simply that - an extra space, so that when you type commands at the command line they show up after a space, instead of immediately after the $ or # sign. You can try it without it, too.

To fix this problem after you've given the wrong command, use
Code:
export PS1="\u:\w\$ "
(again, quotes, not backticks. Backticks are for executing commands and stealing their output.

Hope this helps.

Last edited by Narc0tiq; 12-19-2006 at 05:50 AM.
 
Old 12-19-2006, 11:56 AM   #3
arnuld
Member
 
Registered: Dec 2005
Location: Punjab (INDIA)
Distribution: Arch
Posts: 211

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by Narc0tiq
Try
Code:
exec env -i HOME=$HOME TERM=$TERM PS1="\u:\w\$ " bin/bash
. That's quotes, not backticks.

To explain: PS1 is the default prompt. The backtick (`) character is the execution character - it tells bash to execute the command inside backticks as if you'd written it on the command line. Since there is no command called "\u\w\$" (as well there shouldn't be!), bash will fail to make any sense of it, and will unset PS1, which makes your prompt a null string.

The space after the \$ in the PS1 string is simply that - an extra space, so that when you type commands at the command line they show up after a space, instead of immediately after the $ or # sign. You can try it without it, too.
thanks a lot buddy, you helped a lot. i think LFS handbook needs to be modified as it shows "ticks" not "backquotes" in both online & download versions.

Quote:
To fix this problem after you've given the wrong command, use
Code:
export PS1="\u:\w\$ "
(again, quotes, not backticks. Backticks are for executing commands and stealing their output.
well, in the meantime i tried Gentoo. after a try at LFS, Gentoo feels like a breeze. now i will install LFS again :-)

Quote:
Hope this helps.
Of course, you solved my entire problem. really thanks a lot :-)
 
Old 12-19-2006, 01:16 PM   #4
Narc0tiq
LQ Newbie
 
Registered: Dec 2006
Posts: 15

Rep: Reputation: 0
Quote:
Originally Posted by arnuld
thanks a lot buddy, you helped a lot. i think LFS handbook needs to be modified as it shows "ticks" not "backquotes" in both online & download versions.
Actually, those are single-quotes, i.e. apostrophes. Different from the backtick in that one of them is the key to the right of the semicolons (";"), and the other is the key to the left of the 1 key. Yes, programmers have to deal with this all day long.

Quote:
Originally Posted by arnuld
well, in the meantime i tried Gentoo. after a try at LFS, Gentoo feels like a breeze. now i will install LFS again :-)
Aye, you should play with Gentoo a bit - it's a nice, clean system, and quite enjoyable.

Quote:
Originally Posted by arnuld
Of course, you solved my entire problem. really thanks a lot :-)
I only pointed out a syntax error. No need to thank me.

Last edited by Narc0tiq; 12-19-2006 at 01:17 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Soundblaster Live 5.1 Having trouble playing midi GameboyHippo Linux - Hardware 2 10-22-2006 02:27 AM
Slax Live CD Trouble Waterfox Linux - General 3 04-06-2006 04:04 PM
Slax Live CD Trouble Waterfox Linux - Software 8 04-05-2006 04:31 PM
SB Live 5.1 Plat Trouble CarnageBox Fedora 2 12-31-2004 09:48 PM
sb live trouble, detects but no sound in most apps mike9004 Linux - Hardware 4 04-24-2004 11:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 11:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration