gksu
doesn't has an option like sudo
has to pass the password to it in the following way:
echo 'password' | sudo -S command
Anyway I wonder which is the simplest way to pass my password to gksu
. What I found until now is:
parallel -j 2 -- "gksu command" "( sleep 1; xdotool type 'password'; xdotool key 'Return' )"
But this doesn't look so good for me (parallel
and xdotool
must to be installed, there is some time spent until the password is passed, the window which asking password is not avoided).
So, is there a better way?
---
Note: I'm not interested to edit the sudoers
file or in explanations like "*don't do this, it's not safety!*".
Asked by Radu Rădeanu
(1813 rep)
Aug 29, 2014, 06:11 PM
Last activity: Aug 29, 2014, 06:43 PM
Last activity: Aug 29, 2014, 06:43 PM