Is there a way to set ForkLift as the default file viewer, to a degree? PathFinder somehow does this, see http://cocoatech.com/faqs#3, but how does it do this and could that option be set to redirect to ForkLift instead of PathFinder?
Asked
Active
Viewed 1.3k times
4 Answers
13
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.

jtbandes
- 11,074
3
Now as the ForkLift V3 came out, the new command should be:
defaults write -g NSFileViewer -string com.binarynights.ForkLift-3
At the same time, if you like to restore Finder to be the default file manager again, use:
defaults delete -g NSFileViewer

abcd1234
- 31
3
From Forklift official documentation:
If you are using ForkLift from Setapp, paste this command instead:
defaults write -g NSFileViewer -string com.binarynights.forklift-setapp; defaults write com.apple.LaunchServices/com.apple.launchservices.secure LSHandlers -array-add '{LSHandlerContentType="public.folder";LSHandlerRoleAll="com.binarynights.ForkLift-3";}'
0
You can change default file manager like this, but ForkLift or Transmit not work as expected, only Path Finder are
#!/usr/bin/python2.6
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);
CFPreferencesAppSynchronize(app_id);

diimdeep
- 1,094
-g
flag is equivalent toNSGlobalDomain
. It simply writes the preference to the global domain, rather than to a specific domain. – Mathias Bynens Mar 25 '12 at 08:43defaults delete -g NSFileViewer
. – jtbandes Jun 16 '12 at 02:33defaults write -g NSFileViewer -string com.binarynights.ForkLift-3
– Matt Stow Feb 25 '17 at 12:35com
string for other Finder-like apps (fman, marta etc.)? – gilad Sep 23 '21 at 09:00-g
make? – gargoylebident Feb 23 '24 at 21:08