Mac OS X Lion, Rascal and nano

When using Terminal on OS X Lion to connect to the Rascal (e.g. ssh root@rascalNN.local), I noticed that nano was unreliable. For example when deleting a long line, the cursor sometimes jumps to the right leaving characters on the screen which do not match the nano buffer (which you can redisplay with Ctrl-L). This seems to be a common problem with Lion, not confined to Rascal, for example see this blog page. The problem seems to be that Lion has changed the default TERM setting from xterm-color to xterm256-color.

There are a number of ways to change your TERM setting but one of the simplest is to open Preferences from the Terminal menu, choose the Settings tab, click on the scheme you will be using (e.g. “Basic”) then click on the Advanced tab and change “Declare terminal as:” from xterm256-color to xterm-color. This setting gets carried over to Rascal when you use ssh and seems to make nano work as expected. If not, according to a nano FAQ, setting TERM to vt100 should always work!

First posted in the Rascal hardware and software forum.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s