Path: utzoo!attcan!uunet!wuarchive!uwm.edu!lll-winken!gauss.llnl.gov From: casey@gauss.llnl.gov (Casey Leedom) Newsgroups: comp.windows.x Subject: Should the X11 library install DISPLAY in the environment? Message-ID: <69430@lll-winken.LLNL.GOV> Date: 8 Oct 90 13:55:23 GMT Sender: usenet@lll-winken.LLNL.GOV Organization: Lawrence Livermore National Laboratory Lines: 45 I execute xrn out of my twm menu via: !"rsh gauss.llnl.gov -n xrn -display $RDISPLAY \ '&/dev/null' '&' &" This means that the environment that xrn inherits is very sparse. Ex: HOME=/u0/casey PATH=/u0/casey/bin:/usr/local/bin/mh:/usr/local/bin/X11:... PWD=/u0/casey SHELL=/bin/csh USER=casey (In fact I only get a PATH because I moved my csh ``set path = ...'' out of the ``if ($?prompt) then ... endif'' interactive csh commands section.) Note that, in particular, DISPLAY isn't defined ... This means that my xrn.editorCommand of ``xterm -e ...'' fails because xterm inherits that same sparse environment from xrn so xterm can't figure out what my display is. My question is: should XOpenDisplay or XtInitialize or some other X11 connection initialization routine pump DISPLAY into the environment? If it did, then xrn opening a connection to the display would cause DISPLAY to be put into the environment solving my problem. In any case, I've decided to do two things for now: 1. Change my twm menu entry to: !"rsh gauss.llnl.gov -n setenv DISPLAY $RDISPLAY \; \ xrn -display $RDISPLAY \ '&/dev/null' '&' &" 2. Modify and submit a bug fix to xrdb to add DISPLAY as one of the xrdb supplied defines. SERVERHOST isn't good enough since I have a GraphOn OptimaX at home which might start up with almost any display number. This will allow me to specify my xrn.editorCommand as ``xterm -display DISPLAY -e ...'' in my xrdb loaded resources. Casey