Dynamically Set Env. Variable To Client Ip Address

Miner, Jonathan W (CSC) (US SSA) jonathan.w.miner at baesystems.com
Wed Feb 22 13:12:55 UTC 2006


One method is to add this to their login scripts:

t=`tty | sed 's%/dev/%%'`
export DISPLAY=`who | awk '$2 == t {print $NF":0"}' t=$t | sed 's%(%%;s%)%%'`


-----Original Message-----
From:	redhat-list-bounces at redhat.com on behalf of j_70 at comcast.net
Sent:	Tue 02/21/2006 06:24 PM
To:	redhat-list at redhat.com
Cc:	
Subject:	Dynamically Set Env. Variable To Client Ip Address

Does anyone know of a way to grab the client's IP address and assign it to the DISPLAY environment variable. I want to do this for users that use X displays but due to DHCP may not have the same IP every time they log in. Thanks.

-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request at redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list





More information about the redhat-list mailing list