Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!ucsd!swrinde!cs.utexas.edu!helios!diamond!rajeshg From: rajeshg@diamond.tamu.edu (Rajesh Godbole) Newsgroups: comp.windows.x Subject: Re: X-windows DISPLAY environment variable Keywords: DISPLAY Message-ID: <6326@helios.TAMU.EDU> Date: 3 Jul 90 20:45:14 GMT References: <331@ge1cbx.UUCP> Sender: usenet@helios.TAMU.EDU Reply-To: rajeshg@diamond.tamu.edu (Rajesh Godbole) Distribution: usa Organization: Texas A&M University Lines: 26 In article <331@ge1cbx.UUCP>, gerald@ge1cbx.UUCP (Gerald Aden) writes: |> I am trying to figure out a way to automatically resolve |> and set the DISPLAY environment variable when someone logs |> into one of our systems from X-terminals using telnet and rlogin. |> I know that there must be some way to resolve the IP name or address |> of someone who is logging into a system. Can anyone think of a way to |> do this such that it could be incorporated a part of the login process |> (i.e. put in .login or .profile). |> try this: alias set_display 'set t=`finger -s $USER`;setenv DISPLAY `echo $t[13]`:0.0' set q=`finger -s $USER | grep co` if ($q == "") eval set_display >>& /dev/null i put this in my login file, it sets the DISPLAY variable to `logged-on-from`:0.0 if you're not logged on to the console of your machine. Rajesh Godbole, | preferred: rajeshg@diamond.tamu.edu Department of Electrical Engineering. | otherwise: godbole@eemips.tamu.edu Texas A&M University, College Station. | (409) 696-9528. ------------------------------------------------------------------------------