KDE

KDE is a free software community, producing a wide range of applications including the popular Plasma desktop environment.

Gentoo support for KDE is excellent, with comprehensive packaging of the legacy Plasma 4, next generation KDE Frameworks 5, Plasma 5, and Applications 5, as well as a wide array of other miscellaneous KDE-based software.

Profile
Choosing an appropriate profile, although not required, is recommended as it sets a number of global and package-specific USE flags to ease installation and ensure a smooth KDE experience.

In order to choose the most suitable profile, first list what's available:

Then, select the right profile, substituting  with the appropriate profile number:

For Plasma 5 desktop environment choose  with OpenRC or   with systemd. For legacy Plasma 4 desktop environment it is recommended to use the  profile, which is tailored for use with OpenRC. If systemd is used, choose  instead.

Services
Before installing KDE related software it is recommended that several other services are set up first. Part of that is done automatically if a desktop/plasma or desktop profile is used. These services are:
 * D-Bus: Enables use of the D-Bus message bus system.
 * polkit: Enables the polkit framework for controlling privileges for system-wide services.
 * udev: Enables support for udev Linux dynamic and persistent device naming.
 * udisks: Enables support for some storage related services.

Follow the links for information how to set up these services. Note that other USE flag combinations than set in this profile may technically be possible (especially if selected applications are run instead of a full KDE Plasma desktop environment), but may be unsupported, untested, or lead to unexpected loss of functionality.

X server
Read and follow the instructions in the X server article to setup the X environment.

Frameworks
KDE Frameworks 5 is a collection of libraries and software frameworks that provide the foundation for KDE Plasma 5 and KDE Applications 5, but may be leveraged by any Qt application.

As Frameworks are mostly libraries and provide little user functionality, it's not necessary to install them manually - the required packages will be pulled in automatically as dependencies.

Plasma
Plasma 5 is the next generation of KDE's desktop environment, based on Qt 5 and KDE Frameworks 5. Upgrading is fairly simple, although it cannot be coinstalled with Plasma 4 due to upstream design decisions.

Note that while Plasma 5 is perfectly usable, it is still in development and missing some features present in KDE 4.

Upgrade from Plasma 4
Information on how to upgrade from Plasma 4, migration and troubleshooting can be found on the upgrade page.

Installation
The package provides the full Plasma 5 suite, configured by the following USE flags:

Alternatively, provides the basic desktop, leaving users free to install only the extra packages they require:

Widgets
Many useful widgets are in the package:

Display manager
SDDM (Simple Desktop Display Manager) is the recommended login manager and is pulled in automatically via by default. This is the preferred option. Alternatively, LightDM can be used and pulled in by setting USE flag  for. Change the setting accordingly in. Also, be sure to read through the SDDM page if further issues appear.

Applications
Releases consist of various applications and supporting libraries based on Qt 5/KDE Frameworks 5 as well as Qt 4/KDElibs 4, with the latter still being in long term support mode. In Portage, the distinction is made using slots  and. Porting is an ongoing process where each major release is making inroads to Frameworks 5, and therefore contains both well matured and newly ported applications. Note that it also means potential dependency conflicts even within one major release, when two packages depend on slot 4 and 5 of the same library that can not be installed at the same time. The meta packages are taking these conflicts into account and will in some cases prefer the more reliable version over a new port.

Available versions
The package provides the full Applications bundle:

It will install the following smaller meta packages, which of course can also be hand-picked:

Localization
While Frameworks and Plasma are shipping their translations per-package, localization of KDE Applications is provided via separate  packages. The  USE flag is enabled by default for linux profiles, and it is used by KDE Applications meta packages to pull in the necessary dependencies.

If only a select few languages are desired, define the L10N variable in. E.g. to use the German language, set:

To manually install these localization packages, use the following (complete) list or pick as desired:

While the first two contain translations for the majority of KDE Applications (slot  and  ), the latter two directly correspond to - and are only relevant to users of -  and  and their related packages.

has its own localization package too:.

Available versions
In Portage, three variants of KDE PIM, the KDE personal information management suite (including, , and ) are available. The current stable version with an Akonadi-based kmail (also known as kmail2) is installed by default, still based on Qt 4/KDElibs 4. By locally placing a mask file into, the "noakonadi fork" is used including a non-Akonadi kmail (also known as kmail1). Finally, the latest upstream release based on Qt 5/KF 5 remains masked until it is deemed suitable for wider use, but testing is appreciated. Adding an unmask file to is necessary to get it.

Update to KDE PIM 16.08 and later
Most, but not all of the codebase has been ported from to  which is based on Chromium's Blink. By default, this package sets and uses the  USE flag, which comes down to a  package dependency, so users preferring  for the rest of their system will need to switch off that USE flag.

Unfortunately, not all of the KDE Applications are compatible yet, with some packages still depending on Qt 4/KDElibs 4 based parts that can not be installed with modern KDE PIM at the same time. That includes, , and possibly other packages outside of the kde-apps category. By default, these packages are no longer installed by.

The following commands will deselect any packages from world that would still depend on these conflicting packages:

With all that prepared, KDE PIM is ready to be installed:

kdesu5
The utility that is used to run GUI programs as is provided by. If built with USE flag, a graphical frontend to  is installed, which can be used by invoking.

As always, ensure that the command actually needs to run as, versus adding the regular user to the relevant groups or simply just running the command unprivileged.

Plasma 4
Plasma 4 is the previous major workspace version by KDE. Although it is no longer maintained upstream, it is considered stable and might still be a viable alternative for some.

Available versions
This will pull in additional  and   packages.

Widgets
Many useful widgets are in the package:

Display manager
KDM (KDE Display Manager) is the long-serving login manager for Plasma 4 although any other login manager can be used.

OpenRC
Set KDM as the default display manager:

To start KDM on boot, add xdm to the default runlevel:

To start KDM now:

systemd
Enable KDM at boot time through :

Now start the service:

More KDE software
The most important KDE applications are in the portage tree and many are located in the kde-apps and kde-misc categories.

External resources

 * Official KDE user wiki
 * Official KDE forum
 * KDE-Apps.org
 * KDE-Look.org
 * KDE-Files.org