QT error when trying to launch Anki from a termux Ubuntu install
-
Hello, hope this is the correct forum.
Device: Mi Pad 5 android 13 Miui 14
Running: Ubuntu XFCE 22.04 installed thru Termux based on a script from AndronixI try to launch Anki 2.15 installed thru the official repositories.
I get 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
Similar one if I try to load Anki via pypipip following this guide from the official Anki website: https://betas.ankiweb.net/#via-pypipip
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 Authorization required, but no authorization protocol specified Qt warning: could not connect to display :1 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
I then tried following a thread in this same forum
https://forum.qt.io/topic/111553/solved-qt-qpa-plugin-could-not-find-the-qt-platform-plugin-xcb-in/3
, then i get a different error, 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
Hope you have any idea of what i'm trying to do because i'm just copying lines from here and there and hope some can stick xD
-
Hi and welcome to devnet,
Are you using Xorg or Wayland as windowing system ?
-
@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)
-
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
-
@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.
-
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