Michael D. Setzer II wrote:
I've fount that the vncserver doesn't start correctly after a power outage or non-normal shutdown. It appears that file in the /tmp/.X11-unix directory is left after the reboot, and causes the startup to fail.
My solution at the moment is to have a script in cron.hourly that checks if it is running, and it not it removes the file, and restarts the service.
An alternative is to put a line like none /tmp tmpfs nodev,noexec 0 0 into /etc/fstab. This will have the effect of automatically clearing out /tmp every boot.
What it actually does is turn /tmp into a tmpfs mount. If you have plenty of RAM free, then it will hold the contents of /tmp *just* in memory. If you have almost all your RAM being used for programs and caching (the normal state on a computer that’s been running a while), the kernel may choose to reclaim some of the memory that’s being used for the contents of /tmp, using the same algorithms as normal. It will write the contents to swap space.
Obviously, if you’re used to putting multi-gigabyte files in /tmp, you’ll need to either start using /var/tmp or making sure you have plenty of swap.
James.