Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a DMG which I downloaded using Safari. When I double click it, the volume mounts but it doesn't open in a new Finder window.

Any idea why this would happen, and how I can fix the DMG so that it does? (PS - I've created the dmg and hope to distribute it, but it not auto-opening sucks)

share|improve this question

Here are a few online guides to creating auto-opening DMG files.

From the first guide by Bill Bateman, step 23 seems to be the key:

Click Convert on the toolbar. Enter a new filename and make sure the image format is compressed. Click Save. This creates a new image.

Another guide (via this post) has a bunch of information. The info regarding the auto-open piece is here:

But we found that the .dmg doesn't always open up its window when mounted. This “autoOpen” utility solves that problem:

One of these two guides should help you set up the auto-opening DMG.

share|improve this answer

The autoOpen feature is a simple flag that needs to be set within the header of the file.

The file format details is there:

It is explained that the offset 0x58 of the "header" section should be set to an Int32 representing the ID of the directory that needs to be opened (0 for none, 1 for root's parent, 2 for root, 0xXXXXXXXX for the directory with ID 0xXXXXXXXX).

Also don't forget that the header itself is starting at offset 1024 (0x400) so the total offset should be 0x0458.

It tested the following command successfully:

printf '\x00\x00\x00\x02' | dd conv=notrunc of=$dmg_file bs=1 seek=$((0x0458))

where $dmg_file is your dmg file.

share|improve this answer

It can be much simpler. The DMG will behave just as the folder/volume it was created from. That includes open windows. So if you create the DMG while that window is open, it should automatically open up again when mounting that image. This includes view options, size and position. Keep in mind that other users may have different options set for the various toolbars which may result in a smaller window than you expect. Just make the window a little larger to compensate for that and prevent scroll bars from appearing.

share|improve this answer
No this is unfortunately not true for auto open. – Lothar Jun 23 at 6:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.