about photos bookshelf portfolio blog home
Begin main content

Leopard glitch unmounting disk images

I've found what seems to be a recurrant glitch on my new Leopard install - disk images just don't unmount via the Finder. Download and mount any .dmg and no matter how many times you drag them to the trash, click the eject icon in the sidebar or right click->eject, they stubbornly stay mounted.

It seems to be a Finder issue rather than with the disk image driver since a simple umount /Volumes/DiskImageName makes them disappear pronto.

Update: Further, Finder also gets terribly confused in some circumstances where you mount two (different) images with the same volume info. I got into one state where there was one volume showing in the sidebar that wasn't even mounted. A swift relaunch of the Finder sorted that out...

Update 2: Seems after relaunching the finder the original issue itself went away.

10:32 PM, 28 Oct 2007 by Mark Aufflick Permalink | Comments (1)

TimeMachine takes you back to a time before teh Internet

So I easily got an Amazon S3 storage bucket mounted under Leopard, but it turns out Time Machine doesn't support network mounts.

Well it's not that it can't, it actually does - but it won't show you any disks that it doesn't think are local (eg. disks served by Airport Express apparently work fine), so Apple evidently have decided that my net connection isn't fast enough for backups so I'm best off not even trying :(

So let's start hacking :) The TimeMachine preference pane binary has the following methods:

@interface AppleTMPref (Private)
- (BOOL)_isSupportedNetworkMountPoint:(id)fp8;

@interface AppleTMSettings : NSObject
{
    ...
}
- (BOOL)isNetworkBackup;

@interface TMBonjourBrowser : NSObject
{
    NSNetServiceBrowser *_browser;
    NSMutableArray *_netServices;
    NSImage *_serverImage;
}

- (id)init;
- (void)dealloc;
- (id)_dictionaryFromAirPortDiskData:(id)fp8;
- (BOOL)_isLocalNetService:(id)fp8;
- (id)_volumesFromNetService:(id)fp8;
- (id)bonjourDisks;
- (void)netServiceBrowser:(id)fp8 didFindService:(id)fp12 moreComing:(BOOL)fp16;
- (void)netServiceBrowser:(id)fp8 didRemoveService:(id)fp12 moreComing:(BOOL)fp16;
- (void)netServiceDidResolveAddress:(id)fp8;
- (void)netService:(id)fp8 didNotResolve:(id)fp12;

@end

@interface SnapshotUtilities : NSObject
{
}

+ (BOOL)mountPointIsNetworkVolume:(id)fp8;
Time to crack out F-Script...

08:30 PM, 28 Oct 2007 by Mark Aufflick Permalink | Comments (2)

Leopard Amazon S3 network storage

Ok so I'll write this up better later, but here are the steps I followed to successfully mount an Amazon's S3 network storage bucket under Leopard:

  1. create an amazon web services account
  2. sign up for amazon S3
  3. download MacOS X S3 Browser
  4. install MacFUSE Core for OSX 10.5
  5. get your Amazon S3 key ID & secret (you'll get an email from Amazon with an url about that after signing up)
  6. login and create an Amazon S3 bucket using the S3 Browser you downloaded (I called my bucket "12inch-timemachine" for backing up my 12" Powerbook)
  7. download s3fs.cpp from the s3fs project
  8. you'll need to add the following line to the top of the file somewhere:
    #define __off_t off_t
    (props to Roberto Saccon for figuring this out)
  9. compile s3fs.cpp with the following incantation:
    g++ -Wall -D__FreeBSD__=10 -D_FILE_OFFSET_BITS=64 -I/usr/local/include/fuse -L/usr/local/lib -lfuse -pthread -lcurl -lcrypto `xml2-config --cflags --libs` -ggdb s3fs.cpp -o s3fs
  10. create the file /etc/passwd-s3fs with your amazon s3 key id and secret separated by a colon ie:
    example-id:example-secret-key (note that you'll want to be careful about the permissions on this file)
  11. mount the S3 bucket as an OSX directory like so eg:
    mkdir ~/s3
    ./s3fs your-bucket-name ~/s3 -ovolname=Flubber
    where Flubber can be whatever you want the mounted volume to appear named as
  12. you can now access the mounted volume at your mount point (in the above example ~/s3) or as a Finder Volume which you can see by going to "Computer" in the Finder's "Go" menu. Not sure why it doesn't show up in the Sidebar)

Update: It seems Leopard, by default, doesn't show network volumes on the desktop by default. You can turn that on in finder preferences, but your volume still won't show up in the sidebar (under either Devices or Shared). A simple solution is to us the local option like so:

./s3fs your-bucket-name ~/s3 -olocal,volname=Flubber
Unfortunately that still doesn't allow it to work with time machine. You also get a folder icon on the desktop instead of a disk icon, but it's in the sidebar under Devices now. The icon even has a working eject icon which is handy, but it leaves an annoying folder icon in the sidebar.

Update 2: the ping_diskarb option seems to help keeping the Devices icon current:

./s3fs your-bucket-name ~/s3 -olocal,ping_diskarb,volname=Flubber

Update 3: The previous must be in my imagination:

On Mac OS X 10.5.x, both these options [ping_diskarb, noping_diskarb] are no-ops

08:18 PM, 28 Oct 2007 by Mark Aufflick Permalink | Comments (1)

Leopard Finder Cocoa?

I don't remember hearing about this, but default Cocoa text shortcuts (eg. emacs keys like Ctrl-a for home, Ctrl-e for end) work in Finder now.

06:44 PM, 28 Oct 2007 by Mark Aufflick Permalink | Comments (0)

Leopard - first usability suck

Well I rushed out and bought Leopard, mostly for the garbage collected goodness of Objective-C 2.0.

The look and feel changes are mostly nice, but I have found one minor tweak that irritates me no end - and doesn't make sense to me from an HCI point of view.

If you have opened a drop down menu, and you decide you are happy with the existing selection, it used to be that you could "dismiss" the menu and leave it as it is by clicking anywhere on the screen outside the menu.

Now you need to either click on the selected option to re-select it, or if there happen to be unavailable options in the menu (ie. greyed out) you can click them as well.

Now that sucks from an HCI standpoint in two ways. First, to execute this relatively common action you now need to click in a quite small area instead of simply flicking your wrist and clicking. Secondly it is inconsistent with the menus in the menu bar, where you can click anywhere outside an open menu to dismiss it.

Update: It seems to have been another "glitch" because after a reboot I can no longer replicate it. Little bugs happen - at least it's not a change in the ui thinking.

06:35 PM, 28 Oct 2007 by Mark Aufflick Permalink | Comments (2)

XML

Blog Categories

software (4)
  ..heads up 'tunes (4)

Notifications

Icon of Envelope Request notifications

Syndication Feed

XML

Recent Comments

  1. Mark Aufflick: all good ideas
  2. Unregistered Visitor: Excellent!
  3. Mark Aufflick: Hey thanks
  4. Unregistered Visitor: Fantastic entry
  5. Mark Aufflick: Bah - dashboard widgets
  6. Unregistered Visitor: Nice
  7. Mark Aufflick: elegant maths (as opposed to elegant rabbit)
  8. Unregistered Visitor: Does that really matter?
  9. Mark Aufflick: Inspiration
  10. Unregistered Visitor: Perhaps...