0

I'm an avid launch service (Quicksilver/Launchbar) user, and have been frequently stymied by Gatekeeper… The default "Open" actions behave like double-clicking an application package, which is insufficient for triggering the dialogue for circumventing Gatekeeper. I used to get around this by asking the respective launcher to "Reveal" the app, and then right clicked it from Finder.

I recently installed Path Finder 6 on my machine to replace Finder/TotalFinder. The problem is, there isn't a way to trigger the "open" right-click action from Path Finder that allows one to circumvent the Gatekeeper block for unsigned applications… So now I have to "Reveal" from QS, and then "Show in Finder" from Path Finder. The ideal situation would just be to figure out exactly what command is being called when you right-click->Open, and implement that as an action in QS or Launchbar… an Apple- or shell-script would be ideal, but I can't figure out what the system command is for that higher level "Open".

Any experience with this out there?

2 Answers 2

2

You could create an Automator service with a Run Shell Script action like this:

for f; do
  q=$(xattr -p com.apple.quarantine "$f" 2> /dev/null)
  if [[ $q ]]; then
    xattr -d com.apple.quarantine "$f"
    open "$f"
    xattr -w com.apple.quarantine "$q" "$f"
  else
    open "$f"
  fi
done

Set the input type to files or folders (just folders doesn't seem to include application bundles) and set "pass input" to "as arguments".

Or in Alfred 2 you could add a File Action trigger and connect it to a Run Script action like this:

f="{query}"
q=$(xattr -p com.apple.quarantine "$f" 2> /dev/null)
if [[ $q ]]; then
  xattr -d com.apple.quarantine "$f"
  open "$f"
  xattr -w com.apple.quarantine "$q" "$f"
else
  open "$f"
fi

If you want to keep Gatekeeper enabled but make it ignore some applications, just run something like xattr -d com.apple.quarantine /Applications/SomeApp.app.

1
  • Thanks, this works pretty well. Wish my Terminal-fu were a little stronger sometimes… Commented Jun 27, 2013 at 1:12
0

I've discovered how to get halfway there… It appears that PathFinder does have an "Open" option, and it just has to be enabled in the preferences under the Features -> Contextual Menu tab. So now I just end up with the QS -> "Reveal", and then right-click -> "Open" in PathFinder.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .