Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 Mar 2003 23:57:51 -0500
From:      David Banning <david@skytracker.ca>
To:        Daxbert <daxbert_news@dweebsoft.com>
Cc:        questions@freebsd.org
Subject:   Re: identifying my network address
Message-ID:  <20030309235751.B53727@skytrackercanada.com>
In-Reply-To: <1047268134.3e6c0b263d124@ra.dweebsoft.com>; from daxbert_news@dweebsoft.com on Sun, Mar 09, 2003 at 07:48:54PM -0800
References:  <1047268134.3e6c0b263d124@ra.dweebsoft.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Mar 09, 2003 at 07:48:54PM -0800, Daxbert wrote:
> Quoting David Banning <david@skytrackercanada.com>:
> 
> > 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030309235751.B53727>