LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-28-2006, 09:15 PM   #1
JesseMor
LQ Newbie
 
Registered: Sep 2004
Posts: 22

Rep: Reputation: 15
Question 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
 
Old 01-28-2006, 09:25 PM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
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?
 
Old 01-28-2006, 09:56 PM   #3
irpstrcr
Member
 
Registered: Mar 2005
Location: LAX
Distribution: Slackware
Posts: 40

Rep: Reputation: 15
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:~$
 
Old 01-29-2006, 08:39 AM   #4
JesseMor
LQ Newbie
 
Registered: Sep 2004
Posts: 22

Original Poster
Rep: Reputation: 15
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.
 
Old 01-29-2006, 12:53 PM   #5
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
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?
 
Old 01-29-2006, 04:14 PM   #6
JesseMor
LQ Newbie
 
Registered: Sep 2004
Posts: 22

Original Poster
Rep: Reputation: 15
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
 
Old 01-29-2006, 04:49 PM   #7
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
Unfortunately I haven't been able to get it to behave that way here Sorry I wasn't able to help.
 
  


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
Jailed Home Dir tdkratboy Linux - Security 10 06-19-2010 07:51 AM
Can't write to home dir. Mirari Linux - General 5 05-22-2005 02:42 PM
howto make a dir shared that is not in my home dir Schmurff Linux - Newbie 2 06-19-2004 07:54 PM
How to retrieve my my /home/name Dir from lost+found? orranview Linux - Newbie 2 03-21-2004 04:49 AM
home dir vsftpd ilengna Linux - Networking 7 10-14-2003 07:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:57 PM.

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