[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: The XDM trap



*-Craig Sanders ( 8 Jul)
| On Tue, 7 Jul 1998 servis@purdue.edu wrote:
| 
| > *-Raul Miller ( 7 Jul)
| > | Craig Sanders <cas@taz.net.au> wrote:
| > | > that's a problem. to implement my suggestion, a failure counter would
| > | > have to be hacked into xdm itself, or maybe xdm could start a wrapper
| > | > script which either exec-ed the X server or ran an endless loop if the X
| > | > server died too often.
| > | 
| > | Alternatively, you could hack this into X (X on debian systems is 
| > | just a little C program that reads /etc/X11/Xserver and executes it.
| > | 
| > | It could keep timing information in some file in /var/state/.
| > | 
| > | So it's doable, the question is: is this the right kind of solution?
| 
| hacking the X wrapper is a good idea. i forgot that X on debian was a
| little wrapper program.
| 
| adding this functionality to the X wrapper is probably the best solution
| to the problem.

You are probably right since this is what is run on the local
machine.  But if modifying the X wrapper to stop xdm is not possible
then /etc/X11/xdm/Xreset_0 seems to be the best place.

| 
| 
| > Why couldn't /etc/X11/xdm/Xreset be used as a place to do the failure
| > counting?  It gets executed after the X server ends(fails).  
| > 
| > Please don't laugh or flame, suggetion and comments welcome, but this is
| > a hack I threw together that could be used in Xreset(I am not a great
| > scripter).  I have not had time to test it so be warned. Lots of ideas
| > were taken from Craig's post showing the squid setup.
| >
| > [script fragment deleted]
| 
| this looks good too.
| 
| i wouldn't kill xdm, though. xdm might be being used to provide a login
| screen for xterms or other unix/linux boxes.
| 
| maybe "sleep 600" or similar is the Right Thing to do instead of killing
| xdm?
| 
| also, maybe this should be in Xreset_0 rather than Xreset??
| 

You are right, killing xdm would kill all clients not just the local. 
Perhaps instead of stopping xdm the /etc/X11/xdm/Xservers file could be
modified to comment out the local X servers lines and echo a message to
the console and to the logs stating what has been done.  Something like 

sed 's/^\(:.*local\)/#<disabled>#\1/g' Xservers > Xservers.disabled
mv Xservers Xservers.errors
mv Xservers.disabled Xservers
echo "`date`: Local XDM Xservers(/etc/X11/xdm/Xservers) have been\
 disabled due to repeated startup problems."
echo "`date`: Local XDM Xservers(/etc/X11/xdm/Xservers) have been\
 disabled due to repeated startup problems." >> $XDMLOG


This would change lines like 

:0 local /usr/X11R6/bin/X -bpp 16

to

#<disabled>#:0 local /usr/X11R6/bin/X -bpp 16

The user then would have to fix the X setup and then edit and remove
the #<disabled># before reloading the xdm.

Brian 
-- 
Mechanical Engineering                              servis@purdue.edu
Purdue University                   http://www.ecn.purdue.edu/~servis


--  
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


Reply to: