Nano error opening terminal

nano error: Error opening terminal: xterm-256color - It seems like we have a problem with the terminal definition

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 of xterm-256color
export TERM=xterm
click below button to copy the code. By — nano tutorial — team
  • or the following terminal setting:
export TERMINFO=/etc/terminfo
export TERM=linux
click below button to copy the code. By — nano tutorial — team
  • Also, if we still have problem with nano try using vi which is a simple editor and doesn’t required much from the terminal
sudo vi /var/www/mutillidae/config.inc
click below button to copy the code. By — nano tutorial — team

Solution 2:

  • Code:
sudo apt-get install rxvt-unicode
nano ~/.bashrc
export TERM=rxvt-unicode
click below button to copy the code. By — nano tutorial — team
  • 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
sudo apt-get install ncurses-term
click below button to copy the code. By — nano tutorial — team

 nano error opening terminal

Learn nano — nano tutorial — nano error opening terminal — nano examples — nano programs

Содержание

  1. Ошибка при запуске консольного редактора NANO
  2. Error opening terminal when running IFL, TBIView, or OSD Tool Script from Linux Distribution
  3. Thread: Error opening terminal: xterm.
  4. Error opening terminal: xterm.
  5. Re: Error opening terminal: xterm.
  6. Re: Error opening terminal: xterm.
  7. Re: Error opening terminal: xterm.
  8. Re: Error opening terminal: xterm.
  9. Re: Error opening terminal: xterm.
  10. [Solved-5 Solutions] nano error: Error opening terminal: xterm-256color
  11. Error Description:
  12. Solution 1:
  13. Solution 2:
  14. Solution 3:
  15. Solution 4:
  16. Solution 5:
  17. Related Searches to nano error: Error opening terminal: xterm-256color
  18. Arch Linux
  19. #1 2010-04-08 04:52:01
  20. [solved] Error opening terminal: unknown.
  21. #2 2010-04-08 05:55:53
  22. Re: [solved] Error opening terminal: unknown.
  23. #3 2010-04-08 12:05:31
  24. Re: [solved] Error opening terminal: unknown.
  25. #4 2010-04-08 12:11:10
  26. Re: [solved] Error opening terminal: unknown.
  27. #5 2010-04-08 18:35:52
  28. Re: [solved] Error opening terminal: unknown.

Ошибка при запуске консольного редактора NANO

При попытке запуска редактора Nano выводится ошибка: Error opening terminal: Linux ( Linux — результат выполнения uname -s ). Я правильно понимаю, что это связано с виртуальными консолями ( tty ? ). В настоящее время пытаюсь разобраться с этими самыми tty. Помогите кто чем может 🙁

нет, не спасет. Система самосборная: имеется ядро, загрузчик, bash, минимум окружения, сеть

>Я правильно понимаю, что это связано с виртуальными консолями ( tty ? ).

Т.е. с кривыми руками

собирали с чем? ncurses или termcap ?
/usr/share/terminfo
должно содержать базу по терминалам

nano-2.2.5 собирался с опциями по-умолчанию из-под openSUSE 2.6.31.5-0.1: ./configure —prefix= затем make install DESTDIR=.

В новую систему ни ncurses ни termcap не интегрировались.

$ ldd `which nano`
linux-gate.so.1 => (0xb7712000)
libncursesw.so.5 => /lib/libncursesw.so.5 (0xb76a2000)
libc.so.6 => /lib/libc.so.6 (0xb7526000)
libdl.so.2 => /lib/libdl.so.2 (0xb7521000)
/lib/ld-linux.so.2 (0xb7713000)

для ncurses например

ncurses включает собственную базу termcap

$ strace -fv -o /tmp/strace.log nano
sylvia@allure:

