For the complete documentation index, see llms.txt. This page is also available as Markdown.

10.1 KDE 6 Desktop Environment (X11 Session)

KDE Plasma is an easy-to-use modern desktop environment that provides a collection of applications with consistent appearance and interaction experience, including unified menus and toolbars, keyboard shortcuts, color schemes, localization support, and centralized, dialog-driven desktop configuration tools.

The KDE desktop environment draws on the interaction paradigms of various desktop environments such as Windows, and the two share similarities in interface design. It may also be that Windows drew more inspiration from the KDE desktop.

Tip

Video tutorial available at: Chinese FreeBSD Community (CFC). 003-FreeBSD14.2 Installing KDE6[EB/OL]. [2026-03-26]. https://www.bilibili.com/video/BV12zAYeKEej.

Installing the Complete KDE Desktop Environment

Tip

Users who do not wish to bundle-install a large number of additional tools and software can use the minimal installation option below; users who do not need custom configuration can continue with this option.

  • Install using pkg:

# pkg install xorg sddm kde wqy-fonts

Tip

If prompted that the pkg command is not found or the kde package is not provided, the binary package may not have been built yet, or you may need to switch the package repository branch. Refer to other relevant chapters in this book. If no binary package is available, install using Ports.

  • Or install using Ports:

# cd /usr/ports/x11/xorg/ && make install clean
# cd /usr/ports/x11/kde/ && make install clean
# cd /usr/ports/x11/sddm/ && make install clean
# cd /usr/ports/x11-fonts/wqy/ && make install clean

Package Description

Package
Purpose

xorg

X Window System

sddm

Display Manager

kde

KDE Desktop Environment

wqy-fonts

WenQuanYi Chinese Fonts

Startup Configuration

D-Bus is used for inter-process communication in the desktop environment and is automatically installed as a dependency.

Enable D-Bus:

Enable the SDDM display manager:

KDE 6 Interface

startx

Note

If the above command was previously executed as root, new users still need to execute it once more to properly run startx (no root privileges or sudo required).

Permission Configuration

Regular users must also be added to the wheel and video groups, otherwise some settings will not display and graphical interface functionality may be limited:

Replace "username" with the actual username.

Configuring the Chinese Environment

Set the SDDM Display Manager Language to Simplified Chinese

Execute the command:

System Chinese Environment Configuration Method ① User-level Configuration

Edit the /etc/login.conf file: find the default:\ section and change :lang=C.UTF-8 to :lang=zh_CN.UTF-8.

After editing, it should look like this:

Rebuild the capability database based on the /etc/login.conf file:

SDDM
KDE 6

System Chinese Environment Configuration Method ② System Settings

Click the Application Launcher → System Settings → Language & Time, click Modify in the Language field of Region & Language, find and select "Simplified Chinese". If it displays as □□□□, check whether Chinese fonts are installed. Then click the Apply button; after logging out and logging back in, the system language will switch to Chinese.

KDE 6
KDE 6

References

Appendix: Minimal KDE Desktop Installation

Installing x11/kde directly will also install various Plasma desktop components and x11/kde-baseapps as dependencies, which bundles a large number of utility software that may not be convenient for deployment and use in certain scenarios.

Install using pkg

Basic desktop installation.

Package
Purpose

plasma6-kactivitymanagerd

A system service that manages user activities and tracks usage patterns. Missing this service may cause the KDE desktop to not display properly

plasma6-kscreen

KDE screen manager. Without this package installed, resolution cannot be adjusted

plasma6-sddm-kcm

SDDM configuration module, used to configure SDDM in System Settings

plasma6-systemsettings

System Settings

Packages already listed above are not repeated here.

Optional packages:

Package
Purpose

konsole

Terminal command-line tool

dolphin

File manager

kate

Text editor

plasma6-plasma-systemmonitor

System monitor

plasma6-plasma-pa

Audio management

plasma6-discover

Software management

kdeconnect-kde

Mobile device and desktop interconnection

plasma6-plasma-workspace-wallpapers

Desktop wallpapers

plasma6-plasma-disks

Disk health (S.M.A.R.T.) monitoring

ark

Archive manager

Install using Ports

Basic desktop installation.

Optional Ports:

xinitrc

Note

If using the KDE minimal installation option, the .xinitrc file must be configured.

Minimal KDE Installation Screenshots

Tip

The KDE desktop installed with this option lacks many features. You can refer to the "Runtime dependencies" and "Library dependencies" of x11/plasma6-plasma to add missing functionality.

Without optional packages installed:

Minimal KDE Installation Interface

Appendix: Expanding Taskbar Icons

Right-click on an empty area of the desktop, then click "Enter Edit Mode".

Enter Edit Mode

Click on the empty area in the middle of the taskbar, then click "Show Alternatives".

Show Alternatives

Select "Icons and Text Task Manager" in the popup window.

Icons and Text Task Manager

Appendix: Resolving Automatic Opening of Specific Programs at Startup

Open Settings, select "Session" → "Desktop Session", and in "Session Restore" on the right, change it to "Start with an empty session". Finally, click "Apply" in the bottom right corner to save.

Start with an empty session

Desktop Theme Customization

The following installs the WhiteSur theme.

  1. Download the theme source package: git clone https://github.com/vinceliuice/WhiteSur-kde

  2. Enter the theme package directory: cd WhiteSur-kde

  3. Modify the shebang: edit the install.sh file, change the first line to #!/usr/local/bin/bash, then save.

  4. Run the installation: bash install.sh

Background Images

Download link.

Troubleshooting and Outstanding Issues

SDDM Login Crash

If the SDDM bottom options are not displayed in a VMware virtual machine, follow the tutorial in the virtual machine configuration chapter to set up automatic screen scaling.

Starting SDDM Shows /usr/bin/xauth: (stdin):1: bad display name, but startx Still Works Normally

You need to check in the /etc/rc.conf file whether hostname="XXX" is set (this entry should exist and should not be hostname=""):

Check if hostname is set

Set hostname as needed.

Edit the /etc/sysctl.conf file and change the value of security.bsd.see_other_uids to 1. It will take effect after reboot. 1 means enabled; the default value is 1, which may have been incorrectly set during installation as a security hardening option.

If this does not work, check whether "User Session" (which reads the .xinitrc file) was selected on the SDDM interface; you should select plasma-x11 instead.

References

Disabling Automatic Screen Lock

Click "Settings" → "Security & Privacy" → "Screen Locking" → "Automatically lock screen" and select "Do not lock automatically", then click "Apply". (Locking the screen after waking from suspend can be configured as needed)

Log out and log back in for it to take effect.

Disable KDE 6 Screen Lock

Status Bar Not Showing Time and Date

Open the timezone settings and select the "Asia/Shanghai" timezone. If it still does not work, update the relevant packages first.

Last updated