[Solved-5 Solutions] nano error: Error opening terminal: xterm-256color
Error Description:
nano error: Error opening terminal: xterm-256color
Solution 1:
- It seems like we have a problem with the terminal definition.
- Try using
xterm
instead ofxterm-256color
- or the following terminal setting:
- Also, if we still have problem with
nano
try usingvi
which is a simple editor and doesn't required much from the terminal
Solution 2:
- Code:
- Now we should be able to run x-terminal-emulator or gnome-terminal-emulator and everything should work fine.
- we are not sure if this is just me but if we press ctrl+alt+T and are confronted with the wrong terminal, just open system settings -> keyboard -> shortcuts -> create a custom shortcut with our preferred terminal on ctrl+alt+t. This will override the system shortcut.
Solution 3:
- After upgrading to OSX Lion, we started getting this error on certain (Debian/Ubuntu) servers.
- The fix is simply to install the “ncurses-term” package which provides the file /usr/share/terminfo/x/xterm-256color.
- This worked for us on a Ubuntu server
Solution 4:
- The problem can be solved in this way:
- Download Lion Installer from the App Store
- Download unpkg:
- Open Lion Installer app in Finder (Right click -> Show Package Contents)
- Open InstallESD.dmg (under SharedSupport)
- Unpack BSD.pkg with unpkg (Located under Packages) Term info will be located in the new BSD folder in /usr/share/terminfo
Solution 5:
- We can confirm this is a terminfo issue. This is what worked for us.
- SSH in to the remote machine and run
Learn nano - nano tutorial - nano error opening terminal - nano examples - nano programs