$ cat /tmp/strace.log |grep open
27753 open(«/etc/ld.so.cache», O_RDONLY) = 3
27753 open(«/lib/libncursesw.so.5», O_RDONLY) = 3
27753 open(«/lib/libc.so.6», O_RDONLY) = 3
27753 open(«/lib/libdl.so.2», O_RDONLY) = 3
27753 open(«/usr/lib/locale/locale-archive», O_RDONLY|O_LARGEFILE) = 3
27753 open(«/etc/nanorc», O_RDONLY|O_LARGEFILE) = 3
27753 open(«/home/sylvia/.nanorc», O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
27753 open(«/etc/terminfo/x/xterm», O_RDONLY|O_LARGEFILE) = 3
27753 open(«/usr/lib/gconv/gconv-modules.cache», O_RDONLY) = -1 ENOENT (No such file or directory)
27753 open(«/usr/lib/gconv/gconv-modules», O_RDONLY) = 3

сами смотрите, была открыта база termcap /etc/terminfo/x/xterm

для консоли будет /etc/terminfo/l/linux

можно задавать тип терминала в переменной TERM

Источник

Error opening terminal when running IFL, TBIView, or OSD Tool Script from Linux Distribution

Important Note (updated 12/7/10):

The problem described below has been resolved, and can now be fixed by just updating to the latest version of the product in question (IFL, TBIView, OSD Tool Suite, etc.)

Problem:

Image for Linux (IFL), TBIView, or the OSD Tool Script will not run on a Linux distribution, producing an error message similar to the following:

Error opening terminal: linux

Note that depending on what type of terminal is in use, the terminal type in the error message may also be xterm, Eterm, rxvt, or any other terminal type being used. Also note that this problem will only occur when attempting to run IFL, TBIView, or the OSD Tool Script from a Linux distribution. It will not occur when running these programs from the IFL Boot Disk.

Cause:

Starting with the Debian «Squeeze» version of the Debian distribution, as well as some other Debian-based Linux distributions, several symlinks have been removed from the /usr/share/terminfo directory. This causes the affected programs to not be able to find the specific terminfo file they need to open a terminal (such as linux, xterm, Eterm, rxvt, dumb, etc.). This results in the error message shown above, and the affected programs will not be able to run.

Solution:

As root, create a new symlink by using the sequence of commands shown below for the specific terminal type shown in the error message. Note that there are 3 commands for each terminal type, and they should be executed in the order shown below.

1. For error message «Error opening terminal: linux»

mkdir -p /usr/share/terminfo/l

ln -s /lib/terminfo/l/linux linux

2. For error message «Error opening terminal: xterm»

mkdir -p /usr/share/terminfo/x

ln -s /lib/terminfo/x/xterm xterm

3. For error message «Error opening terminal: rxvt»

mkdir -p /usr/share/terminfo/r

ln -s /lib/terminfo/r/rxvt rxvt

4. For error message «Error opening terminal: dumb»

mkdir -p /usr/share/terminfo/d

ln -s /lib/terminfo/d/dumb dumb

5. For error message «Error opening terminal: Eterm»

mkdir -p /usr/share/terminfo/E

ln -s /lib/terminfo/E/Eterm Eterm

September 1, 2010 Updated: September 9, 2021

Источник

Thread: Error opening terminal: xterm.

Thread Tools
Display

Error opening terminal: xterm.

When i type «nano» into the terminal I receive the following message:
Error opening terminal: xterm.

Typing «top» will give this message:
‘xterm’: unknown terminal type.

Word wrap is not working when I push backspace on a multi-line command.

Ctrl+Alt+F6 -> commands work fine.
xterm works fine.
Have tried creating a new user but it has the same problem.
Tried what was suggested here but it doesn’t help.

Any other suggestions out there?

Re: Error opening terminal: xterm.

Not all that familiar with the Unity system, but in Systems > Settings > Preferences, which terminal is set as preferred?

Re: Error opening terminal: xterm.

Just adding to the list of symptoms. When typing «man » The following message will be shown «WARNING: terminal is not fully functional»

I found this command to find out which terminal is preferred:
-ubuntu:

$ gsettings get org.gnome.desktop.default-applications.terminal exec
‘x-terminal-emulator’

Edit: I just changed it to xterm and was about to say I’m happy with that. but It’s hard to copy and paste things to xterm

Last edited by philip10; April 12th, 2015 at 01:45 AM .

Re: Error opening terminal: xterm.

Try my favorite: the Xfce terminal. Copy-paste is easy, lot of customizing options.

Re: Error opening terminal: xterm.

I installed and opened xfce terminal
sudo apt-get install xfce4-terminal

xfce4-terminal
Failed to connect to session manager: Failed to connect to the session manager: SESSION_MANAGER environment variable not defined

xfce4-terminal still opens up but it suffers from the same problems as x-terminal-emulator

Re: Error opening terminal: xterm.

Could you open a terminal run these commands, and post back the results (you can copy/paste the text)?

Источник

[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 of xterm-256color
click below button to copy the code. By — nano tutorial — team
  • or the following terminal setting:
click below button to copy the code. By — nano tutorial — team
  • Also, if we still have problem with nano try using vi which is a simple editor and doesn’t required much from the terminal
click below button to copy the code. By — nano tutorial — team

Solution 2:

click below button to copy the code. By — nano tutorial — team
  • 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
click below button to copy the code. By — nano tutorial — team

Learn nano — nano tutorial — nano error opening terminal — nano examples — nano programs

World’s No 1 Animated self learning Website with Informative tutorials explaining the code and the choices behind it all.

Источник

Arch Linux

You are not logged in.

#1 2010-04-08 04:52:01

[solved] Error opening terminal: unknown.

What’s going on here? I’ve updated my system a few times, but that’s it. My headless server is doing this too.

Last edited by synthead (2010-04-08 20:35:12)

#2 2010-04-08 05:55:53

Re: [solved] Error opening terminal: unknown.

what $TERM are you trying to run htop in?

Edit:
I’ve got to sleep but here are some ideas that occur to me (htop is working fine on my box), but maybe:

1) TERM isn’t set or is set to term type that htop can’t deal with, htop should be able to deal with «TERM=xterm», also I know it handles «linux» and «screen.linux», because I just started htop in each of those settings.

2) Permissions on the /dev if you’re trying to run htop from a tty, various problems with allocating terminals can occur if something screwy happens, like you mount / read-only, is / mounted read-only?

