Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to set ForkLift as the default file viewer, to a degree? PathFinder somehow does this, see, but how does it do this and could that option be set to redirect to ForkLift instead of PathFinder?

share|improve this question
up vote 4 down vote accepted

Path Finder looks like it's modifying the "NSFileViewer" preference. You can set this manually from Terminal to point to ForkLift (I tried this, and it seems to work):

defaults write -g NSFileViewer -string com.binarynights.ForkLift2

(The -g sets this preference globally for all applications.)

However, be warned that the Path Finder website lists some applications that don't respect this setting, such as the Dock and Firefox.

share|improve this answer
The -g flag is equivalent to NSGlobalDomain. It simply writes the preference to the global domain, rather than to a specific domain. – Mathias Bynens Mar 25 '12 at 8:43
Very interesting, thanks! Seems to work well for the applications that do support it! – penguinrob Mar 26 '12 at 12:19
how do I revert to using Finder? – john2x Jun 15 '12 at 8:51
Try defaults delete -g NSFileViewer. – jtbandes Jun 16 '12 at 2:33
It sounds like a separate question from this one. You can ask a new question – jtbandes Jan 13 at 8:36

You can change default file manager like this, but ForkLift or Transmit not work as expected, only Path Finder are


from LaunchServices import LSSetDefaultRoleHandlerForContentType, kLSRolesViewer, LSSetDefaultHandlerForURLScheme
from CoreFoundation import CFPreferencesCopyApplicationList, kCFPreferencesCurrentUser, kCFPreferencesAnyHost, CFPreferencesSetAppValue, CFPreferencesAppSynchronize

applicationBundleIdentifier = "com.cocoatech.PathFinder" #"com.panic.Transmit" #"com.binarynights.forklift2"

LSSetDefaultRoleHandlerForContentType("public.folder", kLSRolesViewer, applicationBundleIdentifier)
LSSetDefaultHandlerForURLScheme("file:///", applicationBundleIdentifier)

applicationIDs = CFPreferencesCopyApplicationList(kCFPreferencesCurrentUser, kCFPreferencesAnyHost)
for app_id in applicationIDs:
    CFPreferencesSetAppValue("NSFileViewer", applicationBundleIdentifier, app_id);
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.