This is Gentoo's testing wiki. It is a non-operational environment and its textual content is outdated.

Please visit our production wiki at https://wiki.gentoo.org

KDE

From Gentoo Wiki (test)
Jump to:navigation Jump to:search
This page is a translated version of the page KDE and the translation is 72% complete.
Outdated translations are marked like this.


Resources

KDE 是自由软件社区,提供的一组应用程序,包括流行的 Plasma 桌面环境。

Gentoo对KDE项目的支持非常好,包括对KDE Frameworks 5,Plasma 5和Applications 5的全面支持,以及其他各种各样基于KDE的软件。

准备

配置

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

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

root #eselect profile list
  [1]   default/linux/amd64/13.0
  [2]   default/linux/amd64/13.0/selinux
  [3]   default/linux/amd64/13.0/desktop
  [4]   default/linux/amd64/13.0/desktop/gnome
  [5]   default/linux/amd64/13.0/desktop/gnome/systemd
  [6]   default/linux/amd64/13.0/desktop/plasma
  [7]   default/linux/amd64/13.0/desktop/plasma/systemd
  ...

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

root #eselect profile set X
如果要使用 Plasma 5 桌面环境,请选择desktop/plasma  OpenRC或者 desktop/plasma/systemd  systemd/zh-cn

服务

在安装 KDE 软件之前,建议先设置并启用几个别的服务。它们当中的一部分已经由 desktop/plasmadesktopPortage配置设定好了。这些服务是:

  • D-Bus: 启用 D-Bus 信息总线系统(D-Bus message bus system)。
  • polkit: 启用 polkit 框架以控制系统中的服务的权限。
  • udev: 启用对 udev —— Linux 下的动态的、常驻后台的自动为设备命名的服务(dynamic and persistent device naming service) ——的支持。
  • udisks: 启用一些与存储相关的服务。

根据上面的链接中的信息来了解如何设置并启用那些服务。注意:别的 USE 旗标组合从技术上可能是可以让它们运行的,但是可能会出现不支持,或者是带来不可预期的功能缺失(特别是如果选择的 USE 旗标是与完整的 KDE plasma 桌面环境冲突的)。

X 服务

阅读下列来自 X server 的介绍来设置 X 环境。

Plasma

Plasma 5 是 KDE 正在发展的一代桌面环境,基于 Qt 5 和 KDE Framework 5 。

可用版本

KDE Gentoo Repository Status
KDE Plasma 5.8.5 LTS kde-plasma/plasma-meta-5.8.5 gentoo Stable for amd64 and x86; Testing for arm
KDE Plasma 5.8.6 LTS kde-plasma/plasma-meta-5.8.6 gentoo Testing for amd64, arm and x86
KDE Plasma 5.8 stable branch kde-plasma/plasma-meta-5.8.49.9999 kde overlay Live version
KDE Plasma 5.9.3 kde-plasma/plasma-meta-5.9.3 gentoo Testing for amd64, arm and x86
KDE Plasma 5.9 stable branch kde-plasma/plasma-meta-5.9.49.9999 kde overlay Live version
KDE Plasma master branch kde-plasma/plasma-meta-9999 kde overlay Live version
附注
在继续安装之前,请确保选择了一个 Plasma 的Portage配置。 KDE 4 用户则需要一些额外的步骤。

从 KDE 4 升级

能在这个 升级页面 找到有关如何从 plasma 4 升级, 迁移和疑难解答的信息。

安装

kde-plasma/plasma-meta 包提供完整的 Plasma 5 套件,由以下 USE 旗标配置:

USE flags for kde-plasma/plasma-meta Merge this to pull in all Plasma 6 packages

accessibility Add support for accessibility (eg 'at-spi' library)
bluetooth Enable Bluetooth Support
browser-integration Enable integration with Chrome/Firefox with browser extensions
colord Enable kde-plasma/kwin color management via x11-misc/colord
crash-handler Pull in kde-plasma/drkonqi for assisted upstream crash reports
crypt Pull in kde-plasma/plasma-vault for encrypted vaults integration
cups Add support for CUPS (Common Unix Printing System)
desktop-portal Enable sys-apps/xdg-desktop-portal backend implementation for Plasma
discover Pull in resources management GUI; a centralised GHNS alternative and optional sys-apps/fwupd frontend
display-manager Pull in a graphical display manager
elogind Enable session tracking via sys-auth/elogind
firewall Pull in kde-plasma/plasma-firewall for system firewall administration
flatpak Pull in kde-plasma/flatpak-kcm for flatpak permissions administration
grub Pull in Breeze theme for sys-boot/grub
gtk Enable Breeze widget style and system settings module for GTK+
handbook Enable handbooks generation for packages by KDE
kwallet Enable support for KWallet auto-unlocking via kde-plasma/kwallet-pam
legacy-systray Add support for legacy applications using kde-plasma/xembed-sni-proxy
networkmanager Enable net-misc/networkmanager support
oxygen-theme Pull in Oxygen icons, sound theme and visual style for KDE Plasma
plymouth Pull in Breeze theme for sys-boot/plymouth
pulseaudio Install Plasma applet for PulseAudio volume management
qt5 Pull in required packages for seamless integration of KF5/Qt5-based applications
sddm Pull in the x11-misc/sddm display manager and system settings module
sdk Pull in kde-plasma/plasma-sdk for Plasma development
smart Pull in kde-plasma/plasma-disks for disk health monitoring
systemd Enable use of systemd-specific libraries and features like socket activation or session tracking
thunderbolt Pull in kde-plasma/plasma-thunderbolt control center module
unsupported Allow packages that are known to ruin runtime experience ** DO NOT FILE BUGS WITH THIS ENABLED **
wacom Pull in kde-plasma/wacomtablet control center module
wallpapers Install wallpapers for the Plasma Workspace
webengine Use kde-apps/khelpcenter to access the locally installed KDE Help System Handbook
xwayland Enable Wayland windows screensharing to XWayland applications via gui-apps/xwaylandvideobridge

