rds :: graphikos

[ home | photos | gallery | scheme | notes | blog | facebook | twitter | youtube | last.fm | myspace | del.icio.us | EverythingHerePlus ]

Collected Short Items 1

Various items and how to information, recorded partly so I can refer back to them if necessary. Some items may help others.

Contents
OSX: Passing CVS Traffic Through NATD Firewall
OSX: Modifying iTunes-LAME to use an Alternate LAME Installation
OSX: Modifying iTunes-LAME's Encoding Options List
OS9/OSX: DECLaser 1152 Printer Notes and PPD (DRAFT)
OSX: MSOE 5.0.3 and Mac OS X 10.2 and higher

OSX: Passing CVS Traffic Through NATD Firewall

I Use my Pismo's modem as the gateway for my home lan to the outside. Nearly all other Internet access is on my x86 OpenBSD box. Most things run fine, including CVS for src and ports on OpenBSD. However, I was always seeing timeout errors for project CVS gets and updates. For a while, I would just run CVS on the Pismo and then scp the directory over to the OpenBSD box since I am almost always maintaining the same builds on both systems anyway. It is tedious though. I then realized that the reason OpenBSD's trees worked is because it uses CVS over SSH. OSX's Firewall allows SSH traffic. To get other projects to work, I needed to add a entry. Here's how:

  1. Open 'System Preferences' and select 'Sharing'
  2. Select the 'Firewall' tab and click 'New...'
  3. For 'Port Name:' select 'Other'
  4. For 'Port Number, Range or Series:' type 2401
  5. For 'Description:' type anoncvs and click 'OK'

OSX: Modifying iTunes-LAME to use an Alternate LAME Installation

LAME has long been considered a premier encoder on any platform and compiles on OSX. The problem with using it to encode a large number of files is that it requires hand entry of ID tags. Although available for some time now, I recently discovered iTunes-LAME Encoder by Blacktree, Inc. This software installs as an iTunes script plug-in allowing iTunes to utilize LAME as its encoder. iTunes-LAME Encoder combines the convenience of iTunes' song management and ability to retrieve CD track names (unfortunately via Gracenote, see FreeDB for more on this) with LAME's higher quality and flexibility. Aside from a few minor issues (like the inability to hide its window), iTunes-LAME Encoder shines.

iTunes-LAME Encoder 2.0.2 utilizes an existing local LAME install or the LAME 3.92 included with the distribution. It expects a local LAME installation to reside in /usr/local/bin, which is the default place for make to install. As discussed in Utilizing an Alternative to /usr/local on OSX, there are other locations that an administrator might install projects compiled locally. Here we will see how to modify iTunes-LAME to utilize an LAME installation in a path other than /usr/local/bin.

iTunes-LAME contains an internal copy of LAME 3.92 that must be disabled before getting it to use a LAME binary out of its expected path. This copy is easily found by opening iTunes-LAME's package in the Finder by Right (Control) Clicking the iTunes-LAME icon and selecting 'Show Package Contents' from the resulting contextual menu. The path to the internally installed copy is /Users/[user_name]/Library/iTunes/Scripts/iTunes-LAME.app/Contents/Resources/lame. Deleting or renaming the binary are viable options. I choose to compress it in order to keep the copy on hand, without it taking up undue space. This is a simple matter of typing at a Terminal or xterm prompt gzip -9 /Users/[user_name]/Library/iTunes/Scripts/iTunes-LAME.app/Contents/Resources/lame. I then created a symbolic link to the local copy of LAME (3.93) in the same directory that iTunes-LAME stores its internal version:

ln -s /Users/Shared/bin/lame /Users/[user_name]/Library/iTunes/Scripts/iTunes-LAME.app/Contents/Resources

iTunes-LAME now uses the locally installed copy of LAME as if it was the internal version is ships with. The LAME version iTunes-LAME uses is easily verified by clicking the 'About' button in the iTunes-LAME window. The second line of text in the about dialog displays the version, in this case 'LAME v3.93.'

OSX: Modifying iTunes-LAME's Encoding Options List

