IT Connect
Your connection to information technology at the UW

Download OS X Terminal Scripts

Get Software

Terminal Scripts for OS X are a set of “scripts” that invoke the Terminal and ssh programs distributed with OS X.

About These Scripts

NOTE: Starting with OS X 10.3 (Panther), the Terminal program supports a variety of terminal emulations. Unfortunately, the default (xterm color) is not likely to work on many systems, including most of the UW central systems. You MUST change this default. Run Terminal (e.g., from Applications->Utilities) and use Terminal->Preferences to bring up the preferences panel. From the pop-up list next to “Declare terminal type as:” select “vt102” (or vt100).

To connect with ssh, open the OS X “Terminal” app and type in the command “ssh YourUWNetID@UWHost”. For example, if YOUR UW NetID were “myuwnetID” and you wanted to connect to homer, you’d enter “ssh”. If you have used your UW NetID as your OS X login ID then the ID can be omitted. Using “ssh -2” uses v2 of ssh instead of v1, for those hosts that permit (or require) it.

Printing directly from Pine may work if you are using Terminal version 1.5.1 (OS X 10.4.11) or BEFORE, but appears to be broken in the current version (as of this writing, 2.0.1 with OS X 10.5.4), but will only go to the current default printer.

Applescripts for Terminal

Starting with OS X 10.2 (aka Jaguar), this can be made a little easier with some fairly simple AppleScripts (thanks to David Linker and Scott King for inspiration – and more 🙂 ). Find some examples here in the same folder with this document, in both “runable” and “editable” (-Template) forms. Double-clicking the “Template” versions should run the AppleScript Editor to let you modify the script. Double-click the “regular” copy (without the “-Template” name) to run the script.

Terminal to UW Hosts

This is the most general (and complicated), it prompts for UW NetID and then for a selection from a list of known hosts. You can change the list of hosts by editing the script. Probably best in a “lab” where many people connect to many different hosts. The example list is {Dante, Homer, Other(prompt me)}.

Terminal to Vergil (or Homer or Shell)

It is easy to make “clickable” icons that open a connection to a given host, after prompting for the UW NetID.

Terminal to MyUWHost

Lastly, you can include everything in the script, so when you double-click it it just connects (and asks for a password, of course). This example, MUST be edited. To use it use the Script Editor to put in your NetID and desired host before use.

Keynes Terminal Window

This one is a little different, it is a file of saved settings for the Terminal application.

The behavior of saved “term” files is somewhat different in OS X 10.5 from previous versions.

Keynes With OS X 10.5.2 (and presumably above)

The Terminal program allows you to keep a “library” of settings, then open sessions using any of those. To add the Keynes settings to your library:

  1. StepsActions
  2. Copy the “Keynes Window.terminal” (be sure to use the “.terminal” file, not “.term”) file to your Documents folder from the “Terminal Scripts” folder.
  3. Run Applications -> Utilities -> Terminal.
  4. Select Terminal -> Preferences.
  5. At the bottom of the list of settings profiles find the “gear” button and select it to expose a list of options, select “import” from the list.
  6. If necessary, navigate to your Documents folder (it may already be pointing there), locate and open the “Keynes Window.terminal” file you copied there in step 1.  A new “Keynes Window” profile is added to your list. You may make it your default profile if you use Terminal mostly (or only) for connections to Keynes, but it is usually not recommended.
  7. Close prefs, quit Terminal.
  8. Run Terminal again (you may want Terminal in your Dock…), if the Keynes settings are your default, a login window to Keynes appears.
  9. Otherwise (recommended) use Shell -> New Window -> Keynes Window.

Now that you have a separate profile for Keynes connections you can easily edit the preferences in that profile, choose font type and size, colors, etc. as you prefer. If the “Enter” key is not working to “send a screen”, use “control J” instead. If using a laptop, remember that you may have to use the “fn” key to stroke “Enter” (as fn+return).

Keynes With OS 10.3 – 10.4

When you double-click the “Keynes.term” file a Terminal window will open, and open a connection to, that window will have the settings that SOME users are reporting allows them to connect to the Keynes (Administrative) system. The “Enter” (far right of the keypad) key should now work to “send screens” in Keynes apps.

Using Mac OS X Terminal With Keynes

The keypad digits will likely NOT work, use the top-row digit keys instead. Note that having the setting in Terminal for “strict vt100 keypad behavior” on is the essential setting for this. Note that if using the keypad for numeric entry is STRICTLY required, you may be able to get that working by turning the “strict” behavior off and entering the “Enter” keystroke with “control J”. Printing that works via “ansi print escape” (much of the student data base system) will NOT work correctly though the screens CAN be captured (and then printed) using the “Grab” utility.

NEW with OS X 10.3 are some problems with lots of “inverse video” being drawn on the Keynes screens, just pressing “Enter” without entering any data, may clear the screen some. There are reports that the old MacSSH program (run under “Classic”) in OS X DOES work with newer versions of OS X (10.2.6 – 10.4.x). This may be a better solution for Keynes users, however since “Classic” is not supported on Macs using “Intel” hardware or with system 10.5 and above, it isn’t going to work in those cases. Printing, after setting up a default printer WITHIN Classic, should also work using MacSSH.

Other Uses for “.term” Files

NOTE: This no longer seems to work as described below in OS X 10.5.  It may still be of interest to those running older systems. You can create multiple profiles within Terminal and associate a startup command with each profile (settings -> shell).

All the settings in the Terminal Window Settings are preserved in a “.term” file created with the File->Save as command, you can adjust font choice and size, colors, transparency, etc. You can also (perhaps too easily…) make these choices effect the DEFAULT setup for Terminal, so use this with some caution.

You can also directly edit the .term file, for example by using TextEdit, and this gives you access to some things that the Windows Settings dialogs won’t, specifically you can edit the “Execution String”. Find the lines



On the second line, insert whatever command you want executed every time you open this .term file between the “<string>” and “</string>” statements. For example, to make a connection to homer automatically you could put

<string>ssh -2</string>

in THAT place, instead of using the script above, this would also then let you control font, color, etc. and still have a “double-clickable” file/icon for the homer terminal.