Docker xtb could not connect to display - qt

Setup: Windows -> WSL Ubuntu -> Docker
The first time I've started a project, it worked correctly. Second time, it cannot find the display for an unknown reason, as the container is executed with XAuth passed, and even in privileged mode it fails.
Project: Cutter docker dev build
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.

Related

Taking an error (qt.qpa.xcb: could not connect to display) while trying to use kdbg, when connected through ssh

When I'm connected through ssh, and tried to run kdbg I took this problem:
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.
Failed to create wl_display (No such file or directory)
qt.qpa.plugin: Could not load the Qt platform plugin "wayland" 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: wayland-org.kde.kwin.qpa, eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.
I use KDE Plasma (X11), and Arch Linux.
I tried to reinstall qt6-base package, install qt5-base package, also found a lot of the same questions in other forums, but nothing helped to me
Firstly, as I understand, this concerned not only kdbg, but any program with a graphical interface.
Second I found explanations on Arch wiki in the article about OpenSSH https://wiki.archlinux.org/title/OpenSSH#X11_forwarding
So all i had to do, to solve this problem is add -X to the command. So instead of
ssh user#server-address
I wrote ssh -X user#server-address

Can we install and use Qt platform and its plugins in Ubuntu 20 server for HPC-AI

While running a TensorFlow based Deep learning model in Graph mode execution, I got the error:
qt.qpa.xcb: could not connect to display
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/home/username/.conda/envs/slt/lib/python3.9/site-packages/cv2/qt/plugins" 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: xcb, eglfs, minimal, minimalegl, offscreen, vnc.
Aborted (core dumped)
I am running my code on a server via a local remote host and it's a ubuntu 20 Server-based single user os. ( That is no GUI Based Desktop Manager).
What is the above error mean?
If I'm not wrong and according to my understanding, QT Platform and its plugins are not installed. So how to install the QT Platform in the ubuntu server if my assumption is correct.
If not how to solve the above error. Can anyone please help me out

Launch Qt application as root user in Ubuntu

I am testing a Qt-based GUI application, generated with Qt creator in Ubuntu 20.04. This application uses a library, for which root privileges are required. Nevertheless, it is not possible to launch the application as root, because it cannot access the display.
If I start the application as normal user I get a modprobe error on the library:
$ CGUTLGUI_Qt
qt.core.qobject.connect: QObject::connect: No such signal QSignalMapper::mapped(int) in ../src/cgosfunc/cgosgpio.cpp:242
qt.core.qobject.connect: QObject::connect: (receiver name: 'CgosGPIO')
modprobe: ERROR: could not insert 'cgosdrv': Operation not permitted
If I start the application as root, it cannot connect to the display:
$ sudo CGUTLGUI_Qt
No protocol specified
qt.qpa.xcb: could not connect to display :1
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, vkkhrdisplay, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.
I just need to to run the program in one way or another, it doesn't mind if I cannot fix both error. It would be fine either to start the GUI as root or to link the library as normal user.
The xhost program can be used to allow other users or systems access to the X display.
To allow root to access your X server, use this command:
$ xhost local:root

Trouble with Acquia Dev Desktop post-install step

I am learning Drupal and have to use it for an upcoming project. When I try to install Acquia Dev Desktop, I get an error message:
Problem running post-install step. Installation may not complete correctly. For assistance, please finish the installation and post a new forum message to bit.ly/dd-bugs with these files: C:\Program Files (x86)\DevDesktop/installer.log C:\Program Files (x86)\DevDesktop/piscript.log
This makes me unable to run Dev Desktop. The only error messages I have noticed in those files are:
Running post install script. This may take a couple of minutes.
Executing C:\Program Files (x86) \DevDesktop\common\setup\postInstallPhp.cmd "C:\Program Files (x86)\DevDesktop\common\setup\setup.php"
Script exit code: unknown signal
Script output:
Script stderr:
child killed: unknown signal
according to the Acquia blog, download an older version - https://dev.acquia.com/downloads/releases/devdesktop.
"Issues with Windows and most recent release of Acquia Dev Desktop We
are investigating an issue with the latest version of Acquia Dev
Desktop and Windows. At this time, Acquia recommends that Windows
users experiencing errors with the most recent release revert to a
previous release."
Rgds,

How to indicate EGLFS plugin location for GUI Qt 5.6 application running on Raspberry?

I've been using Qt library for several years, and recently tried it on Raspberry (Qt 5.6.0) for demonstration purposes and stuck on following item:
a) there was no problem in configuring/making library on host machine and following deployment to RPi
b) the console applications works well on RPi
c) the GUI application tells next on start (absense of EGLFS plugin):
root#rpi:/home/pi# ./testpi2
This application failed to start because it could not find or load the Qt platform plugin "eglfs"
in "".
Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen.
d) I checked that plugins are located in folder where "Qt" placed (in my case /usr/local/qt5pi/plugins/platforms), so plugins have been built and deployed)
e) I tried: export QT_PLUGIN_DIR=/usr/local/qt5pi/plugins
as well as: export QT_PLUGIN_DIR=/usr/local/qt5pi/plugins/platforms
but it didn't help.
Can you guess me in following steps ?

Resources