Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. PyQT on Debian12
Forum Updated to NodeBB v4.3 + New Features

PyQT on Debian12

Scheduled Pinned Locked Moved Solved Qt for Python
16 Posts 4 Posters 1.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mussiu
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Did you install the libraries suggested in the error message ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • SGaistS SGaist moved this topic from General and Desktop on
      • M Offline
        M Offline
        Mussiu
        wrote on last edited by
        #3

        Yes... i have installed libxcb-cursor0

        JonBJ 1 Reply Last reply
        0
        • M Mussiu

          Yes... i have installed libxcb-cursor0

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by
          #4

          @Mussiu
          And after that the message still contains

          qt.qpa.plugin: From 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to load the Qt xcb platform plugin.

          It still gives the same message about libxcb-cursor0, right?

          1 Reply Last reply
          0
          • M Offline
            M Offline
            Mussiu
            wrote on last edited by
            #5

            Yes, that message i linked is still showed after a lot of installs, through pip and apt

            1 Reply Last reply
            0
            • M Offline
              M Offline
              Mussiu
              wrote on last edited by
              #6

              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.
              
              jsulmJ 1 Reply Last reply
              0
              • M Mussiu

                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.
                
                jsulmJ Offline
                jsulmJ Offline
                jsulm
                Lifetime Qt Champion
                wrote on last edited by
                #7

                @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?

                https://forum.qt.io/topic/113070/qt-code-of-conduct

                M 1 Reply Last reply
                1
                • jsulmJ jsulm

                  @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?

                  M Offline
                  M Offline
                  Mussiu
                  wrote on last edited by
                  #8

                  @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?

                  1. 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)

                  2. I have a docker that should execute a program with a pyqt GUI. It works when i execute it on a old CentOs 7

                  3. The container is on an Almalinux and in the Dockerfile there are all libs needed

                  1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    Mussiu
                    wrote on last edited by
                    #9

                    Ok... i founded a solution, type xhost + before to start the docker, and the docker finally starts

                    1 Reply Last reply
                    0
                    • M Offline
                      M Offline
                      Mussiu
                      wrote on last edited by
                      #10

                      How can i solve this auth problem to X without type xhost +? my $DISPLAY is 10.0

                      1 Reply Last reply
                      0
                      • JonBJ Offline
                        JonBJ Offline
                        JonB
                        wrote on last edited by
                        #11

                        Since it's a Docker question have you searched Docker documentation/web for this?

                        1 Reply Last reply
                        0
                        • M Offline
                          M Offline
                          Mussiu
                          wrote on last edited by
                          #12

                          I think this is a Xauthority problem, anyway is not a QT problem how you say. Thanks guys

                          1 Reply Last reply
                          0
                          • SGaistS Offline
                            SGaistS Offline
                            SGaist
                            Lifetime Qt Champion
                            wrote on last edited by
                            #13

                            Be aware that using xhost + disables lots of securities.

                            Interested in AI ? www.idiap.ch
                            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                            M 1 Reply Last reply
                            0
                            • SGaistS SGaist

                              Be aware that using xhost + disables lots of securities.

                              M Offline
                              M Offline
                              Mussiu
                              wrote on last edited by
                              #14

                              @SGaist said in PyQT on Debian12:

                              Be aware that using xhost + disables lots of securities.

                              I know, i'm looking for a solution

                              1 Reply Last reply
                              0
                              • SGaistS Offline
                                SGaistS Offline
                                SGaist
                                Lifetime Qt Champion
                                wrote on last edited by
                                #15

                                If memory serves well, you can try with something like xhost +local:<username>.

                                Interested in AI ? www.idiap.ch
                                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                M 1 Reply Last reply
                                1
                                • SGaistS SGaist

                                  If memory serves well, you can try with something like xhost +local:<username>.

                                  M Offline
                                  M Offline
                                  Mussiu
                                  wrote on last edited by
                                  #16

                                  @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

                                  1 Reply Last reply
                                  1
                                  • SGaistS SGaist has marked this topic as solved on

                                  • Login

                                  • Login or register to search.
                                  • First post
                                    Last post
                                  0
                                  • Categories
                                  • Recent
                                  • Tags
                                  • Popular
                                  • Users
                                  • Groups
                                  • Search
                                  • Get Qt Extensions
                                  • Unsolved