I am trying to run a PyQt5 GUI script on Raspberry Pi from CLI as shown in this tutorial: Raspberry Pi - Autostart Application with Splash Screen.
The program auto-starts when booted to Desktop, but doesn't run when booted to CLI. In the above tutorial it is shown that it should!
Although, when I try to run it manually and write this command: python main.py
following error is shown:
qt.qpa.xcb: could not connect to display
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: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.
Aborted
I tried using export DISPLAY=:1.0
and export DISPLAY=:0.0
but got same error.
- Currently I am using
rc.local
file to auto-start the script - I also used other auto-start methods, but got same problem
Thanks
source https://stackoverflow.com/questions/70839999/how-can-i-run-a-qt-app-in-raspberry-pi-from-cli-instead-of-desktop
Comments
Post a Comment