KDE/zh-cn

KDE 是自由软件社区，提供为数众多的应用程序，包括流行的 Plasma 桌面环境.

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

配置
选择一个适当的Portage配置，尽管这不是必须的，但是我们仍建议这么做. 因为这会设置一些全局或针对特定软件包的 USE 旗标来确保你能够获得顺畅的 KDE 使用体验.

为了选择适当的Portage配置，首先需要列出有哪些可用的Portage配置：

然后选择正确的Portage配置，把下面的命令中的 替换为合适的Portage配置对应的数字：

For Plasma 5 desktop environment choose  with OpenRC or   with systemd.

服务
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
阅读下列来自 X server 的介绍来设置 X 环境.

Plasma
Plasma 5 是 KDE 的下一代桌面环境，基于 Qt 5 和 KDE Framework 5. 升级它相当简单，尽管上游使它不能和 Plasma 4 共存.

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

Installation
包提供完整的 Plasma 5 套件，由以下 USE 旗标配置：

你也可以选择通过安装 获得一个基本的桌面环境，让你用户自己安装需要的软件：

Widgets
Many useful widgets are in the package (already pulled in by ):

Display manager
SDDM （Simple Desktop Display Manager） 是被推荐的登录管理器并且它默认会通过 被自动安装. 另外你也可以选择使用 LightDM ,这需要为 设置   的 USE 旗标， 同时还要修改  中的设置. 同时在发生错误时请阅读 SDDM 页面.

KWallet auto-unlocking
Many users will be introduced to, Plasma's safe password management, while adding a (wireless) network connection after login. On many systems, there will actually be a second KWallet service present - is there to provide the same password storage functions to kdelibs4-based applications. provides a mechanism to avoid being subsequently asked for access to kwallet after login.

It requires the following setup:
 * For KWallet security, use classic blowfish encryption instead of GPG
 * Choose same password for login and kwallet
 * Configure a display manager with support for PAM - both and  fulfill that requirement:

For managing kwallets, importing and exporting passwords, there is :

For managing kwallets for kdelibs4-based applications like kopete or kmail:4:

SSH/GPG Agent startup/shutdown scripts
ssh-agent scripts are located in and. The Keychain article provides more information about this.

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 when two packages depend on slot 4 and 5 of the same library that can not be installed at the same time - such packages are dropped from *-meta.

可用版本
KDE Applications is divided in the following meta packages:

Installation
The package provides the full Applications bundle, but alternatively, one or several smaller meta packages from the list above may be picked instead:

本地化
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 instead, 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  directly corresponds to - and is only relevant to users of -  or its related packages.

Available versions
In Portage, three variants of the KDE Personal Information Management (KDE PIM) suite (including, , and ) are available.

KDE PIM 4.14.11 and earlier
At the time of writing, the current stable version range is at 4.14.11, which includes an Akonadi-based kmail (also known as kmail2) and is still based on Qt 4/KDElibs 4.

In addition, a "noakonadi fork" is available as version 4.4.2016.01 (also known as kmail1). Adding a mask file to is necessary to get it:

Both variants are beginning to conflict with newer versions of packages. Adding certain per-package USE flag settings can solve some conflicts currently:

KDE PIM 16.12 and later
The latest upstream release based on Qt 5/KF 5 remains testing until it is deemed suitable for stable use, but testing is appreciated. 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:

Some conflicts with older packages may be solved by adding per-package USE flag settings:

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

kdesu5
该工具由 提供，用于以  身份运行 GUI 程序. 如果安装时启用了  这个 USE 旗标，一个  的图形前端会被安装，你可以通过执行  来使用它.

请务必确保那条命令真的需要以 身份执行，而不是只需要添加普通用户到相关的用户组或者不需要特权也能运行.

Frameworks
KDE Frameworks 5 是为KDE Plasma 5 和 KDE Applications 5 的运行库和软件框架的合集，但是可能会受到一些 Qt 程序的影响.

KDE 框架大部分是运行库，只提供少量的面对用户的功能. 它不需要被手动安装 —— 需要的软件包会被作为别的软件包的依赖自动安装.

更多KDE软件
The most important KDE applications are in the Gentoo repository and many are located in the kde-apps and kde-misc categories.

另请参阅

 * KDE troubleshooting - An extended article on troubleshooting KDE.
 * KDE overlay - Instructions on adding Gentoo's KDE overlay.
 * KDE removal and clean up - Instructions on removing and cleaning up KDE.
 * kde-sunset overlay - For old KDE versions that have been removed from the main tree.