Operating System - HP-UX
1843895 Members
2215 Online
110225 Solutions
New Discussion

Re: obtaining ip address of rcmd'ing client

 
SOLVED
Go to solution
Mark Henry_1
Frequent Advisor

obtaining ip address of rcmd'ing client

Hi All,

I'm trying to write a script which will launch an xterm from an rcmd from a client machine, but first set the display variable based on the ip address of my connecting client.. is there a way to identify from netstat or some other utility what that address is?

Many thanks,

Mark
2 REPLIES 2
Sridhar Bhaskarla
Honored Contributor
Solution

Re: obtaining ip address of rcmd'ing client

Hi Mark,

Try with last -R -1 |awk '{print $3}'`
on the remote system.

This should give out the IP/Hostname of the system that is running the rcmd client. You can use it to set the DISPLAY.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Mark Henry_1
Frequent Advisor

Re: obtaining ip address of rcmd'ing client

wow! brilliant! thanks!

cheers,

Mark