iTunes-LAME Encoder 2.0.2 by Blacktree, Inc. working window has an 'Encoding Options' pop-up menu that allows selection and entry of either its default LAME encoding options, or those created by the end user. However, it doesn't allow one to delete or modify an existing option. This limitation is easily circumvented by editing the file iTunes-LAME uses to generate the menu. iTunes-LAME stores this data in a property list file with the following path:

/Users/[user_name]/Library/Preferences/com.blacktree.iTunes-LAME.plist

Edit the file using a text editor or a plist editor like Apple's Property List Editor. Each string entry under the key encodingOptions is a menu choice in iTunes-LAME's 'Encoding Options' which you can delete, modify, or create new entries. The following shows the software's two defaults and a line with my personal setting.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>NSWindow Frame encoderWindow</key>
	<string>-1022 269 324 126 -1024 0 1024 768 </string>
	<key>dv  com.apple.soundmgr._DV Sound Output Settings</key>
	<data>
	fQAAAA==
	</data>
	<key>encodingOptions</key>
	<array>
		<string>--vcomment --abr 160 -h</string>
		<string>-h -b 160</string>
		<string>--alt-preset standard</string>
	</array>
</dict>
</plist>

OS9/OSX: DECLaser 1152 Printer Notes and PPD

Back in the day this printer from the company famous for its mini computers caused quite a stir being the first licensed PostScript printer for under a grand. Being on a budget, but needing PostScript for client comps and the like, I bought one. Although very slow by today's standards, it still works and only chokes and the most complex postscript illustrations. When I first got the pismo, I was concerned as I was always needing to transfer files to an older machine in order to print. Fortunately, I learned of LocalTalk Bridge and it works just fine with my network. Printing from the Pismo under OS9, using the 5500 as the print server connected to the printer.

When I began using OSX on the Pismo I needed to find a way to print. Drivers for this older printer were not available, so I decided to try the DEClaser1152v2011.113 PPD file I had been using on all my older machines. This PPD was from another DEC printer PPD, but had modified to match most of the features for the DECLaser 1152 many years ago. When I first tried installing it in ~/Library/Printers it didn't work. I tried converting the line breaks from Macintosh to Unix and that solved the problem. It feels good to have one piece of hardware that works with OSX, unlike some others like the Wacom tablet. I am making the PPD freely available, although anyone interested in using should probably see Adobe and Aldus' draconian license/copyright nonsense at the begining of the file for good measure. Place the PPD file in either a user account /Library/Printers directory or at the system level /Library/Printers directory. The 5500 connected to the DECLaser 1152 running LocalTalk Bridge still serves as the print server and works fine with both OSX and Classic printing. The OSX machine recognizes the shared printer as either AppleTalk or IP Printing in the Print Center application under OSX.

OSX: MSOE 5.0.3 and Mac OS X 10.2 and higher

As soon as I upgraded OS X to 10.2 I got an error with MSIE 5.0.3 when I tried checking and sending mail. The content of the error dialog follows.

Error: Could not retrieve mail from the account "athene".
Explanation: The file cannot be found
Error: -3201

Fortunately I immediately launched a copy of OTTool 1.1 from Neon Software to ping a known server. The ping worked so I knew that Classic was working with the TCP/IP stack. I returned to MSIE to try again and my mail downloaded without a hitch. Subsequent launches of MSIE had the same problem and I now use OTTool to establish a connection before checking or sending mail. MSIE will on rare occasions work without having to do this, but it is only about one out of ten times. I have a suspicion the cause is DNS resolution issues, but really can't be sure and don't know if it is MSIE or the Mac OS Classic environment. I have seen the same type of problem when using Panic Software's Transmit 1.6, so I now believe it is a problem in Classic, or my current Mac environment. The same work around using OTTool works for Transmit.

I hope to find a more permanent solution to this problem in the future as it is inconvenient to say the least. In advance to the 'Ten Zealots,' switching email clients is not an option at this time as I periodically need to access my email archives from older OS9 only machines. Additionally, few of OSX client include support for NNTP, including Apple's Mail. Further, the expense of upgrading Transmit and purchasing an email client that works on both 9 and X is not something I wish to incur right now.