A guide to help set up Terminal
Aug 28, '06 07:30:02AM
Contributed by: mietek
Note that this guide assumes you're using the bash shell. This guide will address a few Terminal setup questions:
- How do I get the backspace and forward delete keys to work correctly?
- How do I get UTF–8 input to work correctly?
- How do I get UTF–8 input to, you know, work correctly?
- How do I get UTF–8 input to work correctly in irssi running under screen over a ssh connection?
- How do I modify the default ANSI colors?
Read on for the answers to those questions...
How do I get the backspace and forward delete keys to work correctly?
- In the Keyboard section of the Terminal Inspector (Command-I in Terminal):
- Turn on the Delete key sends backspace option.
- Map the forward delete key to the following string: \033[3~
- Add the following line to your .profile: stty erase ^H. Since ^H is a non–printable control character, the easiest way to do this is to execute the following command: echo -e "stty erase ^H" >> ~/.profile. Type the ^H by pressing Control–V and Control–H.
- Add the following line to your .inputrc: "\e[3~": delete-char
- Apply changes by doing a source ~/.profile and a source ~/.inputrc.
How do I get UTF–8 input to work correctly?
How do I get UTF–8 input to, you know, work correctly?
There's an odd bug in the version of bash included with Mac OS X 10.4 that manifests itself as the LC_CTYPE enviroment variable not being set properly by export directives in .profile files. The workaround involves using the little–known environment.plist file. Thanks to Allan Odgaard for the tip!
How do I get UTF–8 input to work correctly in irssi running under screen over a ssh connection?
You're a tricky one, aren't you?
- Copy the relevant parts of your .profile and .inputrc to the remote host.
- Start screen with the -U option.
- In irssi 0.8.9 and older, set term_type to utf-8. In newer versions, set term_charset to utf-8.
After detaching, remember to reattach also using the -U option. This can be a bit tough if you're as used to typing screen -r as I am, so I suggest creating an alias. sru works well.
How do I modify the default ANSI colors?
Use Mike Solomon's TerminalColors utility.
An always up–to–date version of this guide can be found here: Setting up the Mac OS X 10.4 Terminal.app
Comments (20)
Mac OS X Hints
http://hints.macworld.com/article.php?story=20060825071728278