X windows

Mike Yang mikey at sgi.com
Fri Jan 11 08:35:10 AEST 1991


In article <1991Jan10.212610.28600 at odin.corp.sgi.com> msc at 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 at sgi.com           415/335-1786



More information about the Comp.sys.sgi mailing list