Linux Blog

Open Apple .dmg files on Linux

Filed under: Quick Linux Tutorials — TheLinuxBlog.com at 8:00 am on Wednesday, December 8, 2010

open dmg files on linux

Opening Apple .dmg files on Linux is actually quite easy. I had to open one to try and find a .ppd but I won’t judge you for whatever reason you need to open one for. You’ll need to install a basic tool called dmg2img (http://vu1tur.eu.org/tools/). Use your apt-get or similar tool (I didn’t see it in Fedora’s yum) to install it.



For this example we’ll use Adium. I tried CyberDuck FTP but apparently it just comes zipped up these days.

So you have Adium_1.3.10.dmg all you need to do is this:

owen@linux-blog:~/Downloads$ dmg2img Adium_1.3.10.dmg

and you’ll end up with something like:

dmg2img v1.6.2 is derived from dmg2iso by vu1tur (to@vu1tur.eu.org)
Adium_1.3.10.dmg --> Adium_1.3.10.img
reading property list, 20674 bytes from address 22348691 ...
decompressing:
opening partition 0 ... 100.00% ok
opening partition 1 ... 100.00% ok
opening partition 2 ... 100.00% ok
Archive successfully decompressed as Adium_1.3.10.img

You should be able to mount the image [as root] by:

modprobe hfsplus
mount -t hfsplus -o loop Adium_1.3.10.img /mnt

The last step you’ll need to do is what it tells you above. Most distributions will automatically modprobe the hfsplus module when you run the mount. Use sudo rather than switching to root and I’d also recommend putting it somewhere that makes more sense than /mnt. Perhaps mkdir /mnt/Adium and mount to there.

sudo mount -t hfsplus -o loop Adium_1.3.10.img /mnt/Adium

Don’t forget once you’ve done it to remove the /mnt/Adium directory!


2 Comments »

Comment by Leandro

February 3, 2011 @ 2:54 pm

Recientemente necesité hacer lo mismo para extraer algunos archivos de un .dmg. ¡Muy bueno el post!

Comment by TheLinuxBlog.com

February 3, 2011 @ 3:38 pm

Translation: Recently I needed to do the same to extract some files from a. dmg. Very good post!
Thanks @Leandro!

RSS feed for comments on this post. TrackBack URI

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>