The removal of the extra volumes from the sidebars is trivial: just right-click (or Control+click) on the drive entry and select the Remove from Sidebar option.
But how to deal with the icons on the desktop? One possibility is to open the Finder's preferences and tell it to not show entries for hard disks. The downside is that all direct accesses to the file system will disappear, including those that represent external disks.
A slightly better solution is to mark the volume's mount point as hidden, which will effectively make it invisible to the Finder. To do this you have to set the invisible extended attribute on the folder by using the SetFile(1) utility (stored in /Developer/Tools, thus included in Xcode). For example, to hide our example /Users mount point:
# /Developer/Tools/SetFile -a V /UsersYou'll need to relaunch the Finder for the changes to take effect.
The above is not perfect, though: the mount point will be hidden from all Finder windows, not only from the desktop. I don't know if there is any better way to achieve this, but this one does the trick...
Very cool, I used it for a partition on my firewire drive that I use only to mirror my drive and it worked just fine. sudo SetFile -a V /Volumes/Mirror
ReplyDeleteI also found that formatting with a leading period will work (if you are installing Developer Tools for just this purpose). Details here:
ReplyDeletehttp://blatti.net/2007/02/14/invisible-volume-in-os-x/
dblatti: Nice but then... how do you access that volume? I assume it will not appear in any Finder window. Do you set up symbolic links or aliases that point into its contents? (E.g. /Users pointing to /Volumes/.Whatever/Users as in my situation?) Do you only access it from the command line?
ReplyDeleteYou can remove the desktop icons in the Finder Preferences page, General panel... enjoy! So nice not to have those silly things cluttering my wallpaper.
ReplyDeleteRussell: I know, but there you can only disable groups of items. I still want to have direct access to the hard disk from the desktop, but wanted to hide a single volume from appearing there. Thanks though!
ReplyDeleteI have MAC for 2 days and I already figured this out!
ReplyDeleteIt is simple, right click on the Macintosh HD icon and select make Alias - this will create "shortcut icon"
Now go to finder, preferences and switch off the Hard disks. The Alias will stays on desktop.
Sometimes it helps going from Win environment...
well that's some trick! thx a lot!
ReplyDeleteNice solution Julio! Thanks.
ReplyDeleteGreat work Julio! I used 'sudo SetFile -a V /Volumes/Backup' to make the drive disappear...now what would I use to make the drive re-appear again? Thank you very much for your help!
ReplyDeleteDean: "man SetFile" The answer is right in the description of the -a option.
ReplyDeleteAwesome, got it...Thanx again Julio!
ReplyDelete