Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
01-28-2006, 09:15 PM
|
#1
|
LQ Newbie
Registered: Sep 2004
Posts: 22
Rep:
|
lost~ indicating home dir
I replaced my corrupted /etc/profiles and now when I login, the ~ that used to be there that indicated home directory is missing.
I can put in the \w option to show current working directory & it then shows up, but I don't want all that text for working directory. I just want it back like it was before with just computer name:~$ _.
Ideas?
JesseMor
|
|
|
01-28-2006, 09:25 PM
|
#2
|
Senior Member
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141
Rep: 
|
From memory, the HOME variable is populated by the login process based on the value in your /etc/passwd entry. Was your passwd file corrupted as well?
|
|
|
01-28-2006, 09:56 PM
|
#3
|
Member
Registered: Mar 2005
Location: LAX
Distribution: Slackware
Posts: 40
Rep:
|
In your /etc/profile find where you stated your default prompt
and change it to:
PS1='\u@\h:\w\$ '
Is the slackware default and prolly what you are looking todo
user@host:~$
|
|
|
01-29-2006, 08:39 AM
|
#4
|
LQ Newbie
Registered: Sep 2004
Posts: 22
Original Poster
Rep:
|
PS1='\u@\h:\w\$ '
No, that puts up user@host:/home~$ _ or bill@bigboy:/financial$ _. I don't want the "home" or "financial" part i.e., the part called up by \w. But when I leave out the \w I lose the ~ when I log in to home directory.
|
|
|
01-29-2006, 12:53 PM
|
#5
|
Senior Member
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141
Rep: 
|
Just so I'm using the same terms you are, a \w puts in the working directory, a \W puts the basename of the working directory. The ~ you want to display is used by bash as shorthand for your home directory.
Sorry, to harp on this, but can you check that $HOME is set to /home/bill and $SHELL is set to /bin/bash?
|
|
|
01-29-2006, 04:14 PM
|
#6
|
LQ Newbie
Registered: Sep 2004
Posts: 22
Original Poster
Rep:
|
Yes, I agree with your statements about \W and \w and have changed and observed these. Yes, $HOME is set to /home/bill and $SHELL is /bin/bash.
But, the only way I can get the ~ to show when in the users home directory (as specified in passwd) is to use either \W or \w and what I was trying to do was to get the shorthand indicator ~ to show without the directory name(s) showing, as they do when I use \W or\w. I think I remember it being this way before, but we all know about memories, so maybe it was never as I think I remember and maybe what I want isn't possible to set up.
Thanks for sticking with me on this,
Jesse
|
|
|
01-29-2006, 04:49 PM
|
#7
|
Senior Member
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141
Rep: 
|
Unfortunately I haven't been able to get it to behave that way here  Sorry I wasn't able to help.
|
|
|
All times are GMT -5. The time now is 08:57 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|