XFree and Xorg

From Linux 101, The beginner's guide to all things Linux.

Jump to: navigation, search

Contents

[edit] The Basics

On a day-to-day basis we do not see windowing systems at work. What we see is software built on top of them. They are responsible for displaying graphical output to our screens as well as taking the input from keyboards and mice. That is, both XFree and X.org are just a framework for your graphical environment. You do use them all of the time, but you would not actively know that, because it really sits underneath other software that you do see.

XFree86 (a more exact name for XFree) and Xorg are both windowing systems. As XFree86 is becoming deprecated in favor of Xorg, this section will only speak directly on Xorg. However, at this time, they are nearly identical, except for the naming of certain files. Most of the major distributions have already moved to X.org from XFree86.

[edit] Configuration

The main configuration file for Xorg is in /etc/X11/xorg.conf (XFree86 configuration is in /etc/X11/XF86Config-4 (or /etc/X11/XF86Config if you are running an version 3 of x server because your video card is built before year 2000)). Here is where hardware elements such as keyboards, mice, graphics cards, and monitors are described. An explanation of all the options is available with man xorg.conf or man XF86Config-4. Many distributions have their own configuration utility for Xorg. It is the most recommended way to change your configuration unless you decide to abandon it and edit it purely by hand. Editing the file by hand and then using a configuration utility may undo changes you have made. See http://www.xfree86.org/

If your distribution does not have its own configuration utility, Xorg includes its own: xorgcfg, a graphical configuration utility, as well as a console version, xorgconfig.

If you choose to manually edit your xorg.conf file, the easiest way would be to generate a basic one with one of the utilities then edit it with your favorite text editor if anything needs to be tweaked.

If you are configuring for a laptop, you should head over to linux-laptop.net and see if someone has already put Linux on a laptop like yours. Usually they also supply their configuration file.

It is possible for the configuring process to cause frustration. It is best to look for help from others if you run into trouble. The wonderful news about this is that once you configure your XFree86 or X.org, you will likely never need to do it again.

[edit] What Now?

With a working windowing system, you have the basics for graphical programs to run. Most likely the next thing you would want to start after starting Xorg is a Window Manager or Desktop Environment. These, and the differences between them, will be explored in the next section.

[edit] How it Works

Xorg is an implementation of the X11 protocol. The X protocol was designed to operate seemlessly on a local computer as well as over a network. This allows X applications to run on one computer, and have the output be displayed on another computer where the user is. X is designed as a client/server architecture to facilitate this. The application is the client, and what the user sees is the server. This is why many times you will hear what you run is called a "X server".

[edit] Things configured in xorg.conf

  • video card, video memory
  • keyboard model, repeat rates, key layouts
  • mouse /dev device, model
  • monitor refresh rates
  • font directories
  • color depth
  • screen resolution

These are some very important things. The nice thing is once you have correctly configured your xorg.conf file, you should never need to edit it again.

Note: To change your screen resolution/color depth selection while running X, hit the CTRL-ALT-NUMPADMINUS keys. It will cycle through the options you have configured.

Note: To exit out of the X environment hard, hit CTRL-ALT-BACKSPACE.

Personal tools