Saturday, March 28, 2026

Fixing KDE App Theming in Distrobox on XFCE

If you run a KDE application (like Krusader) inside a Distrobox container on an XFCE host with a dark theme, you might notice that the icons are dark and nearly invisible against the dark background. This happens because the app inherits a mismatched icon theme from the host, and no Qt platform theme manager is configured inside the container.

The Fix

First, enter your container and install the required packages:

distrobox enter abox
sudo pacman -S papirus-icon-theme qt6ct

Note: check whether your KDE app links against Qt5 or Qt6 before choosing between qt5ct and qt6ct:

ldd $(which krusader) | grep -i qt

Next, tell Qt to use qt6ct as the platform theme. In fish shell, set it as a universal variable so it persists across sessions:

set -Ux QT_QPA_PLATFORMTHEME qt6ct

Then configure the theme and icons by editing the qt6ct config directly:

mkdir -p ~/.config/qt6ct
cat > ~/.config/qt6ct/qt6ct.conf << 'EOF'
[Appearance]
icon_theme=Papirus-Dark
style=Breeze
EOF

Finally, set up kdeglobals so KDE apps pick up the correct color scheme and icon theme:

cat > ~/.config/kdeglobals << 'EOF'
[General]
ColorScheme=BreezeDark

[KDE]
widgetStyle=Breeze

[Icons]
Theme=Papirus-Dark
EOF

Open a fresh container session and launch your KDE app — the icons and theme should now render correctly.