Gnome provides services (such as Gnome keyring, GConf, PolicyKit integration, etc.) that some programs use as well as additional features like theme application and application autostarting. If you use programs that make use of those services and you don't have Gnome, you may miss out on some functionality. Depending on what you use, it might be critical, or you might never miss it.
It depends on your Display Manager! (i.e. KDM, GDM)
Please bear in mind your DM runs as root! (it needs root privileges in order to run your session process as the user you log in)
When you click shutdown in KDE or GNOME, your DE sends a signal to your DM to power off or restart after the session has terminated. Then, your DE tells every program to end and once all other process has terminated (or expired a timeout), the last process of your DE -- the session process -- terminates.
The session process is the first process started in an X11 session. When it's killed or it terminates, the session terminates. Have you ever seen that xterm when running X without DE? That is a session process. This process is called kdeinit
in KDE and gnome-session
in GNOME.
Once the session has terminated, control is returned to your DM (which has been waiting for the X process to end), and it checks what the DE told him to do. If it told it to power off or restart, it will do that. In other case, it will just start a new login screen in X.
This is also related with problems you may have had in the past, with some DE not being able to power off or restart, just to log out, when used in combination with some other DMs.
In any case, this is not so bad documented. GDM has a manual page "gdm-control(1)" of a command which allows you to tell it to shut down just like I told before (gdm-control
). KDM has excellent documentation too and has a similar (a little more complex) utility named kdmctl
.
Shutdown and restart is possible without PolicyKit, but PolicyKit serves many purposes needed on nowadays systems like mounting disks without being root, suspend or hibernate the computer. And it neither is bad documented!
Check out this if you want to know more about what is PolicyKit and how does it work: http://www.freedesktop.org/software/polkit/docs/latest/polkit.8.html
Best Answer
The
monitors.xml
file stores the monitors settings as configure by Gnome System Settings. It can store configurations for multiple monitor setups and the user's personal choice of screen resolution. Gnome System Settings uses the XRANDR extension to reconfigure the display(s) on the fly.As you found, and as can be read here, the content of the file isn't documented.
The settings of your display are automatically detected when the X server starts. However, these can be overriden by creating and using
/usr/share/X11/xorg.conf.d/*.conf
files. Changes here are system wide and work regardless of the Desktop Environment you use.Once logged in to Gnome, changes made using the Gnome System Settings' Display applet are saved in your
monitors.xml
file. As Gnome uses XRANDR to configure the displays based on the content of this file, you could use thexrandr
utility to manually configure your display(s).If you need to know the format of the
monitors.xml
file, one option would be to monitor it's content as you change settings on Gnome - there aren't that many, especially if you're only using a single monitor. Another option would be to read the source code.