[Gambas-user] EXEC ... WITH
bsteers4 at gmail.com
Mon Jul 19 00:29:14 CEST 2021
Just an initial thought as it's working in the cli so I assume all
I sometimes making sure bash is the shell an not the default sh can help
fix some glitches.
System.Shell = System.Find("bash")
Also I wrote a simple gambas called groot that I've found works where
pkexec does not. It simply creates a hidden window with a terminalview and
launches the application via sudo.
It's on the gambas application repository
Might give you some alternative ideas at least?
On Sun, 18 Jul 2021, 23:08 , <jose.rodriguez at cenpalab.cu> wrote:
> This works in cli:
> pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY
> However, none of the following attempts have worked in Gambas code:
> Exec ["pkexec", "env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY " &
> Application.Path &/ "vcpufreq-gui.gambas"] Wait
> Exec ["pkexec", Application.Path &/ "vcpufreq-gui.gambas"] With
> ["DISPLAY=$DISPLAY", "XAUTHORITY=$XAUTHORITY"] Wait
> This is for some old code I had and am updating to current Gambas. The
> problem actually came about because the code tested for kdesu, ktsuss, gksu
> and would relaunch itself as root, then quit. However, on Linux Mint you're
> supposed to use pkexec now...
> The error is the typical one when trying to run a gui program in a root
> 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.
> Appreciate any ideas.
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the User