![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Six Twitter clients for the Linux desktop and one for the road | iBot | UNIX and Linux RSS News | 0 | 04-29-2008 05:30 PM |
| login in red hat linux | asutoshch | Linux | 3 | 04-03-2008 03:45 AM |
| Linux clients for three top P2P networks | iBot | UNIX and Linux RSS News | 0 | 03-20-2008 04:40 AM |
| how to find out unix server details | thopputhurai | Filesystems, Disks and Memory | 4 | 04-23-2007 07:16 AM |
| Map Drive from UNIX Server to Windows Clients | kafaween | UNIX for Dummies Questions & Answers | 3 | 09-12-2006 11:37 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
If you were connected via ssh/telnet running "netstat -n -e" from the server would show what user ids and ip addresses are connected to the server.
"netstat -e" would show user names and hostnames connecting to the server. The ipaddress and user details will also go into one of the system's log files although I you might not have access. It may sound silly but why do you need to know this? Andy Hibbins ![]() |
|
|||||
|
Thanks for the help Andy, but I had got that far already.
The problem is this: we are working using a unix box, accessed from several windows systems, usually running Hummingbird Exceed. As some of the technicians need to access the server from many locations worldwide, I need to set the $DISPLAY variable using an IP address rather than a hostname, as not all the IP's are in the DNS. I had initially thought that I could use 'netstat |grep X' to isolate the connections using an Xserver, then do the same using netstat -n to get the ip number, but this fails with multiple connections, as it is very difficult to differentiate using a script. Cheers for the help tho... -ghoti |
|
|||||
|
On my systems, <B>netstat -en </B> provides the kernel level user of the sockets (tcp, unix) , not the application level user (i.e john, harry, sally, root).
Working to automatically set the X display parameter is normally not performed with shell utilities such as netstat; but passed as environmental varialble during remote login. This is a function of the remote login protocol. Some versions of telnet automatically set the DISPLAY variable, so that when you login remotely, DISPLAY is set and exported for X to use. However, your problem seems to be that this works for you already, but you have DNS issues. I think it is possible to have the remote login session pass the IP| address in the DISPLAY environment variable. There is no reason to only pass the FQDN to $DISPLAY. As a matter of fact, if you have your remote users set the IP address in their HOSTNAME environment variable before remote login (or do this is the login script); then you will not have to worry about the DNS issues. HOSTNAME = 111.222.333.444 DISPLAY = $HOSTNAME:0.0 |
![]() |
| Bookmarks |
| Tags |
| export display, linux |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|