Restarting Xserver from cli

Derek Broughton derek at pointerstop.ca
Thu Mar 19 12:24:41 UTC 2009


Bart Silverstrim wrote:

> Knapp wrote:
>> 
>> If C.A.D. can have a pop up then why can't C.A.B????? This would seem
>> to end all the discussion. Also if X is not working then you don't see
>> the pop up but the code should be able to tell if X is dead or not.
>> Perhaps hitting it 2 times would force it when all is dead?
> 
> Probably because
> A) I think CAB is intercepted by Linux, not X.
> B) If the code is in a hung/stuck/fubar state, it *can't* reliably tell
> you jack with a popup or prompt. That was kind of the point.

Yes, but the "negative" option - of restarting your X server _unless_ you
respond to a prompt is possible.  If it's actually intercepted by Linux
rather than X, start a timer, dispatch a signal to X, X displays a prompt
(if it can), if user responds: restart is cancelled; else restart X. 
That's exactly what X does when you try to change your graphics settings.
-- 
derek





More information about the ubuntu-users mailing list