Search code examples
ubuntuterminalvixtermnano

Error opening terminal: xterm-256color


When I try to nano something on my server I'm getting this error "Error opening terminal: xterm-256color." that I've never seen before, and on top of that nano used to work fine last week. Even when I use vi, the file will open but I can't manipulate using normal vi commands. When I press i to activate insert mode and then try to navigate the document, it just types an A or B or something.

The only thing that changed is I lost my private key and had to generate a new one, so I had to upload the new public key to my server. Anyone know why this is happening?

The server is running Ubuntu 8.04 Hardy.


SOLUTION

Open Terminal, select from the menu Terminal > Preferences > Settings > Advanced and under Emulation select "Declare terminal as: xterm-color not xterm-256color"

Reference: http://ricochen.wordpress.com/2011/07/23/mac-os-x-lion-terminal-color-remote-access-problem-fix/


Solution

  • Probably due to a Lion upgrade/install. Did you do that recently @Gih?

    Possible duplicate (with fix) at nano error: Error opening terminal: xterm-256color

    EDIT:

    Easiest fix (takes 10 seconds)...from Michael:

    There is a solution much easier: http://ricochen.wordpress.com/2011/07/23/mac-os-x-lion-terminal-color-remote-access-problem-fix/