Use KDE Apps in DWM

Hello.

On my setup I use Plasma and with dwm. Sometimes - especially on a single monitor setup I prefer using dwm.

I love the KDE-apps, especially Dolphin, Konsole and Kate - those I use in all my setups. Also i love the plasma command line utils - i mostly use “plasma-apply-colorscheme” to set a consistent color-scheme for the KDE apps.

I know, KDE-apps are designed for Plasma, but I would love to use them outside Plasma. It seems to me that they rely on dbus and some kde-services, that are missing when starting dwm with startx.

Here is my xinit:

# Try to set KDE environment variables
export $(dbus-run-session)
#export KDE_FULL_SESSION=true
export XDG_CURRENT_DESKTOP=DWM

# Start dwm
exec dwm

When I start dwm with startx, there are a few problems with coloring.

  • most kde apps read their colorsheme form “~/.config/kdeglobals”
  • dolphin applies the colors from there too, but fails to apply the secondary color witch gets set to default white. This results in dolphin being unusable.
    -dolphin cannot find any apps, when clicking on a file, an empty dialog pops up. If a binary is choosen by file picker, dolphin remembers the choice until it is closed.

So, the way I use startx does not result in a good experience with the kde apps. Maybe there are missing some services?

The second attempt I have is using SDDM and kind of “misusing” the desktop session file:

/user/share/xsessions/dwm-test.desktop
[Desktop Entry]
Encoding=UTF-8
Name=DWM-test
Comment=Dynamic Window Manager
Icon=dwm
DesktopNames=KDE
Exec=dwm
Type=XSession

Most of the time all services work when I start it this way. Sometimes dolphin cannot find any apps, then I have to start plasma x or wayland and execute:
kbuildsycoca6. This brings the apps back and dolphin then knows again how to open files.

I would love to learn how exactly the KDE apps communicate, that means which service they are using and how those connect. What exactly is SDDM doing when booting in the KDE session? Can you provide links to relevant docummentation (I tried to determine it myself for a few weeks on and of and am a little lost on that)? How to examine the KDE communication (i tried to use the dbus-listener, but as soon as I click anything on dolphin there are so many messages - it results in 10000+ lines - the capturing period is < 1s)?

Thanks a lot for any hint! :slight_smile: