KDE

Gentoo HOWTO & Notes

10/10/2010

Install the X Window System

For the purpose of this HOWTO I’ll be using my computer JAKOB as example configuration. It has an Intel D845GVSR mainboard with integrated graphics controller. (If using an NIVIDIA card, then peruse my install notes for the NVIDIA GeForce FX 5200 card.)

jakob ~ # lspci

00:02.0 VGA compatible controller: Intel Corporation 82845G/GL[Brookdale-G]/GE Chipset Integrated Graphics Device (rev 01)

Configure the Linux Kernel

Most of this is already correct as per my custom Kernel configuration, but it never hurts to check things again and add those items required for X.

jakob ~ # genkernel --loglevel=5 --menuconfig all

Processor type and features ---> -*- MTRR (Memory Type Range Register) support [*] MTRR cleanup support (0) MTRR cleanup enable value (0-1) (1) MTRR cleanup spare reg num (0-7)

Device Drivers ---> Input device support ---> <*> Event interface

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) ---> (X) i915 driver [*] Enable modesetting on intel by default <*> Support for frame buffer devices ---> [*] Enable firmware EDID [*] Enable Video Mode Handling Helpers [*] VESA VGA graphics support Console display driver support ---> -*- VGA text console <*> Framebuffer Console support [*] Bootup logo ---> [*] Standard 224-color Linux logo

When the new Kernel had been compiled, edit /boot/grub/menu.lst and add the vga and video parameters:

kernel /boot/kernel-genkernel-x86-2.6.34-gentoo-r6 ··· vga=791 video=vesa:ywrap,mtrr

Reboot and you should have a nice penguin with a 1024x768 resolution framebuffer display. Yeah!

Install the X Window System

Edit /etc/make.conf and add two lines:

INPUT_DEVICES="evdev" VIDEO_CARDS="intel"

VIDEO_CARDS is one of the following: apm, ark, chips, cirrus, cyrix, dummy, epson, fbdev, fglrx, glint, i128, i740, impact, imstt, intel, mach64, mga, neomagic, newport, nsc, nv, nvidia, r128, radeon, rendition, s3, s3virge, savage, siliconmotion, sis, sisusb, sunbw2, suncg14, suncg3, suncg6, sunffb, sunleo, suntcx, tdfx, tga, trident, tseng, v4l, vesa, vga, via, vmware, voodoo.

Also add X, hal and truetype to the global USE flags in /etc/make.conf.

Now compile the X server with:

jakob ~ # emerge xorg-server

When finished, update your environment variables:

jakob ~ # env-update && source /etc/profile

HAL, which is pulled in automatically, requires some extra configuration:

jakob ~ # cp /usr/share/hal/fdi/policy/10osvendor/10-input-policy.fdi /etc/hal/fdi/policy

jakob ~ # cp /usr/share/hal/fdi/policy/10osvendor/10-x11-input.fdi /etc/hal/fdi/policy

The nifty Ctrl-Alt-Backspace method of terminating X has been disabled by default, so enable it again by editing /etc/hal/fdi/policy/10-x11-input.fdi and adding the following to the <match key="info.capabilities" contains="input.keys"> section:

<merge key="input.xkb.options" type="string">terminate:ctrl_alt_bksp</merge>

Start HAL and add it to the appropriate runlevel:

jakob ~ # /etc/init.d/hald start

jakob ~ # rc-update add hald default

Configure the X Window System

If you feel lucky, try the automated generation of the configuration file:

jakob ~ # Xorg -configure

Now test this configuration:

jakob ~ # X -retro -config /root/xorg.conf.new

If you were lucky, then you should see a hashed background with a cross as a mouse pointer. Use Ctrl-Alt-Backspace to exit. Seeing as all went well, copy this configuration over to /etc/X11.

jakob ~ # cp /root/xorg.conf.new /etc/X11/xorg.conf

Install and Configure KDE

There are currently two base KDE installs — kdebase-meta and kdebase-startkde. The former installs a full-featured KDE desktop, including Konqueror and Dolphin, whilst the latter installs a bare-bones desktop with a bloated, but feature-rich Xine. Personally I prefer the kdebase-startkde and trimmed a lot of fat off Xine (mostly the DVD related stuff) by adding the following line to /etc/portage/package.use:

media-libs/xine-lib -a52 -css -dts -modplug -musepack -theora -v4l -vorbis -xv

Install KDE

Add alsa, cairo, dbus, exif, gtk, jpeg, jpeg2k, kde, opengl, png, qt3support, qt4, tiff and tiff to the USE flags in /etc/make.conf.

Enable package-specific USE flags in /etc/portage/package.use:

dev-python/PyQt4 phonon sql webkit x11-libs/cairo xcb

There are a lot more tweaks and I refer you to the actual installation notes of KDE on JAKOB for details.

Start the installation of KDE by commanding:

gentoo ~ # emerge kdebase-startkde

Configure Graphical Login

We’ve gone through all the trouble of installing KDE, so why not enable it on startup? Unless this will will be a headless box, of course.

gentoo ~ # emerge kde-base/kdm

Edit /etc/conf.d/xdm by changing:

DISPLAYMANAGER="kdm"

And add xdm to start on boot:

gentoo ~ # rc-update add xdm default

What Now?

Install Additional Packages

gentoo ~ # emerge konsole

The True Purpose of X...

But the real fun part, at least for me, is running X/KDE/Gnome applications directly on my Windows XP-based machines. See these instructions for configuring Xming.