About Archive Tags RSS Feed

 

Only after disaster can we be resurrected

6 May 2008 21:50

I leave my main desktop logged in for months a time; as demonstrated by my previous bug with the keyboard transition for xorg.

The screen is setup to lock after 5 minutes of idle, so there's no real security issue, and it is extremely convenient.

Every few weeks though my desktop gets into a funny state where no new windows may be opened.. Existing applications continue running without any problems, but no new windows/shells/whatever may be opened.

Tonight it happened again.

And the lightbulb went on in my head: My flat uses CFEngine to manage itself. (Two physical servers here, with 5-10 Xen guests, and a number of remote servers.)

One of the things that CFengine is configued to do is to tidy directories of files which are older than 30 days. Including /tmp.

So that explains that.

Every month the magic cookie in $TMP would be nuked, and X would disallow new connections.

I guess the next time this happens I should look at using Xauth to fix the issue, but generally I just logout, make coffee, smoke a cigarette, and login again.

In conclusion: I'm a stupid-head.

ObQuote: Fight Club

| 6 comments

 

Comments on this entry

icon Bob Proulx at 19:19 on 6 May 2008
Look to see if the /tmp/.X11-unix/X0 socket has been removed.
Instead of using a custom rule in cfengine you might consider using tmpreaper for this instead since X11 sockets are not the only problem cases.
icon Ben Hutchings at 22:44 on 6 May 2008
Magic cookies go in ~/.Xauthority (and in the server's memory). As Bob suggested, it's probably the socket that's gone. Setting DISPLAY=localhost:0 might work around it as the TCP port will still be accessible.
icon oestrogen at 02:00 on 7 May 2008
You're so cute that I can't ever see myself unsubscribe from your feed. :)
Plus, I get some useful tips from times to times.
icon Steve O at 07:33 on 7 May 2008
I'm missing the obquote reference :'(
icon Steve O at 07:35 on 7 May 2008
... bah, just got it - too subtle!
icon Steve Kemp at 09:04 on 7 May 2008

Hmm I guess you're all right; it is the socket that has gone, not the Xauth file itself. I guess I didn't think that through carefully enough.

Thanks for the tip though Bob & Ben. If I get into a similar state in the future I will definitely remember to try the explicit exporting of DISPLAY - I always have at least one shell open!

Oestrogen: Hahah!