Last edited by pseudonomous (2010-04-08 06:02:16)

#3 2010-04-08 12:05:31

Re: [solved] Error opening terminal: unknown.

This is from XFCE’s terminal. If I run xterm and run htop out of it, it works. htop isn’t the only app that is complaining about the terminal right now though

Last edited by synthead (2010-04-08 12:05:58)

#4 2010-04-08 12:11:10

Re: [solved] Error opening terminal: unknown.

in /etc/profile
(install xterm again)

logout , login and try again . hmm

#5 2010-04-08 18:35:52

Re: [solved] Error opening terminal: unknown.

It looks like your «TERM» environment variable isn’t getting set, since it’s getting set when you run xterm, it may be a configuration issue with xfce-terminal, xfce-terminal probably has a configuration option to identify as certain terminal type, you should probably set it to «xterm».

Otherwise, you can manually set TERM in

/.bashrc or /etc/bash.bashrc but this might cause you problems if you vt switch and run programs from the console.

Edit, also, you should do this in xfce-terminal and make sure things work afterwards:

Last edited by pseudonomous (2010-04-08 18:37:20)

Источник

Looks like no one’s replied in a while. To start the conversation again, simply

ask a new question.

Hi,

I have installed OSx Lion 10.7, on MacBook Air, now when i try to use nano, i get that error

$ nano Error opening terminal: xterm-256color.

Also when try to use less

less a

WARNING: terminal is not fully functional

If i change terminal preferences from «xterm-256corlor» to «xterm-color» these issues go away,

but that also means my terminal will not support 256 color, so, any ideas of what is going on?

Bests regards,

Jose

XCode-OTHER,

Mac OS X (10.6.7)

Posted on Jul 21, 2011 7:48 AM

20 replies

Jul 21, 2011 5:09 PM in response to JoseGutierrez

I had the same issue and fixed it by copying /usr/share/terminfo from a working install of OSX Lion and replacing the 256colorless version.

Jul 21, 2011 11:19 PM in response to jhulme

Thanks, jhulme!

I had the same issue, fixed by copying /usr/share/terminfo from a friend’s Lion machine (an upgrade from Snow Leopard) to my stock Lion MacBook Air.

Jul 23, 2011 5:25 PM in response to dmpatierno

i have this problem too…but no friends with lion! please can you share your terminfo? thanks a lot

Jul 23, 2011 6:09 PM in response to Luca.IT

