Gentoo Logo

Gentoo KDE 4.0 Guide

Content:

1.  Installation

Removing any pre-release ebuilds

If you used the genkdesvn overlay, it's advisable that you remove the KDE pre-releases from your system before upgrading. For most users this should be as easy as running layman -d kde. Also, if you modified any of the KDE related files in /etc/env.d/ you'll have to manually remove those. This can include previous modifications for beryl or compiz.

Enabling the necessary USE flags

KDE 4.0 requires x11-libs/qt:4 built with a set of minimal USE flags. Add the following line to your /etc/portage/package.use.

Code Listing 1.1: Setting the necessary USE flags for x11-libs/qt:4

x11-libs/qt:4 accessibility dbus gif jpeg png qt3support ssl zlib

If you have the opengl USE flag set for KDE ebuilds, you'll have to set the opengl USE flag for x11-libs/qt:4 too.

Note: KDE 4.0.x hasn't been tested with the Qt-4.4.0 technical preview, and at the moment of writing the KDE 4.0.x ebuilds do not work with this version of Qt.

Unmasking and keywording

KDE 4.0.x is currently hard-masked, so you will have to unmask it using the example package.unmask before you can emerge it. Users with ACCEPT_KEYWORDS="~x86" or ACCEPT_KEYWORDS="~amd64" do not need to perform any further steps. Any other users will also need to place the packages in package.keywords.
/etc/portage/package.unmask/ and /etc/portage/package.keywords/ can be directories, so you can save the following example files in those directories, to unmask and keyword KDE 4.0.x.

Installing

You can now run either of the following emerge commands, to install KDE. The first will give you all of KDE 4.0.x, built from split ebuilds. The second will give you a minimal KDE 4.0.x desktop, as a basis to add only the programs you like.

Code Listing 1.2: Installing KDE 4.0.x

# emerge -avD kde-base/kde-meta:kde-4
# emerge -avD kde-base/kdebase-startkde:kde-4

2.  Changes from KDE 3.5

KDE 4 represents a dramatic change in the desktop architecture to KDE 3. One such change is the migration from autotools to cmake. This means that you will now have a percentage progress during the compilation of KDE.

The startkde script

It is not recommended to let KDE 3.5 and KDE 4.0 share the same configuration files. In order to prevent this, the startkde scripts rewrite the ~/.kde symlink while KDE starts. This means that when you're in a KDE 4.0 session your configuration from KDE 3.5 will be unavailable and vice versa.

This is why you should not run two different KDE versions as the same user, at the same time. (Logging in to KDE 4.0, while KDE 3.5 is still running in the background, under the same user.)

Selecting the login manager

By default the highest version of kde-base/kdm you have installed will start on login. To configure this, open /etc/conf.d/xdm in your favorite text editor and change the DISPLAYMANAGER variable to kdm-3.5 or kdm-4.0. You can find possible versions for kdm by running ls /usr/kde/ in a shell.

Code Listing 2.1: Add the following to /etc/conf.d/xdm

DISPLAYMANAGER=kdm-3.5

3.  FAQ

Q: Can I install KDE 4.0 and KDE 3.5 at the same time?

A: Yes, both versions are slotted, and can be installed at the same time. Both versions of KDE use a different KDEHOME, so you can try KDE 4.0 as the same user, without overwriting your KDE 3.5 settings.

Q: You said I could install KDE 3.5 and KDE 4.0, but they block each other!

A: You will need to install the latest revision (not version) of kde-base/kdebase-startkde, which includes patches to allow multiple versions of KDE to coexist.

Q: Why is KDE 4.0.x hard-masked?

A: KDE 4.0.x is very much a technology release. It was not intended to be a complete replacement for the KDE 3 series, yet. Many features are missing and many bugs will be found. When KDE 4.x is at the stage that it offers a true upgrade path for users, it will leave the hard-masked status.

Q: Why is KDE 4.0.x masked by EAPI?

The KDE 4.0.x ebuilds use slot dependencies, such as kde-base/kdebase-startkde:kde-4, in the dependency syntax. You need a version of sys-apps/portage that understands this. If you get this error message, you should simply update it to a sufficiently new version.

Code Listing 3.1: Updating to a version of portage that supports EAPI=1

# emerge --oneshot >=sys-apps/portage-2.1.3.12

Q: Where are the monolithic KDE 4 ebuilds?

We find that having both split and monolithic ebuilds often causes needless confusion for users, needless complexity in the eclasses, and a lot of pointless duplication of effort, both for arch teams and ourselves. As KDE uses cmake now, the main disadvantage of using split ebuilds (longer compile-time because of the duplicate ./configure-runs) is insignificant. For the reasons stated above, we have decided to maintain split ebuilds only. To switch from monolithic to split ebuilds unmerge all monolithic KDE 4 ebuilds:

Code Listing 3.2: Uninstalling monolithic KDE 4

# emerge -C ~kde-base/kde{,accessibility,admin,artwork,base,edu,games,graphics,multimedia,network,sdk,toys,utils,webdev}-4.0.x

Then continue with installing split KDE ebuilds as explained earlier on this page.

Q: Where is KDE-PIM in KDE 4?

KDE-PIM wasn't released with KDE 4.0, so unfortunately you won't find it in the tree for a while. You can of course use the 3.5 versions of kmail, akregator and their friends, together with KDE 4.0.x.

Q: I tried KDE4 and realized I don't want it anymore. What should I do to get rid of it?

A: Remove KDE 4 from your package.keywords and package.unmask, then uninstall the packages you installed. Remember to update your DISPLAYMANAGER if you changed it to kdm-4.0 earlier.

Q: Does this mean KDE 3.5 will be gone soon?

A: Not at all! KDE 3.5 is very stable, and still gets minor bugfixes from upstream. While KDE 3.5 won't see new features anymore, we do plan on maintaining it for a long time.

4.  Suggestions for this guide

If you have any ideas on how to improve this guide, please mail your suggestions to kde@gentoo.org.



Print

Updated April 22, 2008

Summary: This guide provides the information needed to upgrade to and use KDE 4.0.

Ingmar Vanhassel
Author

Mark Kowarsky
Author

Tobias Heinlein
Editor

Donate to support our development efforts.

Support OSL

Support OSL

Gentoo Centric Hosting: vr.org

VR Hosted

Tek Alchemy

Tek Alchemy

SevenL.net

SevenL.net

Global Netoptex Inc.

Global Netoptex Inc.

Linux World Expo

Linux World Expo

Copyright 2001-2008 Gentoo Foundation, Inc. Questions, Comments? Contact us.