Message ID | 20221121171403.30222-1-db@minikn.xyz |
---|---|
State | New |
Headers | show |
Series | [bug#59451] gnu: cura: Make it work on wayland. | expand |
Demis Balbach <db@minikn.xyz> writes: > * gnu/packages/engineering.scm (cura): Make it work on wayland. > --- > gnu/packages/engineering.scm | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm > index 43e23e30a8..42537364e6 100644 > --- a/gnu/packages/engineering.scm > +++ b/gnu/packages/engineering.scm > @@ -3780,6 +3780,7 @@ (define-public cura > (lambda* (#:key outputs #:allow-other-keys) > (let ((out (assoc-ref outputs "out"))) > (wrap-program (string-append out "/bin/cura") > + '("QT_QPA_PLATFORM" = ("xcb")) > (list "GUIX_PYTHONPATH" > 'prefix (list (string-append out > "/lib/python" Setting this environment variable here seems quite unusual. What's it doing, and would anyone want to set a different value? Thanks, Chris
On 2022-11-23 09:20, Christopher Baines wrote: > Setting this environment variable here seems quite unusual. What's it > doing, and would anyone want to set a different value? > > Thanks, > > Chris Hello Chris, unfortunately I can't help much with this. Cura is currently not running under Wayland (XWayland). After doing a bit of research, I found https://github.com/Ultimaker/Cura/issues/10815, and setting `QT_QPA_PLATFORM` to `xcb` was the suggested workaround until wayland is officially supported. My QT knowledge is very limited, but the QT_QPA_PLATFORM env var seems to allow for defining platform-specific features for the application (https://doc.qt.io/qt-6/embedded-linux.html#specifying-additional-settings). Setting it to `xcb` enables the XCB plugin (https://doc.qt.io/qt-6/embedded-linux.html#xcb), which seems to be the default X11 plugin. Setting the env var to `wayland` doesn't work unfortunately. As an alternative, I could create a package derivation `cura-wayland` and only apply the patch there? Would that be more suitable?
I'm not certain but this might be related to bug 57742. Basically cura is a QT application that cannot access the qtwayland plugin. We could add this plugin to the inputs or we could fix bug 57742 and have users install it themselves. If I'm correct that is. I haven't tested this theory
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm index 43e23e30a8..42537364e6 100644 --- a/gnu/packages/engineering.scm +++ b/gnu/packages/engineering.scm @@ -3780,6 +3780,7 @@ (define-public cura (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) (wrap-program (string-append out "/bin/cura") + '("QT_QPA_PLATFORM" = ("xcb")) (list "GUIX_PYTHONPATH" 'prefix (list (string-append out "/lib/python"