MacOSX: Arrange icons in a dmg

From Apache OpenOffice Wiki
Revision as of 09:01, 15 July 2008 by Obr (Talk | contribs)

Jump to: navigation, search


This article is a step by step instruction how to re-arrange the icons in a disk image after e.g. a version bump.

1. Convert the disk image you want to modify to an uncompressed format. To avoid any user specific data, change to the /tmp directory first:

# cd /tmp
# hdiutil convert -format UDRW -o temp.dmg OOo_2.4.0_080125_MacOSXIntel_install.dmg

2. Mount the disk image, free disk space and make .DS_Store file writeable

# hdiutil resize -size 500m temp.dmg
# hdiutil attach temp.dmg
# chmod +w /Volumes/OpenOffice/.DS_Store

3. Re-arrange the icons. If you need to re-set the background image, select "Show View Options" from the context menu, chose Background: Picture -> Select, then press Shift-Cmd-G to open the folder /Volumes/OpenOffice/.background and select background.png. If you work on a large monitor, make sure the DMG window position is in the upper left area.

4. Eject the disk image to force Finder to write the DS_Store file

5. Re-mount the disk image and grab the DS_Store file:

# cp /Volumes/OpenOffice/.DS_Store ./DS_Store
Personal tools