From owner-freebsd-questions Sun Mar 9 20:58: 7 2003 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 E9F6037B401 for ; Sun, 9 Mar 2003 20:58:05 -0800 (PST) Received: from mail.clubplus.net (mail.clubplus.net [216.191.22.200]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0B5B443FAF for ; Sun, 9 Mar 2003 20:58:05 -0800 (PST) (envelope-from david@skytrackercanada.com) Received: from skytrackercanada.com (cust29.209.188.66.dsl.accessv.com [209.188.66.29]) by mail.clubplus.net (8.12.7/8.12.7) with ESMTP id h2A4wdui027045; Sun, 9 Mar 2003 23:58:41 -0500 Received: (from root@localhost) by skytrackercanada.com (8.12.6/8.12.6) id h2A4vquD053941; Sun, 9 Mar 2003 23:57:52 -0500 (EST) (envelope-from david@skytrackercanada.com) Received: from skytrackercanada.com (localhost [127.0.0.1]) by skytrackercanada.com (8.12.6/8.12.6) with ESMTP id h2A4vpAj053915; Sun, 9 Mar 2003 23:57:51 -0500 (EST) (envelope-from david@skytrackercanada.com) Received: (from david@localhost) by skytrackercanada.com (8.12.6/8.12.6/Submit) id h2A4vpqc053914; Sun, 9 Mar 2003 23:57:51 -0500 (EST) (envelope-from david) Date: Sun, 9 Mar 2003 23:57:51 -0500 From: David Banning To: Daxbert Cc: questions@freebsd.org Subject: Re: identifying my network address Message-ID: <20030309235751.B53727@skytrackercanada.com> References: <1047268134.3e6c0b263d124@ra.dweebsoft.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <1047268134.3e6c0b263d124@ra.dweebsoft.com>; from daxbert_news@dweebsoft.com on Sun, Mar 09, 2003 at 07:48:54PM -0800 X-scanner: scanned by Inflex 1.0.12.3 - (http://pldaniels.com/inflex/) X-RAVMilter-Version: 8.4.2(snapshot 20021217) (mail) Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, Mar 09, 2003 at 07:48:54PM -0800, Daxbert wrote: > Quoting David Banning : > > > I am running an Xwindow on a windows box. I need a script to > > tell me what my network address is so that I can set my DISPLAY > > varible correctly eg: 192.168.1.2:0.0 > > > > Any idea what command would be useful for this purpose? > > > > DISPLAY=`who -m | awk '{print $6}' | sed -e 's/[(|)]//g'`:0.0 Nope. That give the IP of the server to the outside world; What who gives me is the name of the machine, but that seems to work; CHANTELLE:0.0 I guess becuase it looks it up in /etc/hosts thanks - To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message