Fix sudo prompt
This commit is contained in:
parent
a8b577fc3a
commit
2a93b1ab66
|
@ -147,6 +147,8 @@ set_pl () {
|
|||
fi
|
||||
if [ "$EUID" -eq 0 ]; then
|
||||
echo $(w_to_uw $2) > $pl_path
|
||||
elif [ $gui_used == 1 ]; then
|
||||
sudo -A bash -c "echo $(w_to_uw $2) > ${pl_path}"
|
||||
else
|
||||
sudo bash -c "echo $(w_to_uw $2) > ${pl_path}"
|
||||
fi
|
||||
|
@ -227,6 +229,7 @@ gui_handler() {
|
|||
print_help "gui"
|
||||
else
|
||||
export SUDO_ASKPASS="${script_dir}/gpd-sudo-prompt"
|
||||
export gui_used=1
|
||||
while : ; do
|
||||
# Contains some ugly hacks to "widen" the entries for the small GPD screen, might tweak later
|
||||
gui_action=$(zenity --list --title="${gui_name}" --width=400 --height=300 $gui_options --text="Chose action to perform:" --hide-column=1 --column="" --column="Action"\
|
||||
|
|
Loading…
Reference in New Issue