root #emerge --ask kde-plasma/plasma-meta

你也可以选择通过安装 kde-plasma/plasma-desktop 获得一个基本的桌面环境,让你用户自己安装需要的软件:

root #emerge --ask kde-plasma/plasma-desktop
附注
请注意这样的安装方式会导致一些重要的包缺失,比如 kde-plasma/powerdevil (电源管理,睡眠和休眠选项)和 kde-plasma/systemsettings ,如果你用了上面这种方式请手动安装这两个软件包。

小工具

kde-plasma/kdeplasma-addons 提供了很多有用的小工具 (早就被 kde-plasma/plasma-meta作为依赖安装了):

root #emerge --ask kde-plasma/kdeplasma-addons

显示管理器

SDDM (Simple Desktop Display Manager) 是被推荐的登录管理器并且它默认会通过 kde-plasma/plasma-meta 被自动安装。 另外你也可以选择使用 LightDM ,这需要为 kde-plasma/plasma-meta 设置 -sddm 的 USE 旗标, 同时还要修改 /etc/conf.d/xdm 中的设置。 同时在发生错误时请阅读 SDDM 页面。

KWallet 自动解锁

许多用户被推荐使用 kde-frameworks/kwallet, Plasma桌面的密码管理器, 再你登录桌面后连接(无线)网络。 在现在的很多发行版上还有第二个KWallet服务 - kde-apps/kwalletd 为基于kdelibs4的程序提供相同的储存密码功能。 kde-plasma/kwallet-pam 提供了避免用户在登录后需要再次输入密码访问kwallet的功能。

root #emerge --ask kde-plasma/kwallet-pam

需要如下的配置:

  • 为了KWallet的安全性,请使用比较传统的blowfish加密,而不是GPG
  • 在kwallet和用户使用相同的密码
  • 让登录管理器支持PAM特性 - x11-misc/sddmx11-misc/lightdm 都支持
FILE /etc/pam.d/sddmAdding lines for KWallet PAM unlocking via SDDM
-auth           optional        pam_kwallet5.so
-session        optional        pam_kwallet5.so auto_start
# 下面两行也会解锁基于kdelibs4的程序
-auth           optional        pam_kwallet.so kdehome=.kde4
-session        optional        pam_kwallet.so
Note
对于LightDM, 需要自己编辑/etc/pam.d/lightdm

对于管理kwallet,导入或导出密码,这里有个kde-apps/kwalletmanager

root #emerge --ask kde-apps/kwalletmanager

用于管理基于kdelibs4的程序,比如 kopete 和 kmail4:

root #emerge --ask kde-apps/kwalletmanager:4

SSH/GPG 密钥启动/关闭脚本

ssh-agent 脚本位于 /etc/plasma/startup/etc/plasma/shutdownKeychain 提供了更多信息

应用程序(Applications)

与很多基于 Qt 5/KDE Frameworks 5 和/或 基于 Qt 4/KDElibs 4 的应用程序和支持库一起发布(而后者依旧处于长期服务模式)。在Portage 树当中,使用slots 45 来区分。 上游正在进行从 KDE 4 到 5 的迁移,这可以从每次主要版本更新当中看出。这之中即有已经成熟的 Plasma 5 程序,也有新迁移过来的程序。注意,这同时意味着大版本更新时可能会造成依赖的冲突。当两个不同的软件包依赖于 slot 4 和 5 的相同库的时候将无法被安装:无法同时安装的相同库 - 此类包从* -meta中删除。

可用版本

KDE Gentoo Repository Status
KDE Applications 16.08.3 kde-apps/kde-apps-meta-16.08.3 gentoo Stable for amd64 and x86
KDE Applications 16.12.2 kde-apps/kde-apps-meta-16.12.2 gentoo Testing for amd64 and x86
KDE Applications 16.12 stable branch kde-apps/kde-apps-meta-16.12.49.9999 kde overlay Live version
KDE Applications master branch kde-apps/kde-apps-meta-9999 kde overlay Live version

