[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

RE: Dynamically Set Env. Variable To Client Ip Address



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 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 redhat com on behalf of j_70 comcast net
> Sent:	Tue 02/21/2006 06:24 PM
> To:	redhat-list 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 redhat com?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list
> 
> 
> 
> 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]