Link to terminfo: http://www.sendspace.com/file/hc2dus

If you would rather grab the files from the Lion installer:

1. Download Lion Installer from the App Store

2. Download unpkg: http://www.macupdate.com/app/mac/16357/unpkg

3. Open Lion Installer app in Finder (Right click -> Show Package Contents)

4. Open InstallESD.dmg (under SharedSupport)

5. Unpack BSD.pkg with unpkg (Located under Packages)

Term info will be located in the new BSD folder in /usr/share/terminfo

Jul 23, 2011 6:15 PM in response to JoseGutierrez

Another option is to just switch to «xterm-color» in Terminal preferences.

Jul 24, 2011 5:29 AM in response to Luca.IT

after a reboot i always have to manually replace the folder..do you have that problem?

Jul 24, 2011 7:52 AM in response to jhulme

It appears I haven’t rebooted my macbook since Lion came out 😝

Try running chmod 555 /usr/share/terminfo

This has fixed it for me.

Jul 27, 2011 3:50 PM in response to jhulme

Hi,

That suggestion is great, but now, I cannot change my Terminal preferences. Any of the changes I make do not seem to have any effect. I want to get rid of the Grass c/s, but cannot no matter what I do. Is there a way to reset the terminal to the default?

Jul 27, 2011 4:52 PM in response to Jason Watkins

sudo chmod 644 /usr/share/terminfo

Should allow edits; if not use sudo chmod +rw /usr/share/terminfo

Jul 28, 2011 8:00 AM in response to jhulme

I tried that. No joy. I wound-up doing a Time machine restore of my OS from a previous backup.

Thanks

Jul 28, 2011 8:09 AM in response to Jason Watkins

…or a restore of the folder you replaced, and not the entire os…

btw, i had no problem with the trick.

hope apple would repair this problem in next updates.

Jul 28, 2011 8:21 AM in response to Luca.IT

Didn’t have that option. OS X 10.7 hides all of those directories and they were not visible in Time Machine.

May 11, 2012 1:25 AM in response to JoseGutierrez

My solution was to find the terminfo file for xterm-color:

ls -lR /usr/share/terminfo

For me it was in subdirectory 78. Then duplicate it with a new name:

cd /usr/share/terminfo/78

sudo cp -p xterm-color xterm-256color

Cheers

Dave

