Run Python script with root privileges (not from terminal)
16,678
Take a look at http://www.cyberciti.biz/open-source/command-line-hacks/linux-run-command-as-different-user/ then just write a sh script which you chmod +x so that you can execute it then just use the script to launch the other script.
Related videos on Youtube
Comments
-
TellMeWhy over 1 year
How can I run a Python script which, upon execution, brings up a dialog prompting the user for his root password - so that the script is run as root, being able to make changes to files within the
/...
directories?
I'm using Gtk-2-
TellMeWhy almost 9 years@JacobVlijm Not installed by default? even in Ubuntu and its derivatives? It's installed on my system...
-
Jacob Vlijm almost 9 yearsTry my answer, I don't care for the points, but this is hurting my eyes.
-
-
TellMeWhy almost 9 yearsSo make an executable script containing
gksu -u root '<script>'
?