- 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?
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.
- In the Terminal Inspector:
- In the Emulation section, turn off the Escape non-ASCII characters option.
- In the Display section, choose Unicode (UTF-8) as the Character Set Encoding.
- Add the following line to your .profile: export LC_CTYPE=en_US.UTF-8
- Add the following lines to your .inputrc:
set meta-flag on set input-meta on set output-meta on set convert-meta off - Apply changes by doing a source ~/.profile and a source ~/.inputrc.
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!
- Add a LC_CTYPE key with the value en_US.UTF-8 to the root dictionary of the ~/.MacOSX/environment.plist file. Assuming that you don't have that file, the easiest way to do this is to execute the following command:
You could also use Property List Editor.app.echo "{ LC_CTYPE = \"en_US.UTF-8\"; }" > ~/.MacOSX/environment.plist - Apply changes by logging out and back in.
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.
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

