How to run YaST GUI modules as native Wayland windows?

Hi,
I recently discovered that electron-based apps can be forced to run in full Wayland mode, and my eyes are doing much better now, because fonts and UI elements are finally crisp and don’t look like a blurry mess anymore.

Does something similar exist for YaST as well?

Thanks

2 Likes

You needed libqt5-qtwayland with KDE5, no idea how is called in KDE6. It provides Wayland backend. Now if you force WAYLAND_DISPLAY for YaST to point to the user Wayland socket, it will work. Something like

su - root -c sh -c "WAYLAND_DISPLAY=$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY /usr/sbin/yast2"

As zypper is still built against Qt5, that is what you need currently.

I just tried, but it still opens YaST in an X11 window (blurry fonts + confirmed by running xeyes)

As you do not tell how you start YaST, it is difficult to comment. What is “it”?

Which DE are you using and how are you forcing wayland? :thinking:

I’m on Gnome and using XWayland for VSCode (confirmed as per xlsclients).
But forcing Wayland in the following way results in blurry view:

code --enable-features=UseOzonePlatform --ozone-platform=wayland
code --enable-features=UseOzonePlatform,WaylandWindowDecorations --ozone-platform-hint=auto

I tried the command you provided in a Plasma 6 Wayland session, and the GUI that opens for YaST as a result is still blurry and not Wayland-y:

su - root -c sh -c "WAYLAND_DISPLAY=$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY /usr/sbin/yast2"

Also xeyes is able to track my cursor when it passes over that window and it is the one in focus, so it’s an X11 window

Hi, I’m on KDE Plasma.

For electron-based apps I had some success following this approach:

https://wiki.archlinux.org/title/wayland#Environment_variable

I finally added this to my .bash_profile and re-logged in

export ELECTRON_OZONE_PLATFORM_HINT=auto

However, this only worked for teams-for-linux, but was not sufficient for Postman (which is also electron based). So for that one I used a different approach, via .desktop file:

[Desktop Entry]
Encoding=UTF-8
Name=Postman
Exec=/home/andrea/bin/Postman/app/Postman --enable-features=UseOzonePlatform --ozone-platform=wayland %U
Icon=/home/andrea/bin/Postman/app/resources/app/assets/icon.png
Terminal=false
Type=Application
Categories=Development;

Which is basically what you did for vscode

1 Like

Apparently Qt prefers X11 and su - passes $DISPLAY. You need to clear DISPLAY or force wayland backend (QT_QPA_PLATFORM=wayland).

su - root -c sh -c "WAYLAND_DISPLAY=$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY DISPLAY= /usr/sbin/yast2"

Once upon a time KDE Wayland session set QT_QPA_PLATFORM but then it was removed in favor of automatic selection by applications.

Thanks, but it looks a bit complicated to replace all the commands for YaST GUIs, at this point I guess that I will just wait for the YaST GUI to be built against QT6 :slight_smile:

Try the following…
sudo -E yast2

1 Like

Works great, but how can I make all YaST shortcuts use that?

My bad, that won’t get the modules launched running in Wayland mode.

It will if you unset DISPLAY variable, but you are back to the possible problem of root owned files in user directories

andrei@leap155:~/src/rpm> DISPLAY= sudo -E yast2
QStandardPaths: runtime directory '/run/user/1000/' is not owned by UID 0, but a directory permissions 0755 owned by UID 1000 GID 100
andrei@leap155:~/src/rpm>

For this reason I explicitly set WAYLAND_DISPLAY to the full path so processes running as root can find it, but used su - to avoid leaking user environment.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.