Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Mount .bin-encoded disk images with Disc Copy System
I just downloaded and installed Apple's X11, a package named X11UserForMacOSX.dmg.bin. I knew that hdiutil (a Unix tool handling disk images under the OSX hood) could manage bin-encoded disk images, so I dragged the file to Disc Copy, and it mounted just fine, and quick. No need to go and let Stuffit un-bin the file first! But, wanting to be able to do this faster in the future, I wanted to add Disc Copy to the list of applications available when you control-click a .bin file and choose "Open With".

Read the rest of the article for the how-to...

Every modern application package in OS X is a bundle, and has an Info.plist file in the Contents folder. To see this, just control-click an Application, like Disc Copy and choose "Show Package Contents". In the Info.plist file, many things are defined, for example, which files an app can open. To edit the Info.plist, you can use a handy tool like Property List Editor, bundled with the Developer tools, or you can use any text editor. I'll simply use TextEdit.

First, backup the entire Disc Copy application or simply the Info.plist file, to know that if you screw things up, you'll still have a rescue.

Now, if you open Info.plist inside the application bundle with TextEdit, you I will see alot of non-understandable xml. You can however note this "tag":
<key>CFBundleDocumentTypes</key>
<array>
...
It is inside this section we will add the .bin file extension to Disc Copy's repertoire. There are a lot of File types defined in the file, and to find the end of the list search for "sparseimage", the last file type defined. Insert the following xml block beneath the
<dict> ... \</dict>
block corresponding to "sparseimage":

<dict>
<key>CFBundleTypeExtensions</key>
<array>
       <string>bin</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>diskcopy-doc.icns</string>
<key>CFBundleTypeName</key>
<string>MacBinary Encoded File</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
Be sure to insert the block before the end of the CFBundleDocumentTypes-array, which ends with

</array>
<key>CFBundleExecutable</key>
<string>Disk Copy</string>
...
Check again to see that no mistakes where made, and save the file. After a relogin, you can control-click a .bin file (make sure inside that .bin is a .dmg disk image, though!) and choose Open With -> Disc Copy.
    •    
  • Currently 2.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
 
[53,353 views]  

Mount .bin-encoded disk images with Disc Copy | 6 comments | Create New Account
Click here to return to the 'Mount .bin-encoded disk images with Disc Copy' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Why encode a diskimage anyway?
Authored by: vogunaescht on Apr 11, '03 11:45:02AM

Could someone please enlighten me why I would want to encode a OS X disk image with MacBinary? I thought Binhex and MacBinary encoding is used to make sure the resource fork of a file doesn't get lost by means of non resource fork aware transmission. And OS X disk images do not have a resource fork as OS 9 images did.

So why do this? To keep misconfigured servers from passing a wrong mime type?



[ Reply to This | # ]
Mount .bin-encoded disk images with Disc Copy
Authored by: cynikal on Apr 11, '03 12:28:11PM

i'm not sure why they bin encode .dmg files, but i hate it when a misconfigured web server sends me the raw data contents of .dmg to my web browser.. if it's big enough it will stall my web browser as it tries to load the contents.. it's very annoying :-\

I say gzip .dmg files (if they aren't already a compressed filesystem).



[ Reply to This | # ]
Mount .bin-encoded disk images with Disc Copy
Authored by: mrbiiggy on Apr 11, '03 01:32:12PM

Maybe we should be a little more specific here and change the title of this hint to: "Mount MAC BINARY-encoded disk images with Disc Copy"

.bin is a totally different kind of image, originating from a totally different OS. It's terrible to confuse people like that. (Namely me)



[ Reply to This | # ]
Mount .bin-encoded disk images with Disc Copy
Authored by: bill_mcgonigle on Aug 26, '04 04:04:55PM
.bin is a totally different kind of image, originating from a totally different OS. It's terrible to confuse people like that. (Namely me)

.bin has been the macbinary file extention for about twenty years. Before that I'm sure other people used it for generic binary files. Just because some knucklehead decided to use it for video cd's in the late 90's doesn't mean it's proper.

That's why mime-types were invented, anyhow, extensions are too small of a namespace.

Anyway, to stay on topic, .bin encodes some finder information as well as resource forks.

[ Reply to This | # ]
Mount .bin-encoded disk images with Disc Copy
Authored by: JohnnyMnemonic on Apr 11, '03 07:54:24PM

Why not just change the application association with Get Info? You can set the default apps to open a given type of file, identified by the extension--and you can make it the default app for every file with that extension.

Interestingly, when I try this with a random .bin file and associate it with Disk Copy, I get an error message--not known if Disk Copy can handle this type of file. I guess it can, but why doesn't Disk Copy know it already?!



[ Reply to This | # ]
Mount .bin-encoded disk images with Disc Copy
Authored by: Areh on Apr 14, '03 06:00:01PM

Yes, don't confuse that with xyz.bin images. These contain video mostly. They can be used on Macs as well. The Mac will normally put a StuffIt icon on them although they are not StuffIt encoded. They are images that can be dragged onto Toast to burn a (S)VCD. When you have an accompanying .cue file, you can watch the video contained in them.



[ Reply to This | # ]