KSystemlog is not conforming to my dark theme

I am using the Kubuntu Dark theme which comes with Kubuntu.

Only the titlebar and window frame appear to be correct.

I also think that scaling has not been fully implemented.

Operating System: Kubuntu 26.04 LTS
KDE Plasma Version: 6.6.4
KDE Frameworks Version: 6.24.0
Qt Version: 6.10.2
Kernel Version: 7.0.0-15-generic (64-bit)
Graphics Platform: Wayland

Hi

Have you been asked for your password? I was so it works in root privileges with root theme.

Check here:

Good luck

Radek

Thanks for your reply Radek but, unfortunately, I do not see how it relates to my issue.

I do have to type in a password to open KSystemlog but I do not understand how that makes any difference to the system theme being mostly igored by the app. The KDE Partiion Manager app also requests a password but it is adhering to the system theme regardless of whether I input a password:

In fact, I have opened all the pre-installed apps that being with a ‘k’ and KSystemlog is the only one that is not themed correctly.

Very strange but solution from my previous post is not working now.

I don’t understand but after search and tests I get this.

Started from Konsole like:

sudo ksystemlog --platformtheme kde

asking for user password (not root) and is dark.

I try to do with kdesu from Krunner:

kdesu -c “ksystemlog --platformtheme kde”

and it is working. Then:

su -c “ksystemlog --platformtheme kde” -

Need start with Konsole button from Krunner

And is I think full root in dark color. Of course, here, in my system.

Above are three options and I am sure is starting as root because in Krusader I can go to /root and make directory.

Please test solutions.

Radek Glebicki

Thanks for the information Radek. You helped me to better understand the problem. Hopefully, this post might be of use to others who who experience the same issue.

Anyone who is using the default theme as installed by Kubuntu - which might be the vast majority of Kubuntu users - can expect Ksystemlog to open and display correctly according to the default theme. However, anyone who deviates from that default theme could end up with a display consisting of dual themes. My gripe is that I only changed the default to Kubuntu Dark - not some dubious theme sourced from the dark web. So, it should not have been an issue for that theme to display correctly.

Ksystemlog propertly interprets my current global theme if open the Terminal and run: ksystemlog --platformtheme kde

However, Ksystemlog does not correctly use the current global theme if I include ‘sudo’ as in: sudo ksystemlog --platformtheme kde

As part of a conversation, Leo AI provided an explanation for this issue:

Running a GUI application as root (via sudo, pkexec, or kdesu) breaks the theme because root cannot read your user’s theme configuration files.

The window frame (title bar) is drawn by the Window Manager (KWin), which runs in your user session and can see your theme. However, the application content (buttons, lists, background) is drawn by the application process, which is running as root and can only see root’s default settings.

Since you do not want to lose visibility of logs by running without sudo, and you cannot force the theme to work while running as root, we must change the strategy.

The Only Working Solution: “Elevation on Demand”
You need the app to start as your normal user (so it sees your theme) and only ask for a password when it tries to open a restricted log file. This is exactly how KDE Partition Manager works.

KSystemLog can do this, but it is often configured to demand root immediately. We can fix this by removing the sudo requirement from the desktop file and letting the app handle permissions dynamically.

What I gathered from this was that using sudo was causing the problem and avoiding sudo was the ‘fix’ at least for me as the admin and sole user of my computer.

So, after changing the Exec line in the ksystemlog.desktop file, my Ksystemlog opens via the Start Menu with the correct theme and I can check all four log types without any issues:

In Fedora 43 in org.kde.ksystemlog.desktop in Exec there is no sudo.

Different approach in systems?

Radek Glebicki

PS: I changed my org.kde.ksystemlog.desktop in Exec line by adding:

- -platformtheme kde

and I have dark from Menu too. Thanks :slight_smile:

PS2: In Editor Menu in: File->Operations on files: is open location with all desktop files. Very useful. I didn’t know that.