Install Xorg and Xfce on a Gentoo Linux

Installing Xorg and Xfce on a Gentoo Linux laptop. 

Before We Begin

This article is my personal notes on installing an Xorg X window system and an Xfce lightweight desktop environment on a Gentoo Linux on a Dell Studio 1535 laptop. This article is not intended to be a step-by-step guide. You may want to visit the Gentoo Wiki for documentation and more information.

What does this article cover:

  1. Installation of Xorg
  2. Installation of Xfce
  3. Installation of some Xfce plugins


The laptop has an ATI Mobility Radeon HD 3450 graphics card:

$ lspci | grep VGA
01:00.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI RV620 [Mobility Radeon HD 3400 Series]

Xorg Installation

Kernel Modification

This assumes you use Linux kernel v3.17.

Activate support for evdev:

Device Drivers –> Input device support –> Event interface (*)

Prepare the kernel for KMS:

Device Drivers –> Graphics support –> Frame buffer devices –>
## (Disable all drivers, including VGA, Intel, nVidia, and ATI)

Configure the kernel to use the proper KMS driver for an AMD/ATI video card and enable Radeon KMS support.

# emerge --sync
# emerge --ask x11-drivers/radeon-ucode

Kernel modifications:

Device Drivers –> Generic Driver Options –> Include in-kernel firmware blobs in kernel binary (*)
Device Drivers –> Generic Driver Options –> (radeon/R600_rlc.bin) External firmware blobs to build into the kernel binary
Device Drivers –> Generic Driver Options –> (/lib/firmware) Firmware blobs root directory
Device Drivers –> Graphics support –> Direct Rendering Manager –> ATI Radeon (*)

Recompile and install the kernel (should take a couple of minutes only):

# cd /usr/src/linux
# make && make modules_install install

make.conf Configuration

Add the following to the /etc/portage/make.conf:

# (For mouse, keyboard, and Synaptics touchpad support)
INPUT_DEVICES="evdev synaptics"
# (For AMD/ATI cards)

The example below is for a system with a keyboard, mouse, Synaptics touchpad and a Radeon video card:

# emerge -pv xorg-drivers
ebuild   R    ] x11-base/xorg-drivers-1.15  INPUT_DEVICES="evdev synaptics -acecad -aiptek -elographics -fpit -hyperpen -joystick -keyboard -mouse -mutouch -penmount -tslib -vmmouse -void -wacom" VIDEO_CARDS="radeon -apm -ast -chips -cirrus -dummy -epson -fbdev -fglrx (-freedreno) (-geode) -glint -i128 (-i740) -intel -mach64 -mga -modesetting -neomagic -nouveau -nv -nvidia (-omap) (-omapfb) -qxl -r128 -radeonsi -rendition -s3virge -savage -siliconmotion -sisusb (-sunbw2) (-suncg14) (-suncg3) (-suncg6) (-sunffb) (-sunleo) (-suntcx) -tdfx -tga -trident -tseng -v4l -vesa -via -virtualbox -vmware (-voodoo)" 0 kB

Install Xorg

Make sure udev is in our USE flags:

# echo "x11-base/xorg-server udev" >> /etc/portage/package.use

Install Xorg (this may take a while):

# emerge --ask --quiet xorg-server

When the installation is finished, update environment variables before continuing:

# env-update && source /etc/profile

Restart the system in order to boot the new kernel.

That’s it, try startx to start up an X server. It should work out-of-the-box without a need to manually edit Xorg’s configuration files.

As the Gentoo Wiki says:

“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 twm and xterm only to test X.

Once those two programs are installed, run startx again. A few xterm windows should appear, making it easier to verify that X is working correctly. Once you’re satisfied with the results, run emerge –unmerge twm xterm as root to get rid of the testing packages. You won’t need them once you’ve setup a proper desktop environment.”

Xfce Installation

USE Flags

Check your USE flags:

# grep USE /etc/portage/make.conf
USE="-gnome -kde -minimal -qt4 -systemd bindist mmx sse sse2 dbus jpeg lock session startup-notification thunar udev X"

You may need this:

# echo "sys-fs/udev gudev" >> /etc/portage/package.use

Install Xfce

Install Xfce (this may take a while):

# emerge --ask --quiet xfce4-meta

Install a graphical terminal:

# emerge --ask x11-terms/xfce4-terminal

Some Xfce plugins I use:

# emerge --ask xfce4-battery-plugin xfce4-datetime-plugin xfce4-mixer \
xfce4-notifyd xfce4-power-manager xfce4-screenshooter xfce4-weather-plugin \

You may need this:

echo "sys-auth/consolekit policykit" >> /etc/portage/package.use

You can check for more available Xfce plugins:

# emerge --search xfce4 | less

Optionally, install Firefox:

# emerge --ask --quiet firefox

You may need this:

echo "dev-lang/python sqlite" >> /etc/portage/package.use
echo "media-libs/libpng apng" >> /etc/portage/package.use

Update environment variables:

# env-update && source /etc/profile

Leave a Reply

Your email address will not be published. Required fields are marked *