:: [DNG] Replacement for gksudo [was: …
Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Didier Kryn
Fecha:  
A: dng
Temas antiguos: Re: [DNG] why is polkit needed?
Asunto: [DNG] Replacement for gksudo [was: why is polkit needed?]
    Here is a summary and update on how to forward X over sudo:

    Have the folowing line in /etc/sudoers:

Defaults env_keep = "XAUTHORITY DISPLAY"

(there might be other environment variables of your choice in this list)

Then just invoke

sudo synaptic

If you want to execute synaptic from a desktop launcher, then you have
two methods (at least):

1) check the option to launch the application in a terminal and use the
same command as in a command-line

2) install a GUI helper for sudo to ask the password (eg ssh-askpass)
and change the command to

sh -c "SUDO_ASKPASS=/usr/bin/ssh-askpass sudo -A synaptic"

It works at least if sh is dash or bash; dunno for other shells

    Didier