Running graphical programs as root

gymka gymka at mail.ru
Sat May 5 16:00:27 CEST 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

2012.05.05 16:48, houghi rašė:
> 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

1. without part "env HOME=$HOME" it will run with root
configuration(it won't use "/home/gymka/.mozilla") purpose of this
script was to run as other user with root permissions
2. as it was said for that purpose there is "sudoedit", i didn't knew
so wrote my own variant of gksudo:)
- -- 
gymka
GPG ID: 21C70548
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)

iQEcBAEBAgAGBQJPpTJ7AAoJEAVeyH4hxwVICToH/RAa0vC/Mf0a8j9gAco/Fl5a
ngicTPVFC3VhqmASgY2izOyQC1UUuDrL/k3E0zN0+uch8PZYpXhqArUeBjNQ60Mh
g0f6Ukm474qn1PcYuFCgZND+O6iOkYQSL8y/7/etnDHRsXokBCbhrVvNk/YUjnM/
Y2rpNtrQVrjMBwae9E9WIbVg8nCp7qv3P7UsaYuyVlmjh/zeENwpJ5vGT3Ophi4p
RXtkl2NOtR28KZ5AzsNyqGreBOSPM5Uuzva5HAck909Dp9Aufag437fhF5ksVfKP
YqPzMTFN3yuEaQEXxgoyrIzpNdOc/wCOyFGeWVNAC1I5sk5OsTDs8zsG0YaqMv0=
=OPwK
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0x21C70548.asc
Type: application/pgp-keys
Size: 3547 bytes
Desc: not available
URL: <http://mail.xfce.org/pipermail/xfce/attachments/20120505/2c15d0cd/attachment.key>


More information about the Xfce mailing list