Is there any graphical "sudo" for Mac OS X?

Johannes picture Johannes · Oct 4, 2009 · Viewed 14.9k times · Source

I'm designing a little software in Java. I don't know the term/definition to what I'm doing, but I'm prompting commands from Java to the terminal. Something like this:

Process process = Runtime.getRuntime().exec("command");

I've done this before in Linux, and I used gksudo for commands that required the root password.

Is there any gksudo in OS X? Any graphical popup asking for root password?

Answer

ZJR picture ZJR · Apr 26, 2010

You can more ore less manage to write your own with an AppleScript shell script:

#!/bin/sh
osascript -e "do shell script \"$*\" with administrator privileges"

cocoasudo looks aesthetically more pleasing, but this is already deployed.