0

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?

Oliver Salzburg
  • 89,072
  • 65
  • 269
  • 311
GarouDan
  • 605

1 Answers1

1

Use kdesudo <Your command>:

#!/bin/sh
clementine
kdesudo "shutdown -h 00:00"
Dennis
  • 50,701
GarouDan
  • 605