xorg is the public, open source implementation of the X11 X Windows system. Basically, if you want a GUI atop Arch, you will want xorg.
Before beginning, make sure you do the following:
- Make sure that pacman is configured and refreshed. - If you are running another x-server you can close it now. ctrl+alt+backspace - Make a note about third party drivers (e.g., nVidia or ATI drivers).
Installing xorg is easy: # pacman -S xorg
If xorg installed ok, it's time to make xorg.conf with xorgconfig.
Before you can run xorg, you need to configure it so that it knows about your graphics card, monitor, mouse and keyboard. There are two main routes: xorgconfig or hwd.
To start up xorgconfig: xorgconfig
This will generate a new xorg.conf.
Answer the questions and the program makes the file for you. NB watch out for the question about your mouse device. The default device according to xorgconfig is /dev/mouse. However, you should change this to /dev/input/mice. Otherwise, you may encounter the common problem of X freezing on when executed.
This program is not really good but it's a start and you can fill in special stuff manually afterwards.
hwd is a tool written by users in the Arch Linux community. It's basically a hardware detection tool that has multiple uses, one of which is setting up an X server. Fortunately, hwd is much more streamlined than xorgconf and doesn't require any input at all.
First, you need to install it: pacman -S hwd
Then you need to run it (as root) with the -x argument that tells it to generate an xorg.conf hwd -x
This will not overwrite any existing xorg configuration file and instead creates a new file /etc/X11/xorg.conf.hwd (Alternatively, you could have used -xa flag which would have overwritten straight to xorg.conf). To use this, you must manually rename it: mv xorg.conf.hwd xorg.conf
NB If you have an existing xorg.conf, you may wish to back up prior to running this command.
You may wish to edit the config after it's been generated. To open in your favourite text-editor, such as Vim (you need root privilages): vim /etc/X11/xorg.conf
Some people may need to tweak their display size. In the section “Monitor” put in your display size in mm under the VertRefresh:
VertRefresh 50-70 DisplaySize 305 230
If you wish to use 3rd party graphics drivers, do check first that the X server runs ok first. Xorg should run smoothly without official drivers, they are typically only needed for advanced features such as 3D accelerated rendering for games, dual-screen setups, and TV-out.
This is done simply by typing: startx
The default X environment is rather bare, and you will typically seek to install window managers or desktop environments to supplement X.
If a problem occurs, then view the log at /var/log/Xorg.0.log. Be on the lookout for any lines beginning with (EE) which represent errors, and also (WW) which are warnings that could indicate other issues.
X startup (/usr/X11R6/bin/startx) tweaking
for X's option reference see man Xserver
The following options have to be appended to the variable “defaultserverargs” in the /usr/X11R6/bin/startx file.
prevent X from listening on tcp: -nolisten tcp
getting rid of the gray weave pattern while X is starting and let X set a black root window: -br
enable deferred glyph loading for 16 bit fonts: -deferglyphs 16