Dynamically Set Env. Variable To Client Ip Address

j_70 at comcast.net j_70 at comcast.net
Wed Feb 22 13:23:25 UTC 2006


Thanks that works great! Could you (or anyone) recommend good resources for learning bash, sed, awk  and other useful sysadmin tools. If this is the wrong forum for this question, my apologies and let the thread die.


 -------------- Original message ----------------------
From: "Miner, Jonathan W (CSC) (US SSA)" <jonathan.w.miner at baesystems.com>
> 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