Running graphical programs as root

houghi houghi at houghi.org
Sat May 5 15:48:55 CEST 2012


On Sat, May 05, 2012 at 12:45:19PM +0300, gymka wrote:
> kdesudo, gksudo it's just frontends for "sudo". as far as i know only
> difference between gksudo and sudo is that gksudo uses your(user's)
> configuration and not root's. so create your own sudo frontend:
> 1. in /usr/bin create file "xfce-sudo" with content:
> #!/bin/bash
> pass=$(zenity --entry --text="Enter your pass");
> echo $pass | sudo -S env HOME=$HOME $@

I would make that:
#!/bin/bash
pass=$(zenity --password);
echo $pass | sudo -S env HOME=$HOME $@


I personally would noy use the "env HOME=$HOME" part, but that might
depend on your personal needs.

The importend part is that you now not see the password when you type it.


houghi
-- 
This is written under the inluence of the following:
>   Artist : Jerry Lee Lewis
>     Song : You Win Again
>    Album : The Sun Records Collection [Rhino] Disc 3


More information about the Xfce mailing list