packer icon indicating copy to clipboard operation
packer copied to clipboard

Add support option for all graphics front-end

Open kuboosoft opened this issue 10 years ago • 0 comments

Hi, I love your work, why no include a option for people as want use packer in a visual front-end ?. I would like an option that the user could invoke su or sudo; with zenity, gksu or another.

Example: zenity --password | su -c "$(printf '%q ' "$@")"

elif zenity --password | sudo -S -v &>/dev/null && sudo -l "$@" &>/dev/null; then sudo -E "$@"

or

gksu "$(printf '%q ' "$@")"

elif gksu sudo -S -v &>/dev/null && sudo -l "$@" &>/dev/null; then sudo -E "$@" //////////////////////// # Called whenever anything needs to be run as root ($@ is the command) runasroot() { if [[ $UID -eq 0 ]]; then "$@"

elif sudo -v &>/dev/null && sudo -l "$@" &>/dev/null; then

elif zenity --password | sudo -S -v &>/dev/null && sudo -l "$@" &>/dev/null; then sudo -E "$@" else echo -n "root "

su -c "$(printf '%q ' "$@")"

zenity --password | su -c "$(printf '%q ' "$@")" fi } /////////////////////////////// Thanks :)

kuboosoft avatar Apr 07 '14 03:04 kuboosoft