Saturday, November 12, 2011

Launching Applications as Root on OSX

While looking for a solution to how to launch TrueCrypt as a root, when logged in as a plain user, I got the hang of a terminal command.

I thought I could also do it with an AppleScript. Turned out to be harder than I thought, but then I've never used ApleScript before.

First I got a copy of Pseudo, which was harder than I thought sice the author has disappeared. Eventually I found a copy here. NB these instructions WILL NOT work for Lion since Pseudo requires Rosetta, and Apple have done away with Rosetta.

  1. Launch Pseudo and create a new launch document

  2. Drag the TrueCrypt application icon onto that little window, and go to then Save
  3. Create an AppleScript:

    tell application "Pseudo"
        open file "Mac:Users:user:documents:TC_Root.pseudo"
    end tell

    Fix the command to reflect the location of the .pseudo document.

    Save this an an application, put on the dock, and when you run the script it'll launch TrueCrypt for you, with a pop up for credentials.

No comments: