I've always wanted a good way to encrypt some of my files, i.e. without plunging into FileVault completely. It's never seemed right to me to just make an encrypted disk image that mounts on my Desktop, though. Recently, I learned that using the hdiutil terminal command, you can mount a disk image at any folder in the filesystem.
This doesn't seem to be working, however. I have an encrypted sparsebundle (HFS+journaled) at ~/Library/Miscellaneous/Blergmeister.sparsebundle, and an empty folder (which should be the mountpoint) at ~/Documents/Blerg. I have its password stored in my Keychain, so that it can be opened easily once I log in. So, I issue the command:
At this point, ~/Documents/Blerg should populate itself with the contents of the disk image.
What happens instead is the "removable drive" icon appears on the desktop and in my sidebar, while the Blerg folder mountpoint gains an alias icon (see screenshots). Yet when I check on the location of the Blerg "drive" on the Desktop (by, say, dragging it to a Terminal window), the mountpoint is correct! So the filesystem is doing exactly what I'm telling it to do, but the Finder is showing me exactly the wrong thing.
Is there any way to get around this failing? The whole purpose of this system is to have several different "encrypted folders" inside my Home folder whose contents are represented in sparsebundles, and not clotting up my Desktop.
Any help is much appreciated. 
This doesn't seem to be working, however. I have an encrypted sparsebundle (HFS+journaled) at ~/Library/Miscellaneous/Blergmeister.sparsebundle, and an empty folder (which should be the mountpoint) at ~/Documents/Blerg. I have its password stored in my Keychain, so that it can be opened easily once I log in. So, I issue the command:
Code:
hdiutil attach /Users/myself/Library/Miscellaneous/Blergmeister.sparsebundle -mountpoint /Users/myself/Documents/Blerg
At this point, ~/Documents/Blerg should populate itself with the contents of the disk image.
What happens instead is the "removable drive" icon appears on the desktop and in my sidebar, while the Blerg folder mountpoint gains an alias icon (see screenshots). Yet when I check on the location of the Blerg "drive" on the Desktop (by, say, dragging it to a Terminal window), the mountpoint is correct! So the filesystem is doing exactly what I'm telling it to do, but the Finder is showing me exactly the wrong thing.


Is there any way to get around this failing? The whole purpose of this system is to have several different "encrypted folders" inside my Home folder whose contents are represented in sparsebundles, and not clotting up my Desktop.

