Skip to content
systemd services to run load KDE modules outside of KDE session
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information. new strategy for kcm startup Jun 17, 2013
kcm@.service After declaration. I don't know what I'm doing )) Jun 17, 2013


These files allow KDE to configure your system when KDE session is not active.

This is particularly usefull if you want to create a custom lightweight environment but

  • do not want to edit tons of configuration files
  • do not want to start KDE with all its services (akonadi, nepomuk, plasma, etc.)

KDE modules

Each aspect of system configuration is a responsibility of a dedicated KDE module. To find list of available KDE module:

$ ls /usr/share/kde4/services/kded

Modules can be loaded with dbus call to KDE daemon (kded4 process):

$ qdbus org.kde.kded /kded loadModule keyboard

This will start KDE keyboard service and will let KDE to manage keyboard configuration (layouts, repeat rate, etc.).

Workspace setup example


if [ -d /etc/X11/xinit/xinitrc.d ]; then
    for f in /etc/X11/xinit/xinitrc.d/*; do
        [ -x "$f" ] && . "$f"
    unset f
/usr/bin/kcminit kcmkded
/usr/lib/systemd/systemd --user & 
exec wmii 

It appeared important to execute kded before systemd user session is started. Otherwise kded4 won't behave as expected.

.xinitrc file is executed as usual. For example in my /etc/slim.conf I have

login_cmd           exec /bin/bash -login ~/.xinitrc 

Systemd target that is executed by default ~/.config/systemd/user/

Description=Complete workspace


Wants declaration tells sytemd to run enabled services for kcm target.

Finally, to execute workspace target on startup

$ systemctl --user enable

To enable certain KDE modules

$ systemctl --user enable kcm@keyboard.service
$ systemctl --user enable kcm@khotkeys.service
Something went wrong with that request. Please try again.