I would like run a script of mine that need some root privilegies on a gui way.
For example, a simple script could be:
#!/bin/sh
clementine
sudo shutdown -h 00:00
The first line opens the clementine music player (and I don't want root privilegies to open it) and the second will halt the computer on a specific time.
I would like run the script using Alt+F2
and a dialog ask the root password to me when it is needed.
How to do this?
Answer
Use kdesudo
:
#!/bin/sh
clementine
kdesudo "shutdown -h 00:00"
Comments
Post a Comment