Article View: comp.windows.x
Article #24870Re: DISPLAY capture
From: glen
Date: Tue, 12 Jan 1993 23:36
Date: Tue, 12 Jan 1993 23:36
27 lines
1103 bytes
1103 bytes
>
> I would like to know how the UNIX .profile or .cshrc file can be set to
> capture the IP address of the terminal you log into so that the DISPLAY
> variable can be automatically set for a X session.
>
Put the following in your .login:
# Set the DISPLAY variable automatically on rlogins to different machines
setenv HOST `hostname`
setenv DISPLAY unix:0.0
set me = `who am i`
if ($#me == 6) then
setenv DISPLAY `echo $me[6] | sed 's/(\([^:]*\).*)/\1:0/'`
if ($DISPLAY == "unix:0") then
setenv DISPLAY "${HOST}:0"
endif
endif
unset me
--------------------------------
Glen R. Geisen
glen@iis.sun.com
International Imaging Systems
Milpitas, California, USA
408.432.3400 x251
--------------------------------
Technical Details
Message-ID:
<9301122336.AA09535@rigel>Path:
arc1-ca.pugleaf.net!sparky!uunet!enterpoop.mit.edu!bloom-beacon!INTERNET!dont-send-mail-to-path-linesShow Full Headers
Complete Article Headers
Newsgroups: comp.windows.x Path: arc1-ca.pugleaf.net!sparky!uunet!enterpoop.mit.edu!bloom-beacon!INTERNET!dont-send-mail-to-path-lines From: glen@iis.UUCP Subject: Re: DISPLAY capture Message-ID: <9301122336.AA09535@rigel> Sender: root@athena.mit.edu (Wizard A. Root) Organization: The Internet Date: Tue, 12 Jan 1993 23:36:18 GMT Lines: 27