[Gambas-user] EXEC ... WITH

jose.rodriguez at cenpalab.cu jose.rodriguez at cenpalab.cu
Mon Jul 19 23:27:17 CEST 2021


July 19, 2021 6:56 AM, "Dimitris Anogiatis" <dosida at gmail.com (mailto:dosida at gmail.com?to=%22Dimitris%20Anogiatis%22%20<dosida at gmail.com>)> wrote:
This actually worked out for me (i'm on Debian 10.10 with MATE Desktop):

Exec ["pkexec", "env", "DISPLAY=" & Env["DISPLAY"], "XAUTHORITY=" & Env["XAUTHORITY"], Application.Path &/ "vcpufreq-gui.gambas"] Wait

Yes It's an older version of Gambas (3.12) but it showed me that the plugin it used was qt5ct.

Checking your initial error message it looks like xcb is complaining. Is xcb installed in your Mint installation?
Hmm, might have to set up a VM to try it on Mate.

The xcb stuff is typical when trying to run qt software as root without setting the display env. For example, executing this directly in a console gives the (mostly) same error as when running from gambas code: 
<< EXAMPLE 1:
joe1962 at homestation:~/.../vcpufreq-gui$ pkexec /home/joe1962/0-develop/MyDev/vcpufreq/trunk/vcpufreq-gui/vcpufreq-gui.gambas
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, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.

Aborted (core dumped)
:END EXAMPLE 1>>
<< EXAMPLE 2:
root at homestation:/.../vcpufreq-gui# pkexec falkon
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.
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, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.

Aborted (core dumped)
:END EXAMPLE 2>>
but when run with the env stuff, it works. However, that doesn't work for me from Gambas, I figure pkexec isn't getting the env stuff properly.

Regards,
Joe1962
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210719/7ce6fad0/attachment.htm>


More information about the User mailing list