flathub / com.ultimaker.cura

https://flathub.org/apps/details/com.ultimaker.cura
6 stars 5 forks source link

Broken on Wayland #19

Closed Unrud closed 1 year ago

Unrud commented 1 year ago

Qt gets forced to use X11 by this environment variable:

https://github.com/flathub/com.ultimaker.cura/blob/c1cd86baa40efd2fb25eab077f0788d7faf5ca76/com.ultimaker.cura.yml#L20-L21

But the X11 socket is not available when using Wayland:

https://github.com/flathub/com.ultimaker.cura/blob/c1cd86baa40efd2fb25eab077f0788d7faf5ca76/com.ultimaker.cura.yml#L8

If you want to prefer XWayland over Wayland remove --socket=fallback-x11 and set --env=QT_QPA_PLATFORM=xcb;wayland.

Tim453 commented 1 year ago

Thanks for the advice. Why should --socket=fallback-x11 be removed? I think if I remove it, it won't work under X11 sessions anymore.

neildarlow commented 1 year ago

Setting the QT_QPA_PLATFORM variable to "wayland" allows Cura to start.

Unrud commented 1 year ago

Why should --socket=fallback-x11 be removed? I think if I remove it, it won't work under X11 sessions anymore.

Right. I didn't notice that the argument --socket=x11 was not present.

Tim453 commented 1 year ago

Do we need any of these variables? I tried it in an Ubuntu Wayland session and it worked for me without any environment variables. But in #17 someone mentioned that it is only showing a transparent window.

Unrud commented 1 year ago

I tried it in an Ubuntu Wayland session and it worked for me without any environment variables.

I notice some minor issues on Wayland:

Do we need any of these variables?

No, change --socket=fallback-x11 to --socket=x11. It automatically uses X11 on Gnome and Wayland on KDE.

kurtabersold commented 1 year ago

Open/Save/Export dialogs are opened in the background

Found this issue searching for a solution for this behavior. I am using Gnome+Wayland+Nvidia Optimus.

I still experience the problem running:

QT_QPA_PLATFORM=wayland flatpak run com.ultimaker.cura