PyQT on Debian12
-
wrote on 7 May 2024, 14:15 last edited by
Hi guys... i have to start a docker with a python application wrote in pyQT6 but have some errors
i'm root and when i try to execute the docker ->Authorization required, but no authorization protocol specified qt.qpa.xcb: could not connect to display :11.0 qt.qpa.plugin: From 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to load the Qt xcb platform plugin. qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. Available platform plugins are: vnc, vkkhrdisplay, linuxfb, minimalegl, minimal, offscreen, xcb, wayland, wayland-egl, eglfs.
i'm on Debian 12(bookworm), Xfce 4.18, GTK 3.24.38
-
Hi and welcome to devnet,
Did you install the libraries suggested in the error message ?
-
-
wrote on 8 May 2024, 06:32 last edited by
Yes... i have installed libxcb-cursor0
-
wrote on 8 May 2024, 07:32 last edited by
Yes, that message i linked is still showed after a lot of installs, through pip and apt
-
wrote on 8 May 2024, 07:49 last edited by
That message is showed if i log in the server like root.
If i log in the server like user, open a shell, get root privileges (needed to execute the docker) and try to start the docker, i get
qt.qpa.xcb: could not connect to display qt.qpa.plugin: From 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to load the Qt xcb platform plugin. qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. Available platform plugins are: vnc, vkkhrdisplay, linuxfb, minimalegl, minimal, offscreen, xcb, wayland, wayland-egl, eglfs.
-
That message is showed if i log in the server like root.
If i log in the server like user, open a shell, get root privileges (needed to execute the docker) and try to start the docker, i get
qt.qpa.xcb: could not connect to display qt.qpa.plugin: From 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to load the Qt xcb platform plugin. qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. Available platform plugins are: vnc, vkkhrdisplay, linuxfb, minimalegl, minimal, offscreen, xcb, wayland, wayland-egl, eglfs.
@Mussiu Do you mean it works if you run your app as regular user?
And how is Docker involved here? Is your app part of Docker container?
Did you install libxcb-cursor0 in this container? -
@Mussiu Do you mean it works if you run your app as regular user?
And how is Docker involved here? Is your app part of Docker container?
Did you install libxcb-cursor0 in this container?wrote on 8 May 2024, 09:01 last edited by@jsulm said in PyQT on Debian12:
@Mussiu Do you mean it works if you run your app as regular user?
And how is Docker involved here? Is your app part of Docker container?
Did you install libxcb-cursor0 in this container?-
Nono, just 2 similar errors (first post in this topic is returned when i logged as root, next error post is returned when i logged as user)
-
I have a docker that should execute a program with a pyqt GUI. It works when i execute it on a old CentOs 7
-
The container is on an Almalinux and in the Dockerfile there are all libs needed
-
-
wrote on 8 May 2024, 10:45 last edited by
Ok... i founded a solution, type xhost + before to start the docker, and the docker finally starts
-
wrote on 8 May 2024, 11:01 last edited by
How can i solve this auth problem to X without type xhost +? my $DISPLAY is 10.0
-
wrote on 8 May 2024, 11:35 last edited by
Since it's a Docker question have you searched Docker documentation/web for this?
-
wrote on 8 May 2024, 13:44 last edited by
I think this is a Xauthority problem, anyway is not a QT problem how you say. Thanks guys
-
Be aware that using
xhost +
disables lots of securities. -
wrote on 9 May 2024, 06:46 last edited by
@SGaist said in PyQT on Debian12:
Be aware that using
xhost +
disables lots of securities.I know, i'm looking for a solution
-
If memory serves well, you can try with something like
xhost +local:<username>
. -
wrote on 10 May 2024, 07:53 last edited by
@SGaist said in PyQT on Debian12:
If memory serves well, you can try with something like
xhost +local:<username>
.... I tried a lot of similar commands hahaha but not this!!! It works! Thanks
-
4/16