Recently, I realized that a certain disk partition on a Linux Server that is only accessed by ssh was full. I tracked down the problem to a VNC log which had filled up the disk. Using lsof, I determined that even though the log was deleted and VNC was restarted the disk space was not returned because various processes related to the window manager had the files opened (nautilus, gnome-ses, gnome-key, metacity, gnome-pan, eggcups, bt-applet, nm-applet, pam-panel, escd, mapping-d, gnome-ter).
The suggestion from the sysadmin is to reboot the server. Actually, the GUI has only been used once to install the packaged software that the server runs so is not required for most of the time. I would rather fix the problem without rebooting if possible.
How can the GUI be restarted or even turned off gracefully from the command line to be restarted later when required?