nano Error opening terminal: xterm-256color.

  • Home
  • Forum
  • The Ubuntu Forum Community
  • Ubuntu Official Flavours Support
  • Desktop Environments
  • [SOLVED] Error opening terminal: xterm.

  1. Unhappy Error opening terminal: xterm.

    Using Ubuntu 14.04

    When i type «nano» into the terminal I receive the following message:
    Error opening terminal: xterm.

    Typing «top» will give this message:
    ‘xterm’: unknown terminal type.

    Word wrap is not working when I push backspace on a multi-line command.

    Ctrl+Alt+F6 -> commands work fine.
    xterm works fine.
    Have tried creating a new user but it has the same problem.
    Tried what was suggested here but it doesn’t help.

    Any other suggestions out there?


  2. Re: Error opening terminal: xterm.

    Not all that familiar with the Unity system, but in Systems > Settings > Preferences, which terminal is set as preferred?


  3. Re: Error opening terminal: xterm.

    Just adding to the list of symptoms. When typing «man <something>» The following message will be shown «WARNING: terminal is not fully functional»

    I found this command to find out which terminal is preferred:
    -ubuntu:~$ gsettings get org.gnome.desktop.default-applications.terminal exec
    ‘x-terminal-emulator’

    Edit: I just changed it to xterm and was about to say I’m happy with that. but It’s hard to copy and paste things to xterm

    Last edited by philip10; April 12th, 2015 at 01:45 AM.


  4. Re: Error opening terminal: xterm.

    Try my favorite: the Xfce terminal. Copy-paste is easy, lot of customizing options.


  5. Re: Error opening terminal: xterm.

    I installed and opened xfce terminal
    sudo apt-get install xfce4-terminal

    xfce4-terminal
    Failed to connect to session manager: Failed to connect to the session manager: SESSION_MANAGER environment variable not defined

    echo $SESSION_MANAGER
    <blankline>

    xfce4-terminal still opens up but it suffers from the same problems as x-terminal-emulator


  6. Re: Error opening terminal: xterm.

    Hi philip10.

    Could you open a terminal run these commands, and post back the results (you can copy/paste the text)?

    Code:

    ls ~/.bash_logout ~/.bashrc ~/.profile
    
    diff /etc/skel/.bashrc ~/.bashrc
    
    diff /etc/skel/.profile ~/.profile

    Regards.


  7. Re: Error opening terminal: xterm.

    ls ~/.bash_logout ~/.bashrc ~/.profile

    Code:

    /home/philip/.bash_logout  /home/philip/.bashrc  /home/philip/.profile

    diff /etc/skel/.bashrc ~/.bashrc
    diff /etc/skel/.profile ~/.profile


  8. Re: Error opening terminal: xterm.

    Ok I have almost figured this out.

    Code:

    sudo apt-get install rxvt-unicode
    export TERM=rxvt-unicode

    From there on everything works perfectly. My only problem now is that i have to set TERM all the time. How can i set it permanently to rxvt-unicode using either gnome-terminal or xfce4-terminal? … or any other terminal that supports copy n paste

    Last edited by philip10; April 29th, 2015 at 11:23 AM.


  9. Re: Error opening terminal: xterm.

    Ok completely figured it out now.

    Code:

    sudo apt-get install rxvt-unicode
    nano ~/.bashrc
    export TERM=rxvt-unicode

    Now you should be able to run x-terminal-emulator or gnome-terminal-emulator and everything should work fine.

    I’m not sure if this is just me but if you press ctrl+alt+T and are confronted with the wrong terminal, just open system settings -> keyboard -> shortcuts -> create a custom shortcut with your preferred terminal on ctrl+alt+t. This will override the system shortcut.

    Last edited by philip10; May 26th, 2015 at 10:04 AM.


Tags for this Thread

Bookmarks

Bookmarks


Posting Permissions

Что делать, если во время запуска консольной команды, например, htop или nano, вместо запуска происходит ошибка?

Error opening terminal: xterm-256color

Решается элементарно! Перед запуском команды выполните:

export TERM=xterm


Post Views:
1 560

Читайте также

  • Что делать с Error opening terminal: unknown?

    В некоторых docker-контейнерах при запуске консольных приложений, вместо программы может отобразиться ошибка:

  • Error getting container from driver devicemapper: Error mounting: device or resource busy

    Что делать, если во время старта docker-контейнера появляется ошибка вроде такой?

  • cURL error 60: SSL certificate : self signed certificate in certificate chain

    При работе с curl не только в php может возникнуть подобная проблема: cURL error 60: SSL certificate : self signed…

Добавить комментарий

Ваш e-mail не будет опубликован. Обязательные поля помечены *

Name *

Email *

Website

Сохранить моё имя, email и адрес сайта в этом браузере для последующих моих комментариев.

What’s on your mind?

Related Posts

PHP Composer как предотвратить создание symlink на локальные файлы

Всем известно, что Composer позволяет выкачивать зависимости не только с packagist и различных git-хостингов, но и просто из локальной директории. Но в таком случае существует несколько способов, как именно файлы попадут в директорию vendor. По-умолчанию Read more

Как в Linux консоли добавить в файл сразу несколько строк

Тоже распространённая задача — вставить в файл из консоли сразу несколько строк. Но есть нюанс, в зависимости от выбора способа вставки командный интерпретатор будет, пытаться заменить переменные на их значения, или нет. Т.е. если в Read more

Примеры команды sed для работы со строками файлов

Sed умеет очень круто обрабатывать файлы. Давайте рассмотрим несколько примеров. Например, нужно вставить новую строку в файл после определённой линии: sed ‘3 a new line content’ my.txt Данная команда добавит новую строку в файл my.txt Read more

Понравилась статья? Поделить с друзьями:
  • Nand read error
  • Naps2 scan wia native wiaexception wia error code 80070057
  • Nan javascript как исправить
  • Naps2 scan wia native wiaexception wia error code 80004005
  • Naps2 scan exceptions scandriverunknownexception ошибка драйвера сканирования