Graphical sudo for terminal

Discussion in 'Mac Programming' started by Lumio, Dec 27, 2011.

  1. macrumors member

    Joined:
    May 20, 2008
    #1
    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 :)
     
  2. macrumors 6502a

    Sayer

    Joined:
    Jan 4, 2002
    Location:
    Austin, TX
    #2
    Yes, its called sudo.
     
  3. Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
    #3
  4. macrumors Pentium

    KnightWRX

    Joined:
    Jan 28, 2009
    Location:
    Quebec, Canada
    #4
  5. macrumors 6502a

    Joined:
    Apr 1, 2007
    #5
    I don't see why this is needed, just lunch the binary with sudo.

    E.g.
    sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit
     
  6. macrumors Pentium

    KnightWRX

    Joined:
    Jan 28, 2009
    Location:
    Quebec, Canada
    #6
    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.
     
  7. Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
    #7
  8. thread starter macrumors member

    Joined:
    May 20, 2008
    #8
    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.
     
  9. Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
    #9
    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
     

Share This Page