Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!usc!elroy.jpl.nasa.gov!decwrl!sgi!shinobu!odin!ramoth.esd.sgi.com!msc From: msc@ramoth.esd.sgi.com (Mark Callow) Newsgroups: comp.sys.sgi Subject: Re: X windows Keywords: xrdb, .Xdefaults Message-ID: <1991Jan10.212610.28600@odin.corp.sgi.com> Date: 10 Jan 91 21:26:10 GMT References: <1991Jan10.135009@crocus.medicine.rochester.edu> Sender: news@odin.corp.sgi.com (Net News) Reply-To: msc@sgi.com Organization: Silicon Graphics Inc., Entry Systems Division Lines: 40 In article <1991Jan10.135009@crocus.medicine.rochester.edu>, ajp2o@crocus.medicine.rochester.edu (Anthony J. Persechini) writes: |> I have been having problems figuring out how to |> build an X resource database for a few applications, |> |> /RestartActions [ |> { (gamma 1.0) forkunix } |> { RunConsole } |> { (/usr/bin/X11/xrdb -merge /usr/people/ajp2o/.idraw) forkunix } |> { (/usr/bin/X11/xrdb -merge /usr/lib/X11/app-defaults/XCal) forkunix } |> { (/usr/bin/X11/xsetroot -solid deepskyblue3) forkunix } |> { (.4sight/hostchest) forkunix } |> { (.4sight/newschest) forkunix } |> { (.4sight/modelchest) forkunix } |> { (/usr/local/X11/bin/xbiff -geometry +20+167 -bg skyblue2 -fg red |> -hide) forkunix } |> { (/usr/local/X11/bin/xcal -bg skyblue2 -fg midnightblue -geometry |> 90x25+20+289) forkunix } |> ] def |> |> Sometimes fails, or perhaps only one of the rdb lines works. I have |> tried 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. The way we worked around this for NeWS clients was to use "seqfork" instead of "forkunix". This waits for something to connect to the NeWS server before continuing thereby forcing everything to happen in sequence. Seqfork won't work in this case because the X clients don't talk to the NeWS server. 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. -- From the TARDIS of Mark Callow msc@ramoth.sgi.com, ...{ames,decwrl}!sgi!msc "Spirits of genius are always opposed by mediocre minds" - Albert Einstein