an interesting discussion of this very problem:
http://plan9.bell-labs.com/sys/doc/lexnames.html
On Jan 12, 2009, at 2:44 PM, Philip Guenther wrote:
On Mon, Jan 12, 2009 at 2:35 PM, Rudi Ludwig <rud...@gmx.de> wrote:
On Monday 12 January 2009 20:38:03 Philip Guenther wrote:
When the shell is started by konsole, or xterm, or login, it's
working directory has already been set to $HOME. At that point, it
can only see the physical path (sans symlinks). If you want it to
see the logical path, then you need to have it do a chdir
itself...as
you figured out when you do 'cd' first thing.
So the shell starts whereever it is put to by xterm, konsole, etc.
and does not itself evaluate $HOME at start-up?
What do you mean by 'evaluate'? It doesn't chdir there itself. It
knows HOME=/home/rudi, and it knows that its current working directory
is /usr/home/rudi, but that's it.
So, just put some logic into your .profile to cd $HOME if the
physical directory is that of $HOME.
case $PWD in
$(cd $HOME && pwd -P) ) cd $HOME;;
esac
I have put that at the end of my .profile and it works for remote
login
(ssh).
But the KDE konsole and xterm still resist and display the physical
location at start-up instead of $HOME (~).
When that happens, what do the following output?
echo $PWD
(cd $HOME && pwd -P)
echo $HOME
Philip Guenther