08-29-2001
1,
0
Join Date: Aug 2001
Last Activity: 4 September 2001, 6:00 AM EDT
Location: UK
Posts: 1
Thanks Given: 0
Thanked 0 Times in 0 Posts
X Windows
Does anyone know how I can solve this Xwindows problem out?
what i'm doing is connecting from my Windows PC to a Unix server. I would like my IP address to be passed to X automaticly so I can run XWindows. So far I'm doing the following.
finger $LOGNAME | grep from | awk '{print $9}'
this displays my IP address's that I have come from in the past
(I have DHCP) Not a static IP Address.
I would then get an output like this
(ip numbers have been changed for X's in this example)
XXX.XXX.58.22
XXX.XXX.67:0.0
XXX.XXX.64:0.0
XXX.XXX.64:0.0
XXX.XXX.64.215:0
My latest IP adderss is always at the bottom. How do I then extract this and output it to a file ?
Once I can do that I can automate the rest in a script:
MYIP=`finger $LOGNAME | grep from | awk '{print $9}' .........`
DISPLAY=MYIP
export DISPLAY
xclock
Thanks in advance
[000000]