Wednesday, June 27, 2007

Getting more out of the Terminal in mac os X

I like to have specific terminal settings for my remote machines. Here are the steps I take in getting a nice, easy-to-use window for remote machines:

- First of all, open a new terminal window
- Control-click in the window, and select 'Window Settings'
- Select 'Processes' and click on 'Never' for prompt before closing a window.
- Select 'Color' and change the color you like -- I prefer a unique color for each remote machine, and I try to pick light colors, so that black text shows up well.
- Optionally, set the transparency. I like to use about 90% transparency. That way, I can see through my stack of terminal windows to find what is underneath.
- If you haven't already done so, go to the 'Display' window, and at the very least select 'anti-aliasing' for the fonts. Also, select a nice mono-spaced font. Monaco is fine, but there are other good ones. I usually set the fonts and transparency beforehand and save this as the default for all windows.

Now, you are ready to save this setup. Close the Terminal Inspector, and hit 'Save As..' in the File menu. Pick a name, the name of your machine probably, and then in the dialog below, click on Execute this command, and uncheck 'Execute command in a shell'. The command I use is something like this:

ssh -Y machine.tamu.edu

The -Y flag turns on X11 forwarding. You could also set any other ssh options here, like a cypher, or whatever.

Now you can open this window right away from the Terminal File -> Library menu. Or, even better, you can use quicksiler to open these term files. Just start typing the name of the host, and it will pop up as host.term.