Myrlyn Theme Query

So, I just logged in into plasma just to set up the theme as dark, for myrlyn to open dark themed, but it didn’t work. I haven’t installed qt6ct nor do I have the ~/.config/openSUSE/myrlyn-sudo.conf file since I read in one of the linked githubs that just setting the theme as dark for root was enough.

Should I open a bug in github instead?

This screenshot is with a root user session. the theme is not respected even with root.

No; this is not a problem of Myrlyn.

But you could look into Myrlyn’s log file how the QT_ environment variables are set. Maybe they can give a hint.

sure, I can do that, what’s the location for the file?

I just thought that since the theme was dark for root and I opened myrlyn from that root session it would respect the theme for root

/tmp/myrlyn-root/myrlyn.log (it tells you if you start it from a shell)

Since you are already logged in as root, you started it simply with myrlyn, right? if not, please do that first.

I started it using the desktop icon in the menu. should I start it from cli?

Yes. Always try the simple things first - with no interference by any other layer.

Also check if packages kf6-frameworkintegration-plugin and plasma6-integration-plugin are installed, and if not, install them.

both are installed.

if I start it from konsole it does respect the dark theme. If i start it using the icon it does not respect it. (this in the root plasma session).

I’m looking at the logs specifically searching for qt (ignoring case) and the only variable set at least in the logs is QT_WAYLAND_RECONNECT=1

btw should we move this to somewhere else? I think I should have created a proper thread. sorry :frowning:

This thread is already messed up beyond repair. :upside_down_face:

So the shell that started your Wayland session appears to have a different environment than the shell that you start from the konsole window. What and why, I don’t know.

But we do know that Myrlyn does indeed use the configured theme inside a root desktop session. Good.

Now log out of that root desktop session and log into your normal user’s desktop session and try (again from a konsole window) myrlyn-sudo. If that uses the light theme, try sudo -E myrlyn, then maybe kdesu myrlyn.

I ran these from konsole inside my plasma root session:

run with myrlyn-sudo does not respect theme

/tmp/myrlyn-root # rg -i qt myrlyn.log 
4:2026-10-22 11:44:13.880 [19656] <Info>    main.cc:169 logVersion():  myrlyn-1.0.0 built with Qt 6.11.1

run only with myrlyn it does respect theme

/tmp/myrlyn-root # rg -i qt myrlyn.log
4:2026-10-22 11:44:51.002 [19758] <Info>    main.cc:169 logVersion():  myrlyn-1.0.0 built with Qt 6.11.1
7:2026-10-22 11:44:51.033 [19758] <Debug>   MyrlynApp.cc:126 logQtEnv():  QT_WAYLAND_RECONNECT=1

This from a normal user session:
myrlyn-sudo does not respect

rg -i qt myrlyn.log 
4:2026-10-22 11:50:37.098 [22184] <Info>    main.cc:169 logVersion():  myrlyn-1.0.0 built with Qt 6.11.1

running either sudo -E myrlyn or kdesu myrlyn let the myrlyn be dark and both set the QT_WAYLAND_RECONNECT=1

OK. Please notice that we are now in a new thread.

I guess the solution for me is just a matter of overriding the desktop file to use kdesu myrlyn and it’s good enough for me. But not sure if you want me to keep on debugging this for a more general solution?

So, the pragmatic way to move on from here is that you copy myrlyn.desktop to your own personal menu and exchange the command line with kdesu myrlyn and the name with something like My Myrlyn so you can tell them apart.

This solves the problem for you.

But I’d still be interested what environment variable is missing in myrlyn-sudo so I can add it for other users; to save them from going through all that hassle that you just had to.

You could check with env what environment variables there are, then copy the myrlyn-sudo script and add environment variables that look related to the topic; things with KDE or PLASMA or WAYLANDor THEME in the name.

There was also the question if this line

XDG_RUNTIME_DIR=/run/user/0

should rather be

XDG_RUNTIME_DIR=/run/user/$UID

(or commented out).

You can create a new system-submenu for myrlyn using the command kdesu myrlyn
You can add it in the kde panel to launch myrlyn and it will follow your color schemes.
That’s what I did

I’d really like to make this work out of the box with plain myrlyn-sudo.

So please help to figure out what environment variables are missing!

2 Likes

This on a normal user session.
I copied myrlyn-sudo to my ~/bin and ran it from there

ENV="$ENV KDE_FULL_SESSION=true"
# Uncomment for debugging
echo $ENV

that variable alone made it work

Also, on a normal user session from a root konsole launching myrlyn (no sudo) makes it not respect the theme, but if run KDE_FULL_SESSION=true myrlyn from that elevated konsole, it respects the theme.
In that same elevated konsole if I run KDE_FULL_SESSION=true myrlyn-sudo it does not respect the theme at all.

now. I’m not sure if I really had to change the theme for root at all. I’ll check that later and let you know.

nope, that did not work on my other computer. however if I launch kdesu myrlyn on that computer the theme is respected. I’ll try to inspect some other variables.

The idea actually was to add environment variables here:

Only the name, not the value. That should keep the old value of all those listed environment variables across the sudo call. Please add it here like this:

ENV_KEEP="DISPLAY WAYLAND_DISPLAY XAUTHORITY \
KDE_FULL_SESSION \
XDG_RUNTIME_DIR XDG_CURRENT_DESKTOP XFCE_THEME \
QT_QPA_PLATFORMTHEME QT_ENABLE_HIGHDPI_SCALING QT_SCALE_FACTOR \
LANG LANGUAGE LC_MESSAGES LC_COLLATE LC_NUMERIC LC_TIME LC_ALL"

Important: The backslash \ must be the last character on the line, no blanks or anything after it.

https://share.google/aimode/jbGxWB1JsafSZoGig

in my other computer, which does not have a theme at all for root user since I have never logged in using plasma as root, adding these 2 variables KDE_FULL_SESSION XDG_CONFIG_HOME, both are required I tested it, makes myrlyn-sudo respect the theme. That also works on this computer that has a dark theme for root user

ENV_KEEP="DISPLAY WAYLAND_DISPLAY XAUTHORITY \
KDE_FULL_SESSION \
XDG_RUNTIME_DIR XDG_CURRENT_DESKTOP XFCE_THEME \
QT_QPA_PLATFORMTHEME QT_ENABLE_HIGHDPI_SCALING QT_SCALE_FACTOR \
LANG LANGUAGE LC_MESSAGES LC_COLLATE LC_NUMERIC LC_TIME LC_ALL \
XDG_CONFIG_HOME KDE_FULL_SESSION"

OK. I just tested it, and it still works with my Xfce / X11.

Anybody following this who wants to test it: Please download the latest myrlyn-sudo and give it a try:

https://raw.githubusercontent.com/shundhammer/myrlyn/refs/heads/master/src/myrlyn-sudo

(right-click → “Save Link As”)