From a6ea4a194f34649fd0153e41a27284cc9cae3983 Mon Sep 17 00:00:00 2001 From: Siarzhuk Zharski Date: Sun, 14 Apr 2013 18:35:12 +0200 Subject: [PATCH] Fix "Error opening terminal:xterm-256color" issue (#9636) Looks like switching to declare "xterm-256color" terminal emulation was made a bit early: there are lot of servers that still do not know about this terminal. As was discussed in #9636 the only acceptable way is to switch back to "xterm" and adjust corresponding entry in our local termcap database to support 256 colors. So this changeset: * Declare emulated terminal as "xterm"; * Change the colors and color pairs of "xterm" termcap entry to support 256 colors; Workarounds the #9636. Should be upgraded to "xterm-256color" some time in the future. --- src/apps/terminal/Shell.cpp | 2 +- src/libs/termcap/termcap.src | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/apps/terminal/Shell.cpp b/src/apps/terminal/Shell.cpp index 11793568ba..b6c70ff8ad 100644 --- a/src/apps/terminal/Shell.cpp +++ b/src/apps/terminal/Shell.cpp @@ -74,7 +74,7 @@ // TODO: should extract from /etc/passwd instead??? const char *kDefaultShell = "/bin/sh"; -const char *kTerminalType = "xterm-256color"; +const char *kTerminalType = "xterm"; /* * Set environment variable. diff --git a/src/libs/termcap/termcap.src b/src/libs/termcap/termcap.src index ba69e28d67..1c08373176 100644 --- a/src/libs/termcap/termcap.src +++ b/src/libs/termcap/termcap.src @@ -6202,9 +6202,10 @@ xterm-24|vs100|xterms|xterm terminal emulator (X Window System):\ :u7=\E[6n:u8=\E[?1;2c:u9=\E[c:ue=\E[m:up=\E[A:us=\E[4m: # This is xterm for ncurses. +# Haiku: This one customized to declare 256 colors support xterm|xterm terminal emulator (X Window System):\ :5i:NP:am:bs:km:mi:ms:ut:xn:\ - :Co#8:co#80:it#8:li#24:pa#64:\ + :Co#256:co#80:it#8:li#24:pa#32767:\ :#2=\E[1;2H:#3=\E[2;2~:#4=\E[1;2D:%c=\E[6;2~:%e=\E[5;2~:\ :%i=\E[1;2C:*4=\E[3;2~:*7=\E[1;2F:@7=\EOF:@8=\EOM:\ :AB=\E[4%dm:AF=\E[3%dm:AL=\E[%dL:DC=\E[%dP:DL=\E[%dM:\