Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Differrent prompt for remote machines
- X-seq: zsh-users 3786
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: "E. Jay Berkenbilt" <ejb@xxxxxx>
- Subject: Re: Differrent prompt for remote machines
- Date: Sun, 1 Apr 2001 04:41:50 +0000
- Cc: zsh-users@xxxxxxxxxx
- In-reply-to: <200104010353.f313rvu04868@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <E14jJc8-0002oE-00@xxxxxxxxxxxxxxxxxx> <1010331191449.ZM8000@xxxxxxxxxxxxxxxxxxxxxxx> <200104010353.f313rvu04868@xxxxxxxxxxxxxx>
On Mar 31, 10:53pm, E. Jay Berkenbilt wrote:
}
} I determine whether I'm remote using this C program I wrote. I've
} tested it only linux. It uses the fact that most well-behaved remote
} login daemons make sure that your tty's utmp entry contains the host
} from which you logged in if you are logged in remotely.
This is essentially the same as [[ "${$(who am i)%%!*}" = $HOST ]]. It's
a reasonable approach, but it doesn't work when `XTerm*UtmpInhibit: true',
nor when e.g. `xon remotehost xterm' was used, nor when ssh is performing
X11 port-forwarding. Unless I'm missing something?
(Where "doesn't work" means that those three cases will report unknown,
local, and local, respectively, I believe.)
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
Messages sorted by:
Reverse Date,
Date,
Thread,
Author