Error opening terminal linux

Important Note (updated 12/7/10):

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

cd /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

cd /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

cd /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

cd /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

cd /usr/share/terminfo/E

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

Was This Article Helpful?


0

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

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

Error opening terminal: xterm-256color

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

export TERM=xterm


Post Views:
1 527

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

  • Что делать с 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

  • 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

The solution to make Menuconfig is to prompt “Error opening terminal: xterm.

Under Linux environment, make menuconfig or make config commands are used when compiling embedded systems. These commands usually use the ncurses library. If the ncurses library is not installed and set correctly, the following Error message may appear:
Error opening terminal: xterm

Solutions:

1. First make sure that the ncurses library is installed correctly. On debian, Ubuntu, you can use dpkg-l | grep ncurses to see if the ncurses library is installed.
2. If ncurses is already installed, check to see if the TERM and TERMINFO environment variables have been set correctly. If it is not set correctly, you need to set it to the correct value.
$ echo $TERM
$ echo $TERMINFO

For TERMINFO, the path to TERMINFO should be set, such as /usr/share/ TERMINFO or /lib/ TERMINFO. To view Terminfo's storage location with the following instruction:

$whereis terminfo
terminfo: /etc/terminfo /lib/terminfo /usr/share/terminfo /usr/share/man/man5/terminfo.5.gz

See if the terminal information file is saved in the Terminfo directory: It is usually divided into A, B, C, D... Z these alphabetic directories, each containing term information beginning with that letter. For example, vT100 is placed in the "V" directory. The term we need must have the term information in the corresponding directory. Once you have identified this information, you can set the TERM and TERMINFO information:

export TERM=xterm
export TERMINFO=/lib/terminfo

The Settings above, must ensure that the/usr/share/terminfo term existing in the information, and/usr/share/terminfo/v/vt100 exists.
Regarding the setting of terms, it may need to be set to different terms such as Linux, VT100-putty, etc. Linux is commonly used for the Linux console, and vT100-putty is, as the name implies, a VT100 terminal that USES PuTTY to log in remotely.
The following are the values of the TERM and TERMINFO environment variables in the Ubuntu12.10 environment after the problem is resolved.

$ echo $TERM
xterm
$ echo $TERMINFO
/lib/terminfo/

  • Index
  • » Applications & Desktop Environments
  • » [solved] Error opening terminal: unknown.

Pages: 1

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

synthead
Member
Registered: 2006-05-09
Posts: 1,334

[solved] Error opening terminal: unknown.

[max@gayforceone jornadalin]$ htop
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

pseudonomous
Member
Registered: 2008-04-23
Posts: 349

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

synthead
Member
Registered: 2006-05-09
Posts: 1,334

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 hmm

Example:

:: Starting full system upgrade...
resolving dependencies...
looking for inter-conflicts...

Targets (9): dbus-python-0.83.1-1  feh-1.4.2-2  grep-2.6.3-1  jack-0.118.0-2  
             libmodplug-0.8.8-1  pixman-0.18.0-1  vte-0.24.0-2  
             xorg-xinit-1.2.1-1  youtube-dl-2010.04.04-1  

Total Download Size:    1.33 MB
Total Installed Size:   7.99 MB

Proceed with installation? [Y/n] 
:: Retrieving packages from core...
 grep-2.6.3-1-i686.p...   135.6K  371.0K/s 00:00:00 [#####################] 100%
:: Retrieving packages from extra...
 dbus-python-0.83.1-...   107.0K  338.0K/s 00:00:00 [#####################] 100%
 feh-1.4.2-2-i686.pk...   218.6K  454.7K/s 00:00:00 [#####################] 100%
 jack-0.118.0-2-i686...   239.8K  501.0K/s 00:00:00 [#####################] 100%
 libmodplug-0.8.8-1-...   150.5K  389.9K/s 00:00:00 [#####################] 100%
 pixman-0.18.0-1-i68...   140.1K  364.3K/s 00:00:00 [#####################] 100%
 vte-0.24.0-2-i686.p...   344.4K  609.4K/s 00:00:01 [#####################] 100%
 xorg-xinit-1.2.1-1-...    13.5K  160.7K/s 00:00:00 [#####################] 100%
:: Retrieving packages from community...
 youtube-dl-2010.04....    14.6K  161.7K/s 00:00:00 [#####################] 100%
checking package integrity...
(9/9) checking for file conflicts                   [#####################] 100%
(1/9) upgrading dbus-python                         [#####################] 100%
(2/9) upgrading feh                                 [#####################] 100%
(3/9) upgrading grep                                [#####################] 100%
(4/9) upgrading jack                                [#####################] 100%
(5/9) upgrading libmodplug                          [#####################] 100%
(6/9) upgrading pixman                              [#####################] 100%
(7/9) upgrading vte                                 [#####################] 100%
(8/9) upgrading xorg-xinit                          [#####################] 100%
(9/9) upgrading youtube-dl                          [#####################] 100%
tput: No value for $TERM and no -T specified
[max@gayforceone ~]$

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

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

flamelab
Member
From: Athens, Hellas (Greece)
Registered: 2007-12-26
Posts: 2,160

Re: [solved] Error opening terminal: unknown.

export TERM=xterm

in /etc/profile
(install xterm again)

logout , login and try again … hmm

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

pseudonomous
Member
Registered: 2008-04-23
Posts: 349

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)

#6 2010-04-08 18:47:03

Leonid.I
Member
From: Aethyr
Registered: 2009-03-22
Posts: 999

Re: [solved] Error opening terminal: unknown.

OK, here is the deal.
When I run xfce my $TERM is set to xterm, but when I am in console, it is set to linux. Since we all use bash, I presume, it is logical to look for these variables in /etc/{profile,bash.bashrc,probile.bash,…}, but none of them actually sets the TERM variable.

So, is it hardwired in tty/xterm? I mean, putting $TERM by hand into /etc/profile is merely a workaround…

L.

Last edited by Leonid.I (2010-04-08 18:47:32)


Arch Linux is more than just GNU/Linux — it’s an adventure
pkill -9 systemd

#7 2010-04-08 20:27:29

Leonid.I
Member
From: Aethyr
Registered: 2009-03-22
Posts: 999

Re: [solved] Error opening terminal: unknown.

Sorry, you guys can scratch my previous post mad

@pseudonomous, you were right, $TERM is set by running xterm. It can also be modified by xterm -tn «name»… The issue seems to be indeed due to misconfig of xfce-terminal.

@synthead, what does your Preferences>Advanced>$TERM setting say? Mine says xterm


Arch Linux is more than just GNU/Linux — it’s an adventure
pkill -9 systemd

#8 2010-04-08 20:34:55

synthead
Member
Registered: 2006-05-09
Posts: 1,334

Re: [solved] Error opening terminal: unknown.

Leonid.I wrote:

Sorry, you guys can scratch my previous post mad

@pseudonomous, you were right, $TERM is set by running xterm. It can also be modified by xterm -tn «name»… The issue seems to be indeed due to misconfig of xfce-terminal.

@synthead, what does your Preferences>Advanced>$TERM setting say? Mine says xterm

Very interesting, my TERM variable was not set in the Preferences.  I’m not exactly sure what happened because I never changed it.  Maybe old configs were incompatible, I don’t know.  But I clicked «Reset compatibility settings to defaults,» xterm popped into the field, and all is well now.  Thank you!

Понравилась статья? Поделить с друзьями:
  • Error opening spice console spiceclientgtk missing debian
  • Error opening specified endpoint udp 161
  • Error opening socket 10013
  • Error opening serial port com3 port busy
  • Error opening serial port already used by serial console 6