X Session Technical Description

The startx script is a simple wrapper that calls the xinit program; xinit will look for a $HOME/.xinitrc file in the user's home directory. The .xinitrc file performs essentially the same function as the .Xclients file. They're both used to specify which applications xinit should start after it has the X server up and running. If a user doesn't have a .xinitrc file, then a system-wide version of this file, /usr/X11R6/lib/X11/xinit/xinitrc, is used instead. This file allows an additional user configuration file, .Xclients, to be called.

The difference between an end user using $HOME/.xinitrc or $HOME/.Xclients lies in whether you want to start certain applications for all users on the system every time their X session starts. If end users use .xinitrc, only the applications they specify in that file will be started. If end users use .Xclients, system administrators can add applications to the systemwide xinitrc file. End users can then add their own applications to .Xclients. When they start X by using .Xclients, they get both their applications and whatever the systemwide xinitrc specifies.