38

I've started using Forklift as a Finder replacement, so I don't need Finder in my Dock. In fact, I would much rather have Forklift be the farthest left icon so I don't accidentally click on Finder.

The usual method of dragging the app out of the Dock doesn't work, and neither does command-dragging. The contextual menu doesn't allow you to remove the icon.

Is there some way to, on Lion, remove the Finder from the Dock?
Perhaps there's a database or plist file I can change?

1
  • cDock has this capability. Commented Jun 1, 2019 at 14:58

2 Answers 2

31
+100

There is no easy way to do this, but there is a little hack :)

  1. Navigate to /System/Library/CoreServices/Dock.app/Contents/Resources/
  2. Backup DockMenus.plist
  3. Open DockMenus.plist in your favorite text editor with root access
  4. Find section finder-running and add new sub-section

    <dict>
        <key>command</key>
        <integer>1004</integer>
        <key>name</key>
        <string>REMOVE_FROM_DOCK</string>
    </dict>
    

    or just Download my version of DockMenus.plist

  5. In plist editor file should look like this:

    Plist Editor

  6. Open Terminal and run killall Dock.

  7. Right click on Finder icon in Dock - Bingo!

    Finder "Remove from dock"

p.s After Dock restart (manual relaunch or mac reboot) you need manually remove Finder icon from Dock

12
  • 7
    Oneliner :) f=/System/Library/CoreServices/Dock.app/Contents/Resources/DockMenus; sudo cp $f.plist $f-old.plist; sudo defaults write $f finder-running -array-add '<dict><key>command</key><integer>1004</integer><key>name</key><string>REMOVE_FROM_DOCK</string></dict>'; sudo chmod 644 $f.plist; osascript -e 'quit app "Dock"'. I didn't find any way (other than GUI scripting) to automatically remove Finder from Dock after relogins though.
    – Lri
    Commented Nov 7, 2011 at 11:39
  • 1
    @Lri oneliner is efficient but always confusing. About code signature - in case of problems with modified Dock.app you could restore *.plist from backup and run codesign -v /System/Library/CoreServices/Dock.app/Contents/MacOS/Dock.This should solve the problem. Commented Nov 7, 2011 at 11:59
  • 4
    Awesome, thanks! I set up a script to run at login to click the menu item: tell application "System Events" to tell UI element "Finder" of list 1 of process "Dock" perform action "AXShowMenu" click menu item "Remove from Dock" of menu 1 end tell Commented Nov 8, 2011 at 1:18
  • 4
    Works for me on Mavericks. Except that the white 'light' underneath the icon (or rather, where the icon would be) is still there).
    – eebbesen
    Commented Mar 12, 2014 at 3:13
  • 2
    @eebbesen you'd have to quit finder before removing it from Dock.
    – Afzal N
    Commented Oct 27, 2014 at 18:26
1

It works for me on HighSierra (10.13.6) with SIP disabled.

I have used the following command to edit the .plist file:

PL="/System/Library/CoreServices/Dock.app/Contents/Resources/DockMenus.plist"&&
sudo -- defaults write $PL finder-running -array-add  '<dict><key>command</key><integer>1004</integer><key>name</key><string>REMOVE_FROM_DOCK</string></dict>'

Check result with sudo defaults read $PL finder-running.

If it looks fine run sudo chmod -v +r $PL; killall Dock.

Here is the Italian formatted version of that AppleScript:

tell application "System Events"
    tell UI element "Finder" of list 1 of process "Dock"
        perform action "AXShowMenu"
        click menu item "Rimuovi dal Dock" of menu 1
    end tell
end tell

That’s all, I hope it is useful as a quick complete recap.

You must log in to answer this question.

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