The Haiku/BeOS Tip Server
Tips and tricks for Haiku/BeOS users

Expanding the Expander

Contributed by: Peter Schultz
This tip is valid for: Both BeOS and Haiku

Archive types that are unsupported by Expander can easily be added. Three such examples are bzip2 (.bz2), lha (.lha,.lzh), and xbin (.hqx) or for .arj and .rar.

First add the following rules to /boot/home/config/etc/expander.rules:

"application/mac-binhex40"    .hqx     "xbin -l %s"
"xbin -v %s"
"application/bzip2"     .bz2     "bzip2 -dc %s | tar -tvf -"
"bzip2 -dc %s | tar -xvf -"
"application/x-lharc"    .lha     "lha l %s"
"lha x %s"
"application/x-lzh"      .lzh     "lha l
"lha x %s"

Now launch the File Types preference panel and add these file types to the application group if they haven’t been already. Come up with a type name such as “bzip2 archive,” then add the internal name which is the part after “application/” — in this case use “bzip2”.

Now, open the Expander executable with FileTypes and add them to its list of supported types. Save your changes and go back to your new types in File Types and make Expander the preferred application for them.

Posted in Applications

(comments are closed).