next up previous contents index
Next: 5.1.6 Running into trouble Up: 5.1 The X Window Previous: 5.1.4 Filling in video

5.1.5 Running XFree86

With your XF86Config file configured, you're ready to fire up the X server and give it a spin. First, be sure that /usr/X11R6/bin is on your path.

The command to start up XFree86 is

startx

This is a front-end to xinit (in case you're used to using xinit on other UNIX systems).

This command will start the X server and run the commands found in the file .xinitrc in your home directory. .xinitrc is just a shell script containing X clients to run. If this file does not exist, the system default /usr/X11R6/lib/X11/xinit/xinitrc will be used.

A standard .xinitrc file looks like this:

#!/bin/sh

xterm -fn 7x13bold -geometry 80x32+10+50 &
xterm -fn 9x15bold -geometry 80x34+30-10 &
oclock -geometry 70x70-7+7 &
xsetroot -solid midnightblue &

exec twm

This script will start up two xterm clients, an oclock, and set the root window (background) color to midnightblue. It will then start up twm, the window manager. Note that twm is executed with the shell's exec statement; this causes the xinit process to be replaced with twm. Once the twm process exits, the X server will shut down. You can cause twm to exit by using the root menus: depress mouse button 1 on the desktop background---this will display a pop up menu which will allow you to Exit Twm.

Be sure that the last command in .xinitrc is started with exec, and that it is not placed into the background (no ampersand on the end of the line). Otherwise the X server will shut down as soon as it has started the clients in the .xinitrc file.

Alternately, you can exit X by pressing -- in combination. This will kill the X server directly, exiting the window system.

The above is a very, very simple desktop configuration. Many wonderful programs and configurations are available with a bit of work on your .xinitrc file. For example, the fvwm window manager will provide a virtual desktop, and you can customize colors, fonts, window sizes and positions, and so forth to your heart's content. Although the X Window System might appear to be simplistic at first, it is extremely powerful once you customize it for yourself.

If you are new to the X Window System environment, we strongly suggest picking up a book such as The X Window System: A User's Guide. Using and configuring X is far too in-depth to cover here. See the man pages for xterm, oclock, and twm for clues on getting started.



next up previous contents index
Next: 5.1.6 Running into trouble Up: 5.1 The X Window Previous: 5.1.4 Filling in video



Matt Welsh
mdw@sunsite.unc.edu