Can't set background image for DMG image file

Apologies for being off-AS topic but, I’m getting desperate. I’m trying to set a background image in the DMG image file that I use to distribute my applet. I use Finder’s “Show View Options >> Background >> Picture” function for the purpose. I have two problems.

The first is that the “Drag image here” method of adding a picture does not work. When I eject and reopen the image, the picture is not visible. The method which works is to click on “Drag image here” and use the open file dialog to find the desired image file. On ejecting and reopening, the image is visible. It seems that the background image is retained. Is that a bug in Finder ?

The second is that while the background image seems to be retained, it is not visible when the image file is opened on any other Mac. My development Mac runs Tahoe. I’ve have opened the DMG on Macs running Monterey and Sequoia. The background image is not visible. I don’t understand why.

The “Finder” method I’m using must be faulty. All sources I’ve found online explain that the background image should be inside a hidden “.background” folder. However, Finder in macOS Tahoe will not allow that folder to be created inside a DMG, even using an Admin user account. Also, that folder is not created when I used “Show View Options” to add a background image. I do wonder how Finder shows an image when it is not saved to anywhere I can find inside the DMG – is it cached ?

I have tried copying a “.background” folder across from another DMG (Firefox) to my DMG. That did not work – Finder does not show the background image on any Mac.

There must be a way of crafting a DMG background image which is visible on all versions of macOS. Can any one help ?

I don’t know if you’re interested in 3rd-party solutions but may I suggest DMG Canvas: DMG Canvas - Disk Image Layout and Building for macOS

The time you’ll save on wrestling with the built-in macOS ways may well worth the investment. At least that’s my experience. Plus it may have some sort of a free mode, not sure by now. I’ve been using it for years.

Thanks, yes, I might just have to give up and buy a 3rd party tool. DMG Canvas doesn’t seem to have a free version – US$30. Drop DMG is another famous tool that’s been around for many years.

No. As we all know, such things are stored in the .DS_Store files. But, I still don’t understand why the saved background is not visible on other Macs, Also, I think the background picture disappears if the “Show View Options” dialog is opened again. That seemed to happen a short while ago. The Show View Options dialog opens with the “Picture” button selected but the picture is gone and the .DS_Store file is suspiciously smaller. I think Finder is removing the picture – perhaps part of the bug I found in my first problem above.

1 Like