I'd like to auto mount my dmg file which represent disk image with single HFS+ partition upon every boot. is it possible through autofs ? do I have to set the location of the dmg file in any configuration file (/etc/...
)
thanks
automountdmgfilesystemhfs+mount
I'd like to auto mount my dmg file which represent disk image with single HFS+ partition upon every boot. is it possible through autofs ? do I have to set the location of the dmg file in any configuration file (/etc/...
)
thanks
Best Answer
You can simply add the .dmg file to your Login Items in: System Preferences > Users & Groups > (you) > Login Items
The .dmg file will then automatically be mounted when you login.
Update to address comment: "Is there any API to add item to login items programmatically?"
One programatic way I know of, it can be done with AppleScript:
Example AppleScript code:
It can also be done from Terminal using, using the
osascript
command, with the same AppleScript command: