Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!usc!sdd.hp.com!decwrl!sgi!shinobu!odin!mikey From: mikey@sgi.com (Mike Yang) Newsgroups: comp.sys.sgi Subject: Re: X windows Keywords: xrdb, .Xdefaults Message-ID: <1991Jan10.213510.28825@odin.corp.sgi.com> Date: 10 Jan 91 21:35:10 GMT References: <1991Jan10.135009@crocus.medicine.rochester.edu> <1991Jan10.212610.28600@odin.corp.sgi.com> Sender: news@odin.corp.sgi.com (Net News) Organization: Silicon Graphics, Inc. Lines: 49 In article <1991Jan10.212610.28600@odin.corp.sgi.com> msc@sgi.com writes: >There is a race condition here. The news server executes the forkunix and >goes on to the next item. Some time later, the client that was forked >actually runs. Therefore it is possible that abiff and xcal are getting to >run before xrdb has run. > > ... > >Of the top of my hea, I'd say put these commands in a shell script that >waits for the Xrdb calls to finish before running the other clients. You >can call this shell script from your user.ps. Yes, this is what I do. In my user.ps, I have: /RestartActions [ { (.4sight/Shells) seqfork } { (.4sight/Hosts) seqfork } { (demochest) seqfork } { (/usr/people/mikey/bin/xsession) seqfork } ] def Then, my xsession file looks like: #!/bin/csh if (! $?DISPLAY) setenv DISPLAY "eukanuba.wpd.sgi.com:0" mwm & xrdb -load /usr/people/mikey/.Xdefaults -retain xsetroot -solid '#004660' sleep 10 dxbiff & xclock & ... Note that I give xrdb "-retain." Because the X server resets itself when it has no clients, this switch causes xrdb's effect to persist. And since xrdb is allowed to exit before clients get started, its effect is noticed by the clients. The "sleep 10" is just so that mwm gets started before the first client comes up. ----------------------------------------------------------------------- Mike Yang Silicon Graphics, Inc. mikey@sgi.com 415/335-1786