diff mbox series

[bug#59451] gnu: cura: Make it work on wayland.

Message ID 20221121171403.30222-1-db@minikn.xyz
State New
Headers show
Series [bug#59451] gnu: cura: Make it work on wayland. | expand

Commit Message

Demis Balbach Nov. 21, 2022, 5:14 p.m. UTC
* gnu/packages/engineering.scm (cura): Make it work on wayland.
---
 gnu/packages/engineering.scm | 1 +
 1 file changed, 1 insertion(+)

Comments

Christopher Baines Nov. 23, 2022, 9:20 a.m. UTC | #1
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
Demis Balbach Nov. 28, 2022, 10:34 p.m. UTC | #2
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?
diff mbox series

Patch

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"