From owner-freebsd-questions@FreeBSD.ORG Sun Aug 22 22:41:54 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5AB8616A4CF for ; Sun, 22 Aug 2004 22:41:54 +0000 (GMT) Received: from sage.thought.org (dsl231-043-140.sea1.dsl.speakeasy.net [216.231.43.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id DA0CC43D48 for ; Sun, 22 Aug 2004 22:41:53 +0000 (GMT) (envelope-from kline@tao.thought.org) Received: from thought.org (tao [10.0.0.247]) by sage.thought.org (8.12.10/8.12.10) with ESMTP id i7MMfpoK006326 for ; Sun, 22 Aug 2004 15:41:52 -0700 (PDT) (envelope-from kline@tao.thought.org) Received: from tao.thought.org (localhost [127.0.0.1]) by thought.org (8.12.11/8.12.11) with ESMTP id i7MMfnQc060926 for ; Sun, 22 Aug 2004 15:41:50 -0700 (PDT) (envelope-from kline@tao.thought.org) Received: (from kline@localhost) by tao.thought.org (8.12.11/8.12.11/Submit) id i7MMfn1O060925 for freebsd-questions@FreeBSD.ORG; Sun, 22 Aug 2004 15:41:49 -0700 (PDT) (envelope-from kline) Date: Sun, 22 Aug 2004 15:41:48 -0700 From: Gary Kline To: FreeBSD Mailing List Message-ID: <20040822224148.GA60895@thought.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Organization: Thought Unlimited. Public service Unix since 1986. X-Of_Interest: Observing 18 years of service to the Unix community User-Agent: Mutt/1.5.6i Subject: How can I tell if I'm ssh'd into a host? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Aug 2004 22:41:54 -0000 This is a strange one. On different hosts in my ~/.zlogin, I test for `hostname` = HOST.thought.org If true, I do certain things such as set xhost FOO and xmodmap ~/.xmodmaprc... I've noticed that with my 5-CURRENT on my laptop, I get complains from xhost and naturally, xmodmap. Is there a way of asking where I am on the console/KVM, or remote and ssh'd? Sorry if I''m not explaining this well. --I didn't notice these complains when I had 4.10 on my laptop. Aside from having .zlogin prompt: "Are you ssh'd in? [y/[n]] " I'm drawing a blank. thanks, people, gary -- Gary Kline kline@thought.org www.thought.org Public service Unix