Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!tank!mimsy!alberto From: alberto@tove.umd.edu (Jose Alberto Fernandez R) Newsgroups: comp.windows.x Subject: Re: Figuring out the right DISPLAY variable when you rlogin. Message-ID: Date: 27 Apr 89 04:51:22 GMT References: <2647@buengc.BU.EDU> <19688@iuvax.cs.indiana.edu> <2475@helios.ee.lbl.gov> <8054@boring.cwi.nl> Sender: nobody@mimsy.UUCP Organization: University of Maryland Computer Science Lines: 50 In-reply-to: guido@cwi.nl's message of 25 Apr 89 15:20:28 GMT For csh and tcsh users this group of aliases perform the connection with the remote system and starts the X11 application. ---- CUT HERE ------ #X environment, remote connection. #This alias must recide in your .cshrc or .tcshrc #You need to have this alias in both sides of the connection #and be able to RLOGIN without password verification. #This alias (called ">" ) starts a login XTERM in the remote machine, #is call as: # > hostname [-l user] # alias ">" '>> "\!*" xterm -n \!:1 -ls' #This alias (">>") is used to start any remote xapplication that you want, #is call as: # >> "host [-l user]" prog args.... # # The first argument is the parameters for RSH alias ">>" '(set m=\!:1;rsh $m -n "<<" $DISPLAY \!:2-* )/dev/null' #This alias ("<<") is the receptor in the remote system. #is call in the remote connection as: # << display_server prog args... alias "<<" '(setenv DISPLAY \!:1 ; \!:2-* ) /dev/null&' ------- CUT HERE --------- All the process are running in the background and are connected directly to the server. I used this alias in my .xinitrc to start XMH in my main acount. If you want to used this aliases in menus of your window manager, be sure that the subprocess is using CSH or TCHSH and not SH. One way to deal with that is by specifying in TWM or UWM the command as: !"exec $SHELL -c 'command ...' &" -- Jose Alberto. -- :/ \ Jose Alberto Fernandez R | INTERNET: alberto@tove.umd.edu :| o o | Dept. of Computer Sc. | :| ^ | Univesity of Marylad | :\ \_/ / College Park, MD 20742 |