Sign up ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

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

2 Answers 2

up vote 3 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

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.