MacOS – How to prevent Finder windows from automatically popping up when I attach a disk

external-diskfinderfirewiremacos

I have a removable Firewire drive. It has several partitions, many of which have Mac OS installers on them (I'm a developer/sysadmin, and need to reinstall fairly frequently). However, I also use this disk for backup and storage, so I don't want to install an operating system every time I attach it.

Whenever I attach the drive, Finder pops up a couple windows automatically, offering to install the operating system. I'd prefer that Finder not pop up these windows.

Why do only some of the partitions pop up windows? How can I disable it altogether?

Best Answer

The folder to open is controlled in a special field in the filesystem header. You can change this entry using the bless command as described in this source.

To review the current settings, use the following command:

bless --info /Volumes/Any Disk/

You can change which folder of the mounted volume is opened in Finder on mount:

sudo bless --folder "/Volumes/Any Disk/" --openfolder "/Volumes/Any Disk/Documentation"

You can reset the information completely as well:

sudo bless --unbless /Volumes/Any Disk/

Note that using these bless commands make the volume unbootable, so be careful if you need this. Of course, they also do not work for volumes with a read-only filesystem/medium, such as a CD/DVD.