I have a python script that I would like to add the function "Disconnect when it was done."
I know that I can use gksudo (when the user clicks "shutdown when done") to ask the user about root privileges, but how can I use these privileges later (when the script is actually completed).
I was thinking about chmod u + s in the shutdown command, so I don't need a password, but I really don't want to do this.
Any ideas how I can achieve this?
Thanks in advance, Ash.
python linux ubuntu
Ashy
source share