From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: "E. Jay Berkenbilt" <ejb@ql.org>
Cc: zsh-users@sunsite.dk
Subject: Re: Differrent prompt for remote machines
Date: Sun, 1 Apr 2001 04:41:50 +0000 [thread overview]
Message-ID: <1010401044150.ZM8759@candle.brasslantern.com> (raw)
In-Reply-To: <200104010353.f313rvu04868@soup.in.ql.org>
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
next prev parent reply other threads:[~2001-04-01 4:43 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-03-30 9:42 Dominik Vogt
2001-03-30 9:59 ` Andrej Borsenkow
2001-03-30 10:48 ` Dominik Vogt
2001-03-30 15:55 ` Bart Schaefer
2001-03-31 11:32 ` Zefram
2001-03-31 18:26 ` Stephane Bortzmeyer
2001-03-31 19:14 ` Bart Schaefer
2001-04-01 3:53 ` E. Jay Berkenbilt
2001-04-01 4:41 ` Bart Schaefer [this message]
2001-03-31 18:26 ` Stephane Bortzmeyer
2001-04-04 17:21 ` Dominik Vogt
2001-04-02 20:46 ` Matt Pharr
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1010401044150.ZM8759@candle.brasslantern.com \
--to=schaefer@candle.brasslantern.com \
--cc=ejb@ql.org \
--cc=zsh-users@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).