[Gambas-user] EXEC ... WITH
jose.rodriguez at cenpalab.cu
jose.rodriguez at cenpalab.cu
Tue Jul 20 16:26:46 CEST 2021
July 20, 2021 9:07 AM, "Tobias Boege via User" <user at lists.gambas-basic.org> wrote:
> On Mon, 19 Jul 2021, jose.rodriguez at cenpalab.cu wrote:
>>
>> However, shouldn't this one work too?:
>>
>> Exec ["pkexec", Application.Path &/ "vcpufreq-gui.gambas"] With ["DISPLAY=" & Env["DISPLAY"],
>> "XAUTHORITY=" & Env["XAUTHORITY"]] Wait
>
> No, read the manpage of pkexec:
>
> The WITH statement sets the environment variables in the Gambas program
> before launching pkexec, then pkexec clears these variables immediately
> afterwards.
>
Yes, I understand now, and this works because it sets the env inside pkexec:
Exec ["pkexec", "env", "DISPLAY=" & Env["DISPLAY"], "XAUTHORITY=" & Env["XAUTHORITY"], Application.Path &/ "vcpufreq-gui.gambas"] Wait
Regards,
Joe1962
More information about the User
mailing list