From edcf8841ab77b43f0cfd620bb7e419e869778e69 Mon Sep 17 00:00:00 2001 From: iliajie Date: Mon, 5 Dec 2022 19:50:54 +0200 Subject: [PATCH] Fix to set config option directly --- xterm/config.info | 2 +- xterm/shellserver.pl | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/xterm/config.info b/xterm/config.info index 13ad6dfee..b3fdaa737 100644 --- a/xterm/config.info +++ b/xterm/config.info @@ -1,4 +1,4 @@ -xterm=Set TERM environmental variable to,4,0-xterm-256color,1-xterm-16color,2-xterm,3-vt102,3-vt100,4-vt52,5-rxvt,6-nsterm,7-dtterm,8-ansi +xterm=Set TERM environmental variable to,4,xterm+256color-xterm-256color,xterm+16color-xterm-16color,xterm-xterm,vt102-vt102,vt100-vt100,vt52-vt52,rxvt-rxvt,nsterm-nsterm,dtterm-dtterm,ansi-ansi base_port=Base port number for WebSockets connections,0,5 size=Terminal width and height in characters,3,Automatic,5,,,Static (80x24) locale=Set shell character encoding,10,0-Shell default,1-en_US.UTF-8,Custom diff --git a/xterm/shellserver.pl b/xterm/shellserver.pl index 3ec3ca8ce..6258e1fba 100755 --- a/xterm/shellserver.pl +++ b/xterm/shellserver.pl @@ -39,8 +39,11 @@ if ($lang) { } # Set terminal -my @terms = ('xterm-256color', 'xterm-16color', 'xterm', 'vt102', 'vt100', 'vt52', 'rxvt', 'nsterm', 'dtterm', 'ansi'); -$ENV{'TERM'} = defined($config{'xterm'}) ? $terms[$config{'xterm'}] : 'xterm-256color'; +my $config_xterm = $config{'xterm'}; +$config_xterm = 'xterm-256color' + if (!$config_xterm); +$config_xterm =~ s/\+/-/; +$ENV{'TERM'} = $config_xterm; $ENV{'HOME'} = $uinfo[7]; chdir($dir || $uinfo[7] || "/"); my $shellcmd = $uinfo[8];