[comp.windows.x] xsetroot in startup file

tsf@theory.cs.cmu.edu (Timothy Freeman) (04/13/87)

Here's how I start up X V10R4 on my Sun 3/160 running release 3.0 of
the OS:

#! /bin/csh -f
setenv DISPLAY ${HOST}:0
xinit xruncomm -- Xsun 0 -l -a 3 -t 10

and here's a version of my xruncomm file which exhibits my problem:

#!/bin/csh -f
xsetroot -bitmap /usr/tsf/bitmaps/black.bitmap unix:0
sleep 30

The perverse result of all this is that the call to xsetroot briefly
displays the bitmap I want when the server starts, but that pattern is
immediately written over with the mundane default grey.  

When I run xsetroot outside of my startup file, it works fine.

There was a post with a fix for xinit which waits for the server to
start up all the way before invoking xruncomm (or whatever other
process the user specified).  I've tried using the changed xinit, but
it didn't help.

This doesn't seem to be a timing problem.  I can put a 10 second sleep
before the call to xsetroot without it making any difference.

Has anyone else encountered this problem?
--
Tim Freeman

Arpanet: tsf@theory.cs.cmu.edu
Uucp:    ...!seismo!theory.cs.cmu.edu!tsf
-- 
Tim Freeman

Arpanet: tsf@theory.cs.cmu.edu
Uucp:    ...!seismo!theory.cs.cmu.edu!tsf

jtkohl@ATHENA.MIT.EDU.UUCP (04/17/87)

I suspect what's happening is that your X server is resetting itself
every time it goes into a state with no connections.  This is how it
resets itself for environments where X servers are running with init
popping up a login window.

The fix is to make some other persistent connection to the X server
*before* you perform the xsetroot.

John Kohl
MIT/Project Athena