PDA

View Full Version : Graphical sudo for terminal




Lumio
Dec 27, 2011, 02:29 PM
Hello, I want to create a bash-script but need to authorize the action I want to do. Is there something like gksudo for mac os x?

Thanks :)



Sayer
Jan 5, 2012, 02:56 PM
Yes, its called sudo.

balamw
Jan 5, 2012, 05:18 PM
This might be more along the lines of what you are looking for.

http://www.macupdate.com/app/mac/14635/privileged-exec

You can call AppleScript from bash using osascript.

B

KnightWRX
Jan 5, 2012, 06:09 PM
Found this after a Google search for "graphical sudo OS X" :

http://www.performantdesign.com/2009/10/26/cocoasudo-a-graphical-cocoa-based-alternative-to-sudo/

You did look on Google right OP ? ;)

Hansr
Jan 5, 2012, 06:33 PM
I don't see why this is needed, just lunch the binary with sudo.

E.g.
sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit

KnightWRX
Jan 5, 2012, 06:40 PM
I don't see why this is needed, just lunch the binary with sudo.

E.g.
sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit

I get why he does. He wants the script to launch from Finder and not pop-up Terminal to a user.

A graphical sudo does a good job of this. This is exactly why Gnome/KDE both have graphical versions of sudo, so the user never sees the "cli" and doesn't have to type anything.

balamw
Jan 5, 2012, 07:48 PM
Found this after a Google search for "graphical sudo OS X"

Or even "gksudo for OS X" which leads to cocoasudo via stackoverflow.

http://stackoverflow.com/questions/1517183/is-there-any-graphical-sudo-for-mac-os-x

B

Lumio
Jan 6, 2012, 11:07 AM
Hello and thanks for your replies... yes I googled and yes I already found cocoasudo :) thanks by that... but the problem with cocoasudo is, that I need to compile it by myself... I need something, what is buildt-in.

Thanks for everyones reply.

balamw
Jan 6, 2012, 11:21 AM
I need something, what is buildt-in.
The AppleScript approach seems to (mostly) fit that bill.

FWIW it would be helpful to tell us you had seen it and why it wouldn't work up front.

B