NEXT UP previous
Next: fvwm

Starting X-windows

Once the XF86Config file is set up, you can start up X-windows properly. On non-Linux Systems you may have seen the command xinit to start up X-windows. Under Linux, this is done with the command:

	$ startx

which actually arranges to run xinit anyway. During the X-initialization sequence, xinit will also run any commands found in the file .xinitrc in your home directory (if the file exists). If you don't have a personal .xinitrc file, then xinit will look for the file:

	/usr/X1lR6/lib/X11/xinit/xinitrc 

and execute the contents of this file instead.

.xinitrc

The .xinitrc file is used to specify the initial configuration of the X-windows display. Typically, it will be used to start X-windows with certain applications already running. It can also be used to determine the initial screen layout, specifying where on the screen the windows for the initial applications should be placed. For example:

	#!/bin/sh

	xterm -geometry 80x43+220+0 -bg gray -fg black & exec fvwm

The first line of this file specifies that the rest of the file should be interpreted using the /bin/sh shell program rather than your current shell. The second line causes the program xterm to be executed. This program is a standard terminal emulator which provides emulation of both the DEC VT 102 text terminal and the Tektronics 4014 graphics terminal. The & on the end of the line is needed to push the command into the background so that the rest of the script can be executed without waiting for the xterm to terminate first. The last line in the example starts up a window manager (fvwm here), of which there are many, each offering slightly different look and feel to the X-windows environment.

It is possible to start up several applications between the shell and the window manager. In general, any extra commands should be terminated with an ampersand (&) character, like the xterm line in the example. Note that the line which starts the window manager is not pushed into the background like the rest, but replaces the current process by being run with exec command.

When the window manager terminates, the X-server is shut down, closing your X-windows session. This is normally done with a menu option, as you will see later. The server can also be shut down directly by pressing the keyboard key combination Ctrl-Alt-Backspace.


NEXT UP previous
Next: fvwm