KDE Applications这个包会安装以下包:

Package name Description
kde-apps/kdeaccessibility-meta Accessibility applications and utilities.
kde-apps/kdeadmin-meta Administrative utilities, which helps in managing the system.
kde-apps/kdecore-meta Basic applications such as file browser, editor, terminal emulator.
kde-apps/kdeedu-meta Educational applications and games.
kde-apps/kdegames-meta Standard desktop games.
kde-apps/kdegraphics-meta Graphics applications such as image viewers, color pickers, etc.
kde-apps/kdemultimedia-meta Audio and video playback applications and services.
kde-apps/kdenetwork-meta Network applications and VNC services.
kde-apps/kdepim-meta PIM applications such as emailer, addressbook, organizer, etc.
kde-apps/kdesdk-meta Various development tools.
kde-apps/kdeutils-meta Standard desktop utilities such as a archiver, a calculator, etc.
kde-apps/kdewebdev-meta Web development tools.

安装

kde-apps/kde-apps-meta 包提供完整的应用程序集合,但是可替代地,可以挑选来自上述列表的一个或多个较小的元包:

root #emerge --ask kde-apps/kde-apps-meta

本地化

While Frameworks and Plasma are shipping their translations per-package, localization of KDE Applications is provided via separate *-l10n packages. The nls 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 /etc/portage/make.conf. E.g. to use the German language, set:

FILE /etc/portage/make.confSetting the L10N variable for the German language
L10N="de"

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

root #emerge --ask kde-l10n kde4-l10n kdepim-l10n

While the first two contain translations for the majority of KDE Applications (slot 5 and 4), the latter directly corresponds to - and is only relevant to users of - kde-apps/kdepim-meta or its related packages.

KDE PIM

可用版本

In Portage, three variants of the KDE Personal Information Management (KDE PIM) suite (including kde-apps/kmail, kde-apps/kontact, and kde-apps/korganizer) are available.

KDE Gentoo Repository Status
KDE PIM 4.4.2016.01 kde-apps/kdepim-meta-4.4.2016.01 gentoo Stable for amd64 and x86
KDE PIM 4.14.11_pre20160211 kde-apps/kdepim-meta-4.14.11_pre20160211 gentoo Stable for amd64 and x86
KDE PIM 16.12.2 kde-apps/kdepim-meta-16.12.2 gentoo Testing for amd64 and x86

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 /etc/portage/package.mask 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:

FILE /etc/portage/package.use/kdepim-4
>=app-crypt/gpgme-1.8.0 -cxx -qt5
app-office/kmymoney:4 pim
>=kde-apps/kwalletd-16.04.3-r1 -gpg
>=kde-frameworks/kwallet-5.29.0-r1 -gpg
root #emerge --ask kde-apps/kdepim-meta

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 dev-qt/qtwebkit to dev-qt/qtwebengine which is based on Chromium's Blink. By default, this package sets and uses the system-ffmpeg USE flag, which comes down to a media-video/ffmpeg package dependency, so users preferring media-video/libav 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 kde-apps/kopete, kde-apps/klinkstatus, and possibly other packages outside of the kde-apps category. By default, these packages are no longer installed by kde-apps/kde-apps-meta.

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

root #equery -q d kde-apps/kdepim-common-libs | sed -e "s/-[0-9].*//" | xargs emerge --deselect
root #equery -q d kde-apps/kdepimlibs | sed -e "s/-[0-9].*//" | xargs emerge --deselect
root #equery -q d kde-apps/akonadi | sed -e "s/-[0-9].*//" | xargs emerge --deselect
Note
This requires app-portage/gentoolkit to be installed. The Gentoolkit article provides more information about this useful utility.

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

FILE /etc/portage/package.use/kdepim-16.12
app-accessibility/simon -pim
app-office/calligra:4 -pim
kde-apps/kget:4 -gpg
<=kde-apps/kwalletd-16.04.3:4 -gpg
kde-apps/pykde4 -akonadi
kde-misc/tellico:4 -addressbook

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

root #emerge --ask kde-apps/kdepim-meta

kdesu5

该工具由 kde-plasma/kde-cli-tools 提供,用于以 root 身份运行 GUI 程序。如果安装时启用了 kdesu 这个 USE 旗标,一个 kde-frameworks/kdesu 的图形前端会被安装,你可以通过执行 kdesu5 来使用它。

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

框架(Frameworks)

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

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

可用版本

KDE Gentoo Repository Status
KDE Frameworks 5.29.0 kde-frameworks/*-5.29.0 gentoo Stable for amd64 and x86; Testing for arm
KDE Frameworks 5.31.0 kde-frameworks/*-5.31.0 gentoo Testing for amd64, arm and x86
KDE Frameworks master branch kde-frameworks/*-9999 kde overlay Live version

更多KDE软件

最主要的 KDE 应用程序在 Porage 树的 kde-appskde-misc 分类中。

另请参阅

外部资源