remove Finder icon from Dock
Does anyone know a way to permanently remove the Finder icon from the Dock? Either by a Terminal command or a 3rd party software package?
MacBook Air, Mac OS X (10.7.2)
Does anyone know a way to permanently remove the Finder icon from the Dock? Either by a Terminal command or a 3rd party software package?
MacBook Air, Mac OS X (10.7.2)
Lanny is wrong. A running app doesn't need to show up in the dock. Some are displayed in the menu bar, some aren't visible anywhere. I found a solution to your question at http://apple.stackexchange.com/questions/30415/how-can-i-remove-the-finder-icon- from-my-dock which adds REMOVE_FROM_DOCK to your dock icon's context menu. It doesn't quit Finder, it just adds the option to, well, remove it from the dock.
Here's the quick way: Run this one-liner in Terminal and that's it.
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"'
Lanny is wrong. A running app doesn't need to show up in the dock. Some are displayed in the menu bar, some aren't visible anywhere. I found a solution to your question at http://apple.stackexchange.com/questions/30415/how-can-i-remove-the-finder-icon- from-my-dock which adds REMOVE_FROM_DOCK to your dock icon's context menu. It doesn't quit Finder, it just adds the option to, well, remove it from the dock.
Here's the quick way: Run this one-liner in Terminal and that's it.
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"'
The "why" really isn't all that important. I just want to make some space in the Dock and the Finder icon is pretty much useless.
If you want to remove the dock icon automatically at login, just save this little AppleScript as an application and add it to your login item in your System Preferences. It will only work if you've already run the previous line of code in Terminal.
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
If the script doesn't work, you've probably not enabled GUI scripting. Go to System Preferences / Universal Access, and check the box that says Enable support for assistive devices.
I'm not talking about shutting down the Finder. Not talking about ending the Finder as a process. Just getting rid of the icon from the Dock. There is a difference.
Remember, that any running program is always shown in the Dock, if the Finder wasn't running, you wouldn't have a Desktop.
So, if you quit the Finder, you would theoretically be able to remove it from the Dock, but then you wouldn't have a Dock, duhh.
Why would you want to?
To add to your excellent reply, the Desktop IS a Finder window. One and the same.
Thanks, Pal! That worked perfectly.
Hey Monostratos, i am seeing this error message when running your apple script
error "System Events got an error: Can’t get menu item \"REMOVE_FROM_DOCK\" of menu 1 of UI element \"Finder\" of list 1 of process \"Dock\"." number -1728 from menu item "REMOVE_FROM_DOCK" of menu 1 of UI element "Finder" of list 1 of process "Dock"
I ran the terminal command, so I can right click manually and remove it from the dock, and I have enabled support for assistive devices.
Any thoughts?
Thanks for your time
Hey Monostratos (:
Script worked perfeclty (: Finally no Dock...
It did also removed it from the CMD + Tab menu. I don't need it there but I did like it. Any way to get that back?
Also, would your solution also work for other apps? The specific one I'm thinking of is BOINC, which I always have running. But it also appears on the mac menu bar. For now it's also constantly on the dock and in the CMD + Tab menu...
Any way to remove it from those two places while still having it run and stay in the top menu bar?
Cheers (:
I am keep getting the exact same problem as Bodhisattvah... Any ideas?
+ I want to ask - is it problem if i forget to backup original dock file? I cant see why is it wrong.
Thanks alot.
That is incorrect - Monostratos came with a pretty good solution that actually adds the "remove" button. However the problem is with making it happen by itself whenever you turn on your mac.
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
Seems not to work.
Yes, sorry I missed the first half of the solution (editing the plist). To make the Applescript work, change it to this:
tell application "System Events"
tell UI element "Finder" of list 1 of process "Dock"
perform action "AXShowMenu"
click the last menu item of menu 1
end tell
end tell
rojvol wrote:
is it problem if i forget to backup original dock file? I cant see why is it wrong.
The Terminal script you ran backed it up for you. You can find the original here:
System/Library/CoreServices/Dock.app/Contents/Resources/DockMenus-old.plist
If you want to undo the entire procedure, just delete the file called 'DockMenus.plist' and then rename 'DockMenus-old.plist' to 'DockMenus.plist'.
After that, in Terminal type
killall Dock
and press 'return'.
Your Finder icon will reappear without the 'Remove from Dock' menu. If you put the Applescript in your login items, don't forget to remove that, too.
remove Finder icon from Dock