M BUZZ CRAZE NEWS
// news

Run Python script with root privileges (not from terminal)

By Jessica Wood

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

2

1 Answer

Take a look at 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.

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy