The average user may be frightened at the thought of having to type in commands. Why wouldn't he be able to point and click his way through the freedom provided by Gentoo (and Linux in general)? Well, *big smile*, of course you are able to do this. :-) Linux offers a wide variety of flashy user interfaces and environments which you can install on top of your existing installation.
This is one of the biggest surprises new users come across: a graphical user
interface is nothing more than an application which runs on your system. It is
As standards are important, a standard for drawing and moving windows on a
screen, interacting with the user through mouse, keyboard and other basic, yet
important aspects has been created and named the
The application that provides Linux users with the ability to run graphical user interfaces and that uses the X11 standard is Xorg-X11, a fork of the XFree86 project. XFree86 has decided to use a license that might not be compatible with the GPL license; the use of Xorg is therefore recommended. The official Portage tree does not provide an XFree86 package anymore.
The
Xorg provides an interface between your hardware and the graphical software you want to run. Besides that, Xorg is also fully network-aware, meaning you are able to run an application on one system while viewing it on a different one.
Before you install Xorg, you have to configure two important variables in the
The first variable is
The second variable is
Now you should decide which drivers you will use and add necessary settings to
the
(For mouse, keyboard, and Synaptics touchpad support) INPUT_DEVICES="evdev synaptics"(For Nvidia cards) VIDEO_CARDS="nouveau"(OR, for ATI Radeon cards) VIDEO_CARDS="radeon"
By default, Xorg uses
Device Drivers ---> Input device support ---> <*> Event interface
Modern open source X drivers rely on kernel drivers that support modesetting (KMS). Such kernel drivers will also provide a framebuffer console. Those conflict with legacy framebuffer drivers, which must remain disabled.
Device Drivers ---> Graphics support ---> Support for frame buffer devices ---> < > VGA 16-color graphics support < > Userspace VESA VGA graphics support [ ] VESA VGA graphics support [ ] EFI-based Framebuffer Support < > nVidia Framebuffer Support < > nVidia Riva support < > Intel 810/815 support < > Intel 830M/845G/852GM/855GM/865G/915G/945G/945GM/965G/965GM support < > ATI Radeon display support Console display driver support ---> <*> Framebuffer Console support
Device Drivers ---> Graphics support ---> /dev/agpgart (AGP Support) ---> <*> Intel 440LX/BX/GX, I8xx and E7x05 chipset support Direct Rendering Manager (XFree86 4.1.0 and higher DRI support) ---> <*> Intel 830M, 845G, 852GM, 855GM, 865G (i915 driver) [*] Enable modesetting on intel by default
Device Drivers ---> Graphics support ---> <*> Direct Rendering Manager (XFree86 4.1.0 and higher DRI support) Staging drivers ---> [ ] Exclude Staging drivers from being built <*> Nouveau (nVidia) cards
For newer ATI Radeon cards (Radeon HD 2000, aka. R600 and up) you need to install the
Device Drivers ---> Generic Driver Options ---> [*] Include in-kernel firmware blobs in kernel binary# for Radeon HD 2000/3000/4000 series cards: (radeon/R600_rlc.bin radeon/R700_rlc.bin) External firmware blobs to build into the kernel binary# for Evergreen series cards: (radeon/CEDAR_me.bin radeon/CEDAR_pfp.bin radeon/CEDAR_rlc.bin radeon/CYPRESS_me.bin radeon/CYPRESS_pfp.bin radeon/CYPRESS_rlc.bin radeon/JUNIPER_me.bin radeon/JUNIPER_pfp.bin radeon/JUNIPER_rlc.bin radeon/REDWOOD_me.bin radeon/REDWOOD_pfp.bin radeon/REDWOOD_rlc.bin) External firmware blobs to build into the kernel binary (/lib/firmware) Firmware blobs root directory Graphics support ---> Direct Rendering Manager (XFree86 4.1.0 and higher DRI support) ---> <*> ATI Radeon [*] Enable modesetting on radeon by default
If the suggested
# emerge -pv xorg-server These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] x11-base/xorg-server-1.6.3.901-r2 USE="hal nptl xorg -debug -dmx -ipv6 -kdrive -minimal -sdl -tslib" 0 kB [ebuild R ] x11-base/xorg-drivers-1.6 INPUT_DEVICES="evdev synaptics -acecad -aiptek -citron -elographics -fpit -hyperpen -joystick -keyboard -mouse -mutouch -penmount -tslib -virtualbox -vmmouse -void -wacom" VIDEO_CARDS="radeon -apm -ark -ast -chips -cirrus -dummy -epson -fbdev -fglrx (-geode) -glint -i128 (-i740) (-impact) (-imstt) -intel -mach64 -mga -neomagic (-newport) -nv -nvidia -r128 -radeonhd -rendition -s3 -s3virge -savage -siliconmotion -sis -sisusb (-sunbw2) (-suncg14) (-suncg3) (-suncg6) (-sunffb) (-sunleo) (-suntcx) -tdfx -tga -trident -tseng -v4l (-vermilion) -vesa -via -virtualbox -vmware (-voodoo) (-xgi)" 0 kB
After setting all the necessary variables you can install the Xorg package.
# emerge xorg-server
When the installation is finished, you will need to re-initialise some
environment variables before you continue. Just run
# env-update # source /etc/profile
Now it's time to start the Hardware Abstraction Layer (HAL) daemon and set it to
automatically start each time you boot. This is necessary to get a working X
environment, otherwise your input devices won't be detected and you'll probably
just get a blank screen. We'll cover HAL more in the
# /etc/init.d/hald start # rc-update add hald default
Recent X server versions are designed to work out-of-the-box, with no need to manually edit Xorg's configuration files.
You should first try
If Xorg won't start (if there's something wrong with the screen, or with your keyboard/mouse), then you can try fixing problems by using the right configuration files.
By default, Xorg uses HAL (Hardware Abstraction Layer) to detect and configure devices such as keyboards and mice.
HAL comes with many premade device rules, also called policies. These policy
files are available in
For example, to get a basic working keyboard/mouse combination, you could copy
the following files to
# cp /usr/share/hal/fdi/policy/10osvendor/10-input-policy.fdi /etc/hal/fdi/policy # cp /usr/share/hal/fdi/policy/10osvendor/10-x11-input.fdi /etc/hal/fdi/policy
There are several other HAL policies in
You can edit the policy files in
One very convenient trick is to kill the X server entirely by pressing Ctrl-Alt-Backspace. This is useful when your X server is malfunctioning, frozen, etc. It's not as extreme as rebooting the whole machine with Ctrl-Alt-Del.
Recent X server versions disabled this key combination by default. However, you
can reenable it by copying
(Open the file in your preferred editor) # nano -w /etc/hal/fdi/policy/10-x11-input.fdi(Find the "input.keys" section) <match key="info.capabilities" contains="input.keys">(Add the "terminate" merge string as shown) <match key="info.capabilities" contains="input.keys"> <merge key="input.x11_driver" type="string">keyboard</merge> <merge key="input.xkb.options" type="string">terminate:ctrl_alt_bksp</merge> <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name" string="Linux"> <merge key="input.x11_driver" type="string">evdev<merge> </match> </match>
Once you're done, run
There, now you have a handy way of killing an unresponsive X server. This is useful when programs have frozen your display entirely, or when configuring and tweaking your Xorg environment. Be careful when killing your desktop with this key combination -- most programs really don't like it when you end them this way, and you may lose some (or all) of what you were working on.
Hopefully just working with the HAL policy files results in a working X desktop.
If Xorg still won't start, or there's some other problem, then you'll need to
manually configure
Section "Device" Identifier "NVidia Video Card" Driver "nouveau" EndSection
The configuration file of Xorg is called
$ man 5 xorg.conf
Xorg itself is able to guess most parameters for you. In most cases, you will only have to change some lines to get the resolution you want up and running. If you are interested in more in-depth tweaking, be sure to check the resources at the end of this chapter. But first, let us generate a (hopefully working) Xorg configuration file.
# Xorg -configure
Be sure to read the last lines printed on your screen when Xorg has finished
probing your hardware. If it tells you it failed at some point, you're forced to
manually write an
# X -retro -config /root/xorg.conf.new
If all goes well, you should see a simple black and white pattern. Verify if your mouse works correctly and if the resolution is good. You might not be able to deduce the exact resolution, but you should be able to see if it's too low. You can exit any time by pressing Ctrl-Alt-Backspace.
Let us copy over the
# cp /root/xorg.conf.new /etc/X11/xorg.conf
Now try
$ startx
You can kill the X session by using the Ctrl-Alt-Backspace combination. This will, however, make X exit disgracefully -- something that you might not always want.
If you haven't yet installed a window manager, all you'll see is a black screen.
Since this can also be a sign that something's wrong, you may want to emerge
Once those two programs are installed, run
If you feel that the screen resolution is wrong, you will need to check two
sections in your
What happens is that Xorg checks the settings of
Now let us change the resolutions. In the next example from
Section "Device" Identifier "Video Card" Option "Monitor-DVI-0" "DVI Monitor" EndSection Section "Monitor" Identifier "DVI Monitor" Option "PreferredMode" "1440x900" EndSection
Run X (
If you have more than one Monitor, you can also encode the layout of these
Monitors in
Section "Device" Identifier "Video Card" Option "Monitor-DVI-0" "DVI Monitor" Option "Monitor-VGA-0" "VGA Monitor" EndSection Section "Monitor" Identifier "DVI Monitor" EndSection Section "Monitor" Identifier "VGA Monitor" Option "RightOf" "DVI Monitor" EndSection
To setup X to use an international keyboard, you can copy the content of
# bzcat /usr/share/doc/hal-*/*/use-estonian-layout.fdi.bz2 > /etc/hal/fdi/policy/10-xinput-configuration.fdi
Now you can just edit
When you're finished, run
Run
First of all,
Also, be sure to look at
You may find the X.org
There are also many online resources on editing
More information about installing and configuring various graphical desktop
environments and applications can be found in the
If you're upgrading to xorg-server-1.6 or 1.7 from an earlier version, then be sure to
read the