linux-users archive

Re: $HOME weirdness


New Message Reply Date view Thread view Subject view Author view

From: AG (email_suppressed_at_lugwash.org)
Date: Fri 27-Oct-2006 06:46:27 PM EDT


> $HOME/.bash_profile (and .bashrc) are not required. They are there in
> case the user wants to make changes to their own profile for each
> login. In fact, the clause "[ -f $HOME/.bash_profile ] && .
> $HOME/.bash_profile" says if there is a $HOME/.bash_profile then source it"
>
> This is definately a weird on (as you aptly named your message). You
> might want to try this:
>
> env | grep username
>
> Replacing 'username' with the genuine article. This would show you all
> references to your username in the environment, there might be a tip off
> there.

Problem solved.. Somehow the $HOME variable was modified. Instead of the
default '/home/username' it had been changed to 'username/'

So naturally, running 'cd ~' would force bash to complain.
I discovered the problem by using one of the earlier tips..

Running 'env | grep username' revealed the 'username/'

To fix, I simply ran 'export HOME=/home/username/
All seems to be well now.

What is still weird is that X seems to retain different variable
settings than the console. (Someone asked this question earlier) In the
console, running 'env | grep username' revealed the desired value for
$HOME variable. Not sure why this is the case.

Could someone please educate me?

Thx again for helping me solve the brain teaser..

--
***  Sent from [e-mail suppressed]  ***  http://www.lugwash.org
to unsubscribe: `echo "unsubscribe" | mail [e-mail suppressed]`

New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.1.5 : Wed 01-Nov-2006 01:00:01 AM EST