macosxhints.com – Use ‘screen’ as a serial terminal emulator
Use ‘screen’ as a serial terminal emulator
Tue, Nov 14 ’06 at 7:30AM PST â€¢ Submitted by markstewart Network
I often have to do router configuration via a console port, so I use a Keyspan Serial Adapter to get access. Two problems then present themselves:
1. ZTerm is a horrible Mac OS X app. It hasn’t been updated in five years or so, and isn’t a Universal Binary. The developer doesn’t seem in any hurry to rectify the situation. It is not worth the shareware fee in its current form.
2. Minicom requires installation of Fink or MacPorts and is overly complex.
Solution: Use screen, Terminal, and a little AppleScripting.
First, launch Script Editor and type/paste in the following code:
tell application “Terminal”
do script with command “screen /dev/tty.KeySerial1”
set number of rows of window 1 to 100
set number of columns of window 1 to 80
set background color of window 1 to “black”
set normal text color of window 1 to “green”
set custom title of window 1 to “SerialOut”
Compile and save as an app from within Script Editor, and you have a double-clickable application to launch a serial Terminal session. You may want to customize this slightly — you can change the screen colors or number of columns or rows. You may also need to customize the screen command with a different device name if you are using something other than the Keyspan Serial Adapter (do an ls tty* of the /dev/ directory to get the right name).
screen uses Control-A to take commands directed to it. So type Control-A followed by Control- to exit your screen session. If you fail to do this and exit a Terminal session, you’ll leave the screen session alive and the serial resource unavailable until you kill the screen session manually. man screen will show you further commands to send to a screen session.
If anyone can reply with a link to a tutorial on how to wrap an interactive Unix App in Cocoa, that would be the next step — it would be nice to do this without involving Terminal. If you prefer to use Minicom, you could still use the AppleScript to wrap it into a nice launchable app — use this older hint to find the right command line commands.
Last year, Onan started making an improved starter motor for their 5000 and 7000 series two cylinder gensets. The new starter number is 191-2416. It’s a stronger starter with a beter Bendix drive than the original equipment. Last year I made the mistake of buying a $60.00 Chinese made after market starter for my Marquis 7000. BIG MISTAKE! I just replaced it, after less than 2 years service with that Chinese wonder. This time I elected to spend the extra money for the original Onan updated starter. Needless to say, it works much better. The after market starters just don’t have the oomph to turn over the two cylinder generators fast enough and they don’t last very long. There’s an outfit called Curtis Service Corporation, with an EBAY store, that sells original Onan parts at deep discount prices – best I’ve found. The original Onan starter cost me $106.85 with shipping. I’m sure if I had gone to Cummins I would have paid in excess of $200.00 for it. Sometimes it pays to buy the best!
Load the safari debug menu and tell the dumb site you’re IE 6 or something. This is a browser ID error not that Safari doesn’t support 128-bit encryption. Safari’s always supported it. Quit Safari, fire up terminal and paste the following line in:
defaults write com.apple.safari IncludeDebugMenu 1
Restart Safari , and you’ll have a Debug menu, in it you can change the User agent.