Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. QT error when trying to launch Anki from a termux Ubuntu install
Forum Updated to NodeBB v4.3 + New Features

QT error when trying to launch Anki from a termux Ubuntu install

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
16 Posts 4 Posters 2.7k 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.
  • SGaistS SGaist

    Ok, then are you trying to run that application from the root user ?

    P Offline
    P Offline
    prehmo
    wrote on last edited by prehmo
    #6

    @JonB said in QT error when trying to launch Anki from a termux Ubuntu install:

    @prehmo
    I may be mistaken but I believe the "authorization" failures are because you are trying to run as root (from the shell prompt)? Xorg doesn't like that.

    @SGaist no, when I try to run it from root i get this error instead.

    root@localhost:~# anki
    qt: QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
    
    (process:11914): Gtk-WARNING **: 11:12:47.469: Locale not supported by C library.
        Using the fallback 'C' locale.
    
    (python3:11914): dbind-WARNING **: 11:12:47.540: AT-SPI: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files
    mpv not found, reverting to mplayer
    [11914:11914:0717/111247.916695:ERROR:zygote_host_impl_linux.cc(90)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
    

    Btw I tried both using terminal from termux and from the terminal emulator of the gui itself and get the same errors.´

    PS: As you can see, I no longer get the authorization error (you can see it in the 3rd codebox of the OP)

    JonBJ 1 Reply Last reply
    0
    • P prehmo

      @JonB said in QT error when trying to launch Anki from a termux Ubuntu install:

      @prehmo
      I may be mistaken but I believe the "authorization" failures are because you are trying to run as root (from the shell prompt)? Xorg doesn't like that.

      @SGaist no, when I try to run it from root i get this error instead.

      root@localhost:~# anki
      qt: QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
      
      (process:11914): Gtk-WARNING **: 11:12:47.469: Locale not supported by C library.
          Using the fallback 'C' locale.
      
      (python3:11914): dbind-WARNING **: 11:12:47.540: AT-SPI: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files
      mpv not found, reverting to mplayer
      [11914:11914:0717/111247.916695:ERROR:zygote_host_impl_linux.cc(90)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
      

      Btw I tried both using terminal from termux and from the terminal emulator of the gui itself and get the same errors.´

      PS: As you can see, I no longer get the authorization error (you can see it in the 3rd codebox of the OP)

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

      @prehmo
      I don't really follow. Your earlier post showed

      root@localhost:~# echo $XDG_SESSION_TYPE
      x11
      

      So you were doing that as root, hence what we asked...?

      P 1 Reply Last reply
      0
      • JonBJ JonB

        @prehmo
        I don't really follow. Your earlier post showed

        root@localhost:~# echo $XDG_SESSION_TYPE
        x11
        

        So you were doing that as root, hence what we asked...?

        P Offline
        P Offline
        prehmo
        wrote on last edited by
        #8

        @JonB

        Let me rephrase to be more clear

        The system was created with no user, but I created one the second i encountered this error:

        root@localhost:~# anki
        qt: QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
        
        (process:11914): Gtk-WARNING **: 11:12:47.469: Locale not supported by C library.
            Using the fallback 'C' locale.
        
        (python3:11914): dbind-WARNING **: 11:12:47.540: AT-SPI: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files
        mpv not found, reverting to mplayer
        [11914:11914:0717/111247.916695:ERROR:zygote_host_impl_linux.cc(90)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
        

        Then I tried as user and found this error:

        Authorization required, but no authorization protocol specified
        qt: could not connect to display :1
        qt: Could not load the Qt platform plugin "xcb" in "" even though it was found.
        qt: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
        
        Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.
        
        Aborted
        

        And after following some advice of that other thread here: https://forum.qt.io/topic/111553/solved-qt-qpa-plugin-could-not-find-the-qt-platform-plugin-xcb-in/3

        I no longer get the authorization error, and instead of display :1 i get display:0 error.

        prem@localhost:~$ pyenv/bin/anki
        Preparing to run...
          File "/home/prem/pyenv/bin/anki", line 8, in <module>
            sys.exit(run())
          File "/home/prem/pyenv/lib/python3.10/site-packages/aqt/init.py", line 489, in run
            _run()
          File "/home/prem/pyenv/lib/python3.10/site-packages/aqt/init.py", line 563, in _run
            pmLoadResult = pm.setupMeta()
          File "/home/prem/pyenv/lib/python3.10/site-packages/aqt/profiles.py", line 133, in setupMeta
            res = self._loadMeta()
          File "/home/prem/pyenv/lib/python3.10/site-packages/aqt/profiles.py", line 413, in _loadMeta
            traceback.print_stack()
        resetting corrupt _global
        Qt warning: could not connect to display :0 
        Qt info: Could not load the Qt platform plugin "xcb" in "" even though it was found. 
        Qt fatal: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
        
        Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.
         
        Aborted
        

        The way GNU/Linux on top of android runs is you start the systme thru Termux and after that you start a vcnsession with Tigervnc and then you view the gui thru the app vnc viewer.

        I also noticed that there is no QT folder inside of usr/lib

        JonBJ 1 Reply Last reply
        0
        • P prehmo

          @JonB

          Let me rephrase to be more clear

          The system was created with no user, but I created one the second i encountered this error:

          root@localhost:~# anki
          qt: QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
          
          (process:11914): Gtk-WARNING **: 11:12:47.469: Locale not supported by C library.
              Using the fallback 'C' locale.
          
          (python3:11914): dbind-WARNING **: 11:12:47.540: AT-SPI: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files
          mpv not found, reverting to mplayer
          [11914:11914:0717/111247.916695:ERROR:zygote_host_impl_linux.cc(90)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
          

          Then I tried as user and found this error:

          Authorization required, but no authorization protocol specified
          qt: could not connect to display :1
          qt: Could not load the Qt platform plugin "xcb" in "" even though it was found.
          qt: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
          
          Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.
          
          Aborted
          

          And after following some advice of that other thread here: https://forum.qt.io/topic/111553/solved-qt-qpa-plugin-could-not-find-the-qt-platform-plugin-xcb-in/3

          I no longer get the authorization error, and instead of display :1 i get display:0 error.

          prem@localhost:~$ pyenv/bin/anki
          Preparing to run...
            File "/home/prem/pyenv/bin/anki", line 8, in <module>
              sys.exit(run())
            File "/home/prem/pyenv/lib/python3.10/site-packages/aqt/init.py", line 489, in run
              _run()
            File "/home/prem/pyenv/lib/python3.10/site-packages/aqt/init.py", line 563, in _run
              pmLoadResult = pm.setupMeta()
            File "/home/prem/pyenv/lib/python3.10/site-packages/aqt/profiles.py", line 133, in setupMeta
              res = self._loadMeta()
            File "/home/prem/pyenv/lib/python3.10/site-packages/aqt/profiles.py", line 413, in _loadMeta
              traceback.print_stack()
          resetting corrupt _global
          Qt warning: could not connect to display :0 
          Qt info: Could not load the Qt platform plugin "xcb" in "" even though it was found. 
          Qt fatal: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
          
          Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.
           
          Aborted
          

          The way GNU/Linux on top of android runs is you start the systme thru Termux and after that you start a vcnsession with Tigervnc and then you view the gui thru the app vnc viewer.

          I also noticed that there is no QT folder inside of usr/lib

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

          @prehmo said in QT error when trying to launch Anki from a termux Ubuntu install:

          Qt warning: could not connect to display :0

          I only know that once you get this error you will not get any further, and you will get the qt: Could not load the Qt platform plugin "xcb" in "" even though it was found. message after it.

          I know nothing about Android or Termux etc., so you will have to await someone on that.

          P 1 Reply Last reply
          1
          • JonBJ JonB

            @prehmo said in QT error when trying to launch Anki from a termux Ubuntu install:

            Qt warning: could not connect to display :0

            I only know that once you get this error you will not get any further, and you will get the qt: Could not load the Qt platform plugin "xcb" in "" even though it was found. message after it.

            I know nothing about Android or Termux etc., so you will have to await someone on that.

            P Offline
            P Offline
            prehmo
            wrote on last edited by
            #10

            bumping.

            SGaistS 1 Reply Last reply
            0
            • P prehmo

              bumping.

              SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #11

              Can you explain you exact setup ?

              It started from an Ubuntu issue and now you are writing about VNC and Android.

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

              P 1 Reply Last reply
              0
              • SGaistS SGaist

                Can you explain you exact setup ?

                It started from an Ubuntu issue and now you are writing about VNC and Android.

                P Offline
                P Offline
                prehmo
                wrote on last edited by prehmo
                #12

                @SGaist

                Maybe i didn't explain myself good enough.

                Device: Mi Pad 5 running android 13 Miui 14

                On top of it: Ubuntu XFCE 22.04 installed thru Termux based on a script from Andronix.

                The way GNU/Linux on top of android runs is you start the systme thru Termux and after that you start a vcnsession with Tigervnc and then you view the gui thru the app vnc viewer.

                I also noticed that there is no QT folder inside of usr/lib

                SGaistS 1 Reply Last reply
                0
                • P prehmo

                  @SGaist

                  Maybe i didn't explain myself good enough.

                  Device: Mi Pad 5 running android 13 Miui 14

                  On top of it: Ubuntu XFCE 22.04 installed thru Termux based on a script from Andronix.

                  The way GNU/Linux on top of android runs is you start the systme thru Termux and after that you start a vcnsession with Tigervnc and then you view the gui thru the app vnc viewer.

                  I also noticed that there is no QT folder inside of usr/lib

                  SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #13

                  And you are developing inside termux ?

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

                  P 1 Reply Last reply
                  0
                  • SGaistS SGaist

                    And you are developing inside termux ?

                    P Offline
                    P Offline
                    prehmo
                    wrote on last edited by
                    #14

                    @SGaist I'm not developing, i'm just trying to launch Anki. I tried in Termux and in the gui Terminal emulator and got the same result.

                    SGaistS 1 Reply Last reply
                    0
                    • P prehmo

                      @SGaist I'm not developing, i'm just trying to launch Anki. I tried in Termux and in the gui Terminal emulator and got the same result.

                      SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #15

                      And you are really sure your have Xorg up and running ?

                      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
                      • D Offline
                        D Offline
                        detoxagent
                        wrote on last edited by
                        #16
                        This post is deleted!
                        1 Reply Last reply
                        0

                        • Login

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