DistributedNetworks DistributedNetworks





X Display Server  «Prev 

Configuring an X startup with .xinitrc

How do you configure an X startup with .xinitrc?

The
~/.xinitrc
file is a shell script read by xinit and by its front-end startx. It is mainly used to execute desktop environments, window managers and other programs when starting the X server (i.e., starting daemons and setting environment variables). The xinit program starts the X Window System server and works as first client program on systems that are not using a display manager.
One of the main functions of ~/.xinitrc is to dictate which client for the X Window System is invoked with startx or xinit programs on a per-user basis. There exists numerous additional specifications and commands that may also be added to ~/.xinitrc as you further customize your system.



The line executes the xrdb command with the load option. It loads the X resources database file located in the user's directory.
The line executes the xrdb command with the load option. It loads the X resources database file located in the user's directory.

xsetroot sets the color of the root window (or background)
xsetroot sets the color of the root window (or background) to solid gray.


These commands bring up a clock and a CPU load indicator. The -g option signifies that a geometry specification follows.
These commands bring up a clock and a CPU load indicator. The -g option signifies that a geometry specification follows.

The first pair of numbers, separated by an x give the size of the window in pixels in the form width X height. The second pair of numbers indicates window positioning, the first of these is the horizontal position, and the second is the vertical position.
The first pair of numbers, separated by an x give the size of the window in pixels in the form width X height. The second pair of numbers indicates window positioning, the first of these is the horizontal position, and the second is the vertical position.

There are two lines of code that indicate initial xterms will start. The last line starts the window manager. The exec command tells xinit to start the window manager and have the X clients be child processes of it.
There are two lines of code that indicate initial xterms will start. The last line starts the window manager. The exec command tells xinit to start the window manager and have the X clients be child processes of it.