Hide unwanted external drives on the Mac OSX desktop
I have a number of external hard drives attached to my Mac. Some for Time Machine, others for iTunes media, but they’re all external drives. In the MacOS finder preferences you have the ability to hide items from the desktop, and one of those is aptly labeled, “External disks.”
I like the desktop clutter free, and mounted volumes that I’ll never directly need access to (away from the command line), I don’t want to see on the desktop. However, I do want to see items like USB flash drives mounted on the desktop. Unfortunately these items are all considered “External disks.” However there is a solution.
And it’s a very simple solution. First, make sure that Finder is configured to display external disks on the desktop. The real answer lies in using the built in file flags that are part of Mac OSX. Simply issue a
chflags hidden [file] and you’re already the majority of the way there.
$ chflags hidden /Volumes/Time\ Machine/ $ chflags hidden /Volumes/Media/
You can verify that the flags were set by using:
$ ls -ldO /Volumes/Media drwxrwxr-x@ 11 jhowk staff hidden 442 Jul 29 18:29 /Volumes/Media
The last item that needs to be done is to restart the Finder. The
chflags changes will not be reflected until the Finder has been restarted.