LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-01-2003, 10:12 AM   #1
twcinpa
LQ Newbie
 
Registered: May 2003
Posts: 26

Rep: Reputation: 15
Macintosh binhex-encoded files


I just received some family pictures (new niece) from an old Mac. They are labeled 'Macintosh binhex-encoded files'.

Can someone tell me how to convert these to jpg's I can see on Linux.

Regards,

Tom
 
Old 08-01-2003, 11:21 AM   #2
MacKtheHacK
Member
 
Registered: Jul 2003
Location: Boston, MA, USA
Distribution: RedHat, SuSE, Gentoo, Slackware, Mandrake ...
Posts: 111

Rep: Reputation: 15
You need the Linux "macutils" package. Google for a download
appropriate to your Linux distribution. For example, if you're running
RedHat, you probably want:
http://www.redhat.com/swr/i386/macut...2.i386_dl.html

In there, you'll find the "binhex" program. You can use that to decode the Mac binhex compressed files into whatever they really are. Binhex is just a file compression format, like PKZIP. You can probably configure your mailer to automatically run binhex to uncompress these kinds of attachments. How to do that depends on what mailer you use.
 
Old 08-01-2003, 12:45 PM   #3
twcinpa
LQ Newbie
 
Registered: May 2003
Posts: 26

Original Poster
Rep: Reputation: 15
I've installed macutils on my RH9. I'm assuming they are jpeg files, but there is nothing which opens in any graphic software I have, the error in Gimp is 'unknown file type'.

Could this Mac be so old it's transferring something unique to Macs?

Regards,

Tom
 
Old 08-01-2003, 12:55 PM   #4
MacKtheHacK
Member
 
Registered: Jul 2003
Location: Boston, MA, USA
Distribution: RedHat, SuSE, Gentoo, Slackware, Mandrake ...
Posts: 111

Rep: Reputation: 15
It could be that it's just missing the file suffix, but the GIMP should be smarter than that. Try running file(1) on it at see what it thinks the file is. It examines the contents of the file to attempt to determine its type. If it just says "data", then you're SOL.

Another possibility is that you could be looking at the wrong branch. I don't know MacOS at all, but I recall that files have various "branches", which let you encapsulate data, resources, properties, and what-not all in one file. Binhex should let you select which branch to extract. You want the "data" branch, I'm pretty sure. I haven't had to deal with MacOS files in years, so I'm fuzzy on this.
 
Old 08-01-2003, 01:38 PM   #5
twcinpa
LQ Newbie
 
Registered: May 2003
Posts: 26

Original Poster
Rep: Reputation: 15
The files are named L.jpg_1. I've assumed they're jpegs and removed the _1 as well as left it alone.

Sample output:
[tom@localhost family]$ binhex -ulq Lindsey.jpg
name="Lindsey.jpg", type=TEXT, author=MACA, data=20411, rsrc=0?

If it was recognized as a graphics file wouldn't it have some such file as a type?

I've never been on a MAC, so I've no experience with it.

GIMP comes up with an unrecognized format message.

Regards,

Tom

Last edited by twcinpa; 08-01-2003 at 01:39 PM.
 
Old 08-01-2003, 01:44 PM   #6
MacKtheHacK
Member
 
Registered: Jul 2003
Location: Boston, MA, USA
Distribution: RedHat, SuSE, Gentoo, Slackware, Mandrake ...
Posts: 111

Rep: Reputation: 15
I haven't done much on Macs myself, but I have successfully done conversions like you're attempting. But that was years ago so my memory is vague. The only other thing I can think of is that binhex thinks that's a text file, and is converting the Mac line termination character (carriage-return) to the UNIX one (line-feed). That would mess up any binary file, and perhaps mess up a JPEG enough to make it unrecognizable. Look for a binhex option that makes it assume the file is binary.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Decoding an encoded string The_Nerd Programming 2 12-28-2004 08:32 PM
Difficulty downloading executable Macintosh files in Linux Tired8281 Linux - Newbie 1 05-08-2004 06:23 PM
wget...url-encoded filenames linen0ise Slackware 1 10-26-2003 08:22 AM
renaming encoded cd tracks? King of Japan Linux - Newbie 5 10-25-2003 12:37 PM
Back-up files on a Macintosh OS9.0 to RH 9.0 server automatically JUSTAUSER Linux - Newbie 1 10-21-2003 10:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration