Error opening terminal rxvt unicode

well the problem is what the subject says .. Urxvt doesn't seem to handle nano on secure shell.

#1 2012-06-04 09:05:25

nos09
Member
Registered: 2011-09-09
Posts: 107

[SOLVED] Urxvt cant handle nano on ssh

well the problem is what the subject says .. Urxvt doesn’t seem to handle nano on secure shell.

I use ssh to login in my virtual machine to practice on that machine. I use nano to edit files, but since it’s not working I tried to do that using vi/vim but that leads to another weird problem .. i cant move the pointer to the previous line — ‘ I am only allowed to go downwards !!’ .. anyway i tried the same thing with aterm — and it works just fine (with nano and vi both).

here is the output of that error when input nano in terminal : Error opening terminal: rxvt-unicode-256color.

anybody have idea what’s causing the problem ?

p.s the nano and vi works fine in the same terminal locally.

Last edited by nos09 (2012-06-04 20:21:46)

#2 2012-06-04 09:11:37

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: [SOLVED] Urxvt cant handle nano on ssh

Install urxvt in the virtual machine.

#3 2012-06-04 16:10:01

xartii
Member
Registered: 2012-01-18
Posts: 19

Re: [SOLVED] Urxvt cant handle nano on ssh

You can also add «TERM=rxvt» in your .bashrc (without » » , located in your home directory) on a client machine. It should also solve the problem.

#4 2012-06-04 16:20:53

thestinger
Package Maintainer (PM)
From: Toronto, Canada
Registered: 2010-01-23
Posts: 478

Re: [SOLVED] Urxvt cant handle nano on ssh

xartii wrote:

You can also add «TERM=rxvt» in your .bashrc (without » » , located in your home directory) on a client machine. It should also solve the problem.

That’s not really a solution, that terminfo has the wrong control codes. The correct solution is to either install urxvt in the virtual machine, or just the terminfo. The terminfo can be installed locally to your $HOME too, so it works for machines you don’t have root access on.

Last edited by thestinger (2012-06-04 16:22:05)

#5 2012-06-04 16:42:39

doug piston
Member
From: Seattle
Registered: 2011-09-11
Posts: 387
Website

Re: [SOLVED] Urxvt cant handle nano on ssh

#6 2012-06-04 17:37:02

nos09
Member
Registered: 2011-09-09
Posts: 107

Re: [SOLVED] Urxvt cant handle nano on ssh

thanks to you both !

#7 2012-06-04 19:44:55

doug piston
Member
From: Seattle
Registered: 2011-09-11
Posts: 387
Website

Re: [SOLVED] Urxvt cant handle nano on ssh

nos09 wrote:

thanks to you both !

If you resolved your issue please mark the thread as ‘Solved’.

#8 2012-06-04 20:21:23

nos09
Member
Registered: 2011-09-09
Posts: 107

Re: [SOLVED] Urxvt cant handle nano on ssh

doug piston wrote:

nos09 wrote:

thanks to you both !

If you resolved your issue please mark the thread as ‘Solved’.

nope it didn’t solved the problem .. but I changed my SSH terminal to tilda — which is transparent so I can keep it upon the pdf file that i refer and use it as virtual machine and it also handles nano and vi perfectly. not exactly as I planned but hey it works for me ! lol anyway i ll mark this thread as solved anyway !

View previous topic :: View next topic  
Author Message
minor_prophets
Apprentice
Apprentice

Joined: 07 Oct 2007
Posts: 281

PostPosted: Wed Feb 04, 2009 3:49 am    Post subject: [SOLVED]Error opening terminal: rxvt-unicode» on remote Reply with quote

I’m in need of some enlightenment here. I’ve seen a thread regarding the same issue as I have.

I ssh through urxvt to a remote host and receive the error in the title of this thread when attempting to use nano, for instance.

The problem is that none of the machines to which I am ssh’ing have X installed on them. I do not wish to have to install anything X on these machines Can anyone shine the light on this situation?

Last edited by minor_prophets on Mon Feb 09, 2009 3:37 am; edited 1 time in total

Back to top

View user's profile Send private message

ppurka
Advocate
Advocate

Joined: 26 Dec 2004
Posts: 3256

PostPosted: Wed Feb 04, 2009 9:44 pm    Post subject: Reply with quote

alias ssh to in ~/.<whatever shell you use>rc

Code:
alias ssh=»TERM=linux ssh»

:?:

I am giving the TERM as linux since you mentioned that you don’t have X installed which means that maybe TERM=xterm will also not work, but you can try that too.
_________________
emerge —quiet redefined | E17 vids: I, II | Now using kde5 | e is unstable :-/

Back to top

View user's profile Send private message

minor_prophets
Apprentice
Apprentice

Joined: 07 Oct 2007
Posts: 281

PostPosted: Wed Feb 04, 2009 11:20 pm    Post subject: Reply with quote

The machine from which I am ssh’ing is running X. The machines to which I am ssh’ing are not running X.

Pardon the noobishness here, but am I aliasing my profile on the machine from which I am running urxvt to ssh from? Thanks in advance. This is already cutting down on the troubleshooting time I planned for this evening.

Back to top

View user's profile Send private message

ppurka
Advocate
Advocate

Joined: 26 Dec 2004
Posts: 3256

PostPosted: Thu Feb 05, 2009 4:02 am    Post subject: Reply with quote

minor_prophets wrote:
The machine from which I am ssh’ing is running X. The machines to which I am ssh’ing are not running X.

Pardon the noobishness here, but am I aliasing my profile on the machine from which I am running urxvt to ssh from? Thanks in advance. This is already cutting down on the troubleshooting time I planned for this evening.

Yes, the alias must be defined on the local machine.

See.. you open a urxvt on local machine and you have terminal type defined as rxvt-unicode. You can do a simple

Code:
echo $TERM

to verify this.

When you run ssh and login to your remote session, that also gets the information that the terminal type is rxvt-unicode. But now, it becomes a problem if the remote machine does not have this terminfo installed, which is very possible since you don’t even have X installed there. Hence, the command I gave earlier temporarily sets the TERM to linux. Even «xterm» may work, «linux» terminfo corresponds to the TERM in the consoles obtained by doing Ctrl+Alt+F1, etc and should always be available in the remote system.
_________________
emerge —quiet redefined | E17 vids: I, II | Now using kde5 | e is unstable :-/

Back to top

View user's profile Send private message

minor_prophets
Apprentice
Apprentice

Joined: 07 Oct 2007
Posts: 281

PostPosted: Mon Feb 09, 2009 3:36 am    Post subject: Reply with quote

Adding the following at the end of my .bash_profile worked fine for me.

Code:
alias ssh=»TERM=linux ssh»



Thanks again for the clarity of your help.

MP

Back to top

View user's profile Send private message

moonfrog
n00b
n00b

Joined: 21 Nov 2013
Posts: 5
Location: San Diego, CA

PostPosted: Mon Dec 30, 2013 5:50 am    Post subject: Reply with quote

Forgive me for dragging up an old (and «solved») thread but:

A. it did not completely fix the problem.

B. it came up 2nd on the google search.

My main issue was trying to run midnight commander ssh’ed into an X’less machine using rxvt-unicode-256color

and getting: Error opening terminal: rxvt-unicode-256color.

adding:

Code:
alias ssh=»TERM=linux ssh»



to my bashrc did allow it to run but I lost console mouse support and the screen was fouled by hundreds of @@@.

changing it to:

Code:
alias ssh=»TERM=xterm ssh»



did work even for an X’less machine and allowed for a normal mc

But…trying to do this from my Fluxbox menu with:

Code:
{urxvt -e ssh -p 222 root@10.0.0.2}



and several variations, brought me back to the original problem.

The thing that fixed this for me was copying /usr/share/terminfo/r/rxvt-unicode-256color

from my machine to the ssh server (without the addition to bashrc).
_________________
Registered Linux User #448042

Linux From Scratch ID #20270

Back to top

View user's profile Send private message

Display posts from previous:   

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

  • 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

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

Понравилась статья? Поделить с друзьями:
  • 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