setting DISPLAY variable

  • Follow


Hi,

My requirement is the command below

export DISPLAY=<IP Address>:0.0

I have to set the IP Address to local windows environment while
connecting remotely to UNIX box.

I am aware that I can get the IP address of local machine using
ipconfig command from windows or using nslookup from unix box......

Since I am too lazy....is there a way to type some generic command on
unix to get the IP address of local machine from which I connect to
UNIX box?

Mehaboob

0
Reply mehaboob 6/5/2006 4:06:48 PM

In article <1149523608.524561.304460@c74g2000cwc.googlegroups.com>,
mehaboob@gmail.com wrote:
> Hi,
> 
> My requirement is the command below
> 
> export DISPLAY=<IP Address>:0.0
> 
> I have to set the IP Address to local windows environment while
> connecting remotely to UNIX box.
> 
> I am aware that I can get the IP address of local machine using
> ipconfig command from windows or using nslookup from unix box......
> 
> Since I am too lazy....is there a way to type some generic command on
> unix to get the IP address of local machine from which I connect to
> UNIX box?

You can try something like:

 export DISPLAY=$(who -m -R | awk -F '[()]' '{print $2}'):0.0

Kevin
-- 
Unix Guy Consulting, LLC
Unix and Linux Automation, Shell, Perl and CGI scripting
http://www.unix-guy.com
0
Reply Kevin 6/5/2006 9:04:25 PM


Thanks Kevin.

Kevin Collins wrote:
> In article <1149523608.524561.304460@c74g2000cwc.googlegroups.com>,
> mehaboob@gmail.com wrote:
> > Hi,
> >
> > My requirement is the command below
> >
> > export DISPLAY=<IP Address>:0.0
> >
> > I have to set the IP Address to local windows environment while
> > connecting remotely to UNIX box.
> >
> > I am aware that I can get the IP address of local machine using
> > ipconfig command from windows or using nslookup from unix box......
> >
> > Since I am too lazy....is there a way to type some generic command on
> > unix to get the IP address of local machine from which I connect to
> > UNIX box?
>
> You can try something like:
>
>  export DISPLAY=$(who -m -R | awk -F '[()]' '{print $2}'):0.0
>
> Kevin
> --
> Unix Guy Consulting, LLC
> Unix and Linux Automation, Shell, Perl and CGI scripting
> http://www.unix-guy.com

0
Reply mehaboob 6/6/2006 2:07:19 PM

2 Replies
473 Views

(page loaded in 2.439 seconds)

Similiar Articles:













7/21/2012 4:49:16 AM


Reply: