Roland's homepage

My random knot in the Web

Breaking and repairing Xorg

By accident I managed to break X11. The symptoms were that Xorg could not open new programs, and after restarting it complained that it could not save a compiled keymap, so it unloaded the keayboard and mouse modules, leaving X unusable. :-(

After going into single-user mode, I ran fsck on all filesystems, which came up clean. I then used my backup from the day before to check if any important files had been changed. After some further investigation it turned out that the permissions on /tmp had gone haywire. This is important because Xorg keeps some sockets in hidden directories under /tmp. These sockets are used by programs to talk to the Xorg server, so they are kind of necessary. :-)

I'm not sure what caused the strange permissions on /tmp. But I'd been playing with running make installworld for a jail, and I had to remove the noexec option from the /tmp filesystem to do that. I probably screwed something up there. Anyway, running

# chmod 1777 /tmp

fixed things.