On Monday 12 January 2009 17:41:09 mhe...@gmail.com wrote:

> > within an xsession or when login in remotely via ssh the initial
> > path
> >
> > is always: /usr/home/ despite $PATH being /home/
> >
> > That is, xterm initially reads: ibook:/usr/home/rudi$
> >
> > instead of just: ibook:~$
> >
> >
> >
> > Is this a configuration issue or a bug/feature of xterm?
>
> xterm is innocent here. It is the shell running inside xterm that
> displays the prompt.
>
> Which shell are you using, how did you configure the prompt?
>
> with ksh(1), using "export PS1='\h:\w$ '" to define the prompt, I get
> the correct result most of the time, even if /bin/pwd reports
> /usr/home/matthieu.
>
> Other shells may behave differently.

okay it is korn shell:
line from /etc/passwd
rudi:*:100:100:Rudi:/home/rudi:/bin/ksh

my .profile reads:
# $OpenBSD: dot.profile,v 1.4 2005/02/16 06:56:57 matthieu Exp $
#
# sh/ksh initialization

PATH=$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/local/bin:/usr/
local/sbin:/usr/games:.
export PATH HOME TERM

EDITOR=vi; export EDITOR
EXINIT='set autoindent'; export EXINIT
PAGER=less; export PAGER

PS1='\h:\w$ '; export PS1

set -o vi

umask 0022


Opening a new Konsole in KDE and trying some commands:
ibook:/usr/home/rudi$ /bin/pwd
/usr/home/rudi
ibook:/usr/home/rudi$ cd
ibook:~$ /bin/pwd
/usr/home/rudi
ibook:~$ echo $HOME
/home/rudi
ibook:~$ echo $PWD
/home/rudi
ibook:~$

To me the issue is mostly cosmetic, but I have to admit that the
first command I type in is almost always "cd"  to get a short and
readable command prompt. And I would like to avoid that extra.

Rudi

Reply via email to