:: Re: [DNG] pkexec in Chimaera
Góra strony
Delete this message
Reply to this message
Autor: Didier Kryn
Data:  
Dla: dng
Temat: Re: [DNG] pkexec in Chimaera
Le 08/11/2021 à 14:16, Didier Kryn a écrit :
>     There is a hand-made replacement for pkexec and the good old gksu
> and gksudo:
>
> In your sudoers file (edited with visudo), put the following line
>
> Defaults env_keep = "XAUTHORITY DISPLAY"
>
> Note there can be other variables in the list, like EDITOR, but the
> above are the ones which will allow you to run GUIs under root priviledge.
>
> Then allow yourself to run foo with sudo (also by editing your sudoers
> file vith visudo) and then
>
> sudo foo
>
> hth
>
> --     Didier
>


    Alternative:

su -w DISPLAY,XAUTHORITY -c /usr/sbin/foo

Doesn't work with option -l of su; therefore the PATH is yours.

--     Didier