ian@BUCASB.BU.EDU (Ian Boardman) (10/15/89)
[This is a slightly edited copy of a message I posted around BU, which eventually received the reply that I should post to xperts] I am trying to configure xdm for the Center for Adaptive Systems at BU, where we run 3 Sun386i's, 1 Sun4, and plan a dozen or so NCD Xterminals to be talking to these hosts. I started from copies of the various setup files in cs.bu.edu:/usr/lib/X11/xdm. I find that xterms fired up from the ~/.xsession don't have their DISPLAY variable set as claimed by our xterm man page. Now, xdm knows what the DISPLAY is, since its in the Xserver file and nothing would work from xdm if it didn't. So why doesn't xterm know it (or set it)? I also find that twm popup menu commands (such as lauching an rlogin in a new xterm) that worked when I launched X stuff by hand (i.e. sh .xsession) aren't run now because the command can't be found. I assume that xdm doesn't pass down the PATH it supposedly has been given in the xdm-config file's DisplayManager.DISPLAY.userPath resource, else this wouldn't occur. So it shows more evidence that some envariables aren't being passed down to the shell that runs my ~/.xsession. Does that sound right? What might cause that? [later...] On further investigation it seems the problem is that the sh exec'd from Xsession doesn't get the envariables supposedly assigned by the DisplayManager.DISPLAY resources. If I ask twm to do "set" (its running from the sh (1)), I find it has some basic defaults for PATH, etc, rather than what was set in the DisplayManager resources in xdm-config. So when twm is asked to "rxterm <host>" it doesn't find rxterm cause the PATH in its shell (the one running twm) wasn't set properly. I tested and found that variables exported by a sh (1) carry through to the exec'd sh. So it would seem that the DISPLAY resources are not set when "exec /bin/sh $HOME/.xsession" is performed. Although I get no errors about or due to improperly set resources, that's where the trail has led me so far. I am running some X11R3, and the binary runs on a Sun4, copied several moons ago from bu-it.bu.edu. So if you know of related bugs in your binaries please let me know. Thanks. Any suggestions?