[SOLVED] Please fix HTOP

Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions
Goto page 1, 2  Next
Author Message
TCB13
DD-WRT User


Joined: 06 Jun 2010
Posts: 260
Location: Portugal

PostPosted: Thu Sep 28, 2023 20:04    Post subject: [SOLVED] Please fix HTOP Reply with quote
Hello,

Title says it all. Please fix HTOP.

Code:
root@Async:~# htop
Error opening terminal: xterm-256color.


htop has been broken for a while. The workaround is easy but annoying:

Code:
root@Async:~# export TERM=xterm
root@Async:~# htop
// working htop
root@Async:~#


See post https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1290444#1290444 for details. Broken in Windows, macOS and Debian (both GNOME and xfce).

_________________
1x Netgear R7800 (latest); 3x Netgear R7000 (latest); 2x Asus RT-N16 (v3.0-r47656); 2x Fonera 2100 (v3.0-r45454).


Last edited by TCB13 on Sun Oct 22, 2023 18:53; edited 2 times in total
Sponsor
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14249
Location: Texas, USA

PostPosted: Thu Sep 28, 2023 21:09    Post subject: Reply with quote
Working fine with Putty on Debian 11 on WRT3200ACM on 53445.





What Router / Build / Client OS /Client program is in use?

_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
Gameman Advanced Kid
DD-WRT Guru


Joined: 18 Nov 2012
Posts: 1158

PostPosted: Fri Sep 29, 2023 7:21    Post subject: Reply with quote
I got a few more routers I can also test this on. logged in and typed "htop". no issues, it just ran.


b78d22e633a72d010ba422fcda9ce794.png
 Description:
 Filesize:  66.82 KB
 Viewed:  5310 Time(s)

b78d22e633a72d010ba422fcda9ce794.png



_________________
For people who are new to the dd-wrt forums >> http://www.catb.org/~esr/faqs/smart-questions.html#rtfm

barryware wrote:
It takes a "community" to raise a router..


Internet Connection 1
Some Techicolor modem > Linksys WRT3200ACM

Internet connection 2
Ubiquiti Powerbeam Gen 2 > Netgear R9000

Official (but not really) dd-wrt General Discussion element/matrix chat

https://matrix.to/#/#dd-wrt-private-non-offical:matrix.org
mrjcd
DD-WRT Guru


Joined: 31 Jan 2015
Posts: 6293
Location: Texas

PostPosted: Fri Sep 29, 2023 7:37    Post subject: Re: Please fix HTOP Reply with quote
TCB13 wrote:

Code:
root@Async:~# htop
Error opening terminal: xterm-256color.


htop has been broken for a while. The workaround is easy but annoying:

Code:
root@Async:~# export TERM=xterm
root@Async:~# htop
// working htop
root@Async:~#


yeahuh been like that for while on the EA8500 and WNDR3700v4
just checked both ...running r53544
Alozaros
DD-WRT Guru


Joined: 16 Nov 2015
Posts: 6447
Location: UK, London, just across the river..

PostPosted: Fri Sep 29, 2023 8:45    Post subject: Reply with quote
there was a thread how to fix it (htop).... if im not wrong...not gonna waste time finding it sharing it as im too busy atm...
otherwise it works ok using putty...you can install Putty either on win or linux...no clue for MacOS..sorry..

I use htop on all my routers from my sig...(740 is excluded as it doesn't have an USB) some either have it preinstalled or you can use the entware package manager and install it manually...

_________________
Atheros
TP-Link WR740Nv1 ---DD-WRT 55630 WAP
TP-Link WR1043NDv2 -DD-WRT 55723 Gateway/DoT,Forced DNS,Ad-Block,Firewall,x4VLAN,VPN
TP-Link WR1043NDv2 -Gargoyle OS 1.15.x AP,DNS,QoS,Quotas
Qualcomm-Atheros
Netgear XR500 --DD-WRT 55779 Gateway/DoH,Forced DNS,AP Isolation,4VLAN,Ad-Block,Firewall,Vanilla
Netgear R7800 --DD-WRT 55819 Gateway/DoT,AD-Block,Forced DNS,AP&Net Isolation,x3VLAN,Firewall,Vanilla
Netgear R9000 --DD-WRT 55779 Gateway/DoT,AD-Block,AP Isolation,Firewall,Forced DNS,x2VLAN,Vanilla
Broadcom
Netgear R7000 --DD-WRT 55460 Gateway/SmartDNS/DoH,AD-Block,Firewall,Forced DNS,x3VLAN,VPN
NOT USING 5Ghz ANYWHERE
------------------------------------------------------
Stubby DNS over TLS I DNSCrypt v2 by mac913
mrjcd
DD-WRT Guru


Joined: 31 Jan 2015
Posts: 6293
Location: Texas

PostPosted: Fri Sep 29, 2023 9:20    Post subject: Reply with quote
Twisted Evil

https://mrjcd.com/junk/dd-wrt/EA8500/htop-r53544.mp4
TCB13
DD-WRT User


Joined: 06 Jun 2010
Posts: 260
Location: Portugal

PostPosted: Fri Sep 29, 2023 10:03    Post subject: Reply with quote
mrjcd wrote:
Twisted Evil

https://mrjcd.com/junk/dd-wrt/EA8500/htop-r53544.mp4


Glad to know I'm not the only one.

kernel-panic69 wrote:

What Router / Build / Client OS /Client program is in use?


Router:

Router Model Netgear R7000
Firmware Version DD-WRT v3.0-r53544 std (09/28/23)
Kernel Version Linux 4.4.302-st40 #10099 SMP Thu Sep 28 03:40:43 +06 2023 armv7l

Client:

> systeminfo | findstr /B /C:"OS Name" /C:"OS Version"
OS Name: Microsoft Windows 10 Enterprise
OS Version: 10.0.19045 N/A Build 19045

> ssh -V
OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2

Windows Terminal
Version: 1.17.11461.0



Same with macOS clients:




Also broken in Debian 12, GNOME and xfce:





Obviously this doesn't happen if I try to use htop in a generic Debian server. This only happens with DD-WRT boxes and has been happening for more than a year now.

Thank you.

_________________
1x Netgear R7800 (latest); 3x Netgear R7000 (latest); 2x Asus RT-N16 (v3.0-r47656); 2x Fonera 2100 (v3.0-r45454).
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14249
Location: Texas, USA

PostPosted: Fri Sep 29, 2023 10:24    Post subject: Reply with quote
It's a client side issue. Had a similar issue with nano on FreshTomato a while back:

https://bitbucket.org/pedro311/freshtomato-arm/issues/6/nano-does-not-work-error-opening-terminal

In other words, fix your client programs or use PuTTY, it's *NOT* a DD-WRT issue.
PuTTY is available for Windows, Linux, and MacOS (via Homebrew or MacPorts).
Thank you, come again.

_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net


Last edited by kernel-panic69 on Fri Sep 29, 2023 10:35; edited 1 time in total
TCB13
DD-WRT User


Joined: 06 Jun 2010
Posts: 260
Location: Portugal

PostPosted: Fri Sep 29, 2023 10:32    Post subject: Reply with quote
kernel-panic69 wrote:
It's a client side issue. Had a similar issue with nano on FreshTomato a while back:

https://bitbucket.org/pedro311/freshtomato-arm/issues/6/nano-does-not-work-error-opening-terminal

In other words, fix your client programs or use PuTTY, it's *NOT* a DD-WRT issue. PuTTY is available for Windows, Linux, and MacOS (via Homebrew or MacPorts). Thank you, come again.


C'mon how is this a "client issue" if it fails in all major clients that happen to work just fine with any other Linux system?

What are you even suggesting? PuTTY is the only one that is right? That the official HTOP/SSH Daemon in all Linux systems have specific hacks to enable all client to work fine besides PuTTY? lol

And in case you didn't read the first post, I know about the "export TERM=xterm" workaround, have been doing it for a long time.

_________________
1x Netgear R7800 (latest); 3x Netgear R7000 (latest); 2x Asus RT-N16 (v3.0-r47656); 2x Fonera 2100 (v3.0-r45454).
dale_gribble39
DD-WRT Guru


Joined: 11 Jun 2022
Posts: 1959

PostPosted: Fri Sep 29, 2023 10:45    Post subject: Reply with quote
Alozaros wrote:
there was a thread how to fix it (htop).... if im not wrong...not gonna waste time finding it sharing it as im too busy atm...

You mean this build thread?

New Build - 11/15/2021 - r47644 - page 3

Really shocked that sir ho1Aetoo didn't look for the actual solution as already noted:

https://stackoverflow.com/questions/6804208/nano-error-error-opening-terminal-xterm-256color

_________________
"The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep." - Robert Frost

"I am one of the noticeable ones - notice me" - Dale Frances McKenzie Bozzio

<fact>code knows no gender</fact>

This is me, knowing I've ruffled your feathers, and not giving a ****
Some people are still hard-headed.

--------------------------------------
Mac Pro (Mid 2012) - Two 2.4GHz 6-Core Intel Xeon E5645 processors 64GB 1333MHz DDR3 ECC SDRAM OpenSUSE Leap 15.5
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14249
Location: Texas, USA

PostPosted: Fri Sep 29, 2023 10:48    Post subject: Reply with quote
TCB13 wrote:
C'mon how is this a "client issue" if it fails in all major clients that happen to work just fine with any other Linux system?

What are you even suggesting? PuTTY is the only one that is right? That the official HTOP/SSH Daemon in all Linux systems have specific hacks to enable all client to work fine besides PuTTY? lol

And in case you didn't read the first post, I know about the "export TERM=xterm" workaround, have been doing it for a long time.

And there are ways to make the workaround persistent, as already noted twice. Do the hacks, test. I'm not going to bother Sebastian with this.

_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
mwchang
DD-WRT Guru


Joined: 26 Mar 2013
Posts: 1858
Location: Hung Hom, Hong Kong

PostPosted: Fri Sep 29, 2023 11:11    Post subject: Re: Please fix HTOP Reply with quote
TCB13 wrote:
Code:
root@Async:~# htop
Error opening terminal: xterm-256color.

htop has been broken for a while. The workaround is easy but annoying:

If you treated it as a generic error, from Google Search (keywords "htop xterm-256color error"):

nano error: Error opening terminal: xterm-256color - Stack Overflow
https://stackoverflow.com/questions/6804208/nano-error-error-opening-terminal-xterm-256color
Code:
After upgrading to OSX Lion, I 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.

Setting the TERM environment variable (to "xterm-color", "xterm", "vt220", "vt100", "putty", "dumb" ...) is possibly the simplest solution. You only lost colors... Smile

_________________
Router: Asus RT-N18U (rev. A1)

Drink, Blink, Stretch! Live long and prosper! May the Force and farces be with you!

Facebook: https://www.facebook.com/changmanwai
Website: https://sites.google.com/site/changmw
SETI@Home profile: http://setiathome.berkeley.edu/view_profile.php?userid=211832
GitHub: https://github.com/changmw/changmw
TCB13
DD-WRT User


Joined: 06 Jun 2010
Posts: 260
Location: Portugal

PostPosted: Fri Sep 29, 2023 12:49    Post subject: Reply with quote
mwchang wrote:

If you treated it as a generic error, from Google Search (keywords "htop xterm-256color error"):

nano error: Error opening terminal: xterm-256color - Stack Overflow
https://stackoverflow.com/questions/6804208/nano-error-error-opening-terminal-xterm-256color
Code:
After upgrading to OSX Lion, I 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.

Setting the TERM environment variable (to "xterm-color", "xterm", "vt220", "vt100", "putty", "dumb" ...) is possibly the simplest solution. You only lost colors... Smile


I can't treat something that only happens with DD-WRT as a generic errors. Again no issues with htop under any other Linux box.

kernel-panic69 wrote:

And there are ways to make the workaround persistent, as already noted twice. Do the hacks, test. I'm not going to bother Sebastian with this.


Why is this only "broken" under DD-WRT? Why does it work with every other Linux?

_________________
1x Netgear R7800 (latest); 3x Netgear R7000 (latest); 2x Asus RT-N16 (v3.0-r47656); 2x Fonera 2100 (v3.0-r45454).
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14249
Location: Texas, USA

PostPosted: Fri Sep 29, 2023 12:59    Post subject: Reply with quote
The issue I linked earlier was fixed by a *client-side* fix (in MacOS and Debian). There was no patch related to it pushed to FreshTomato.

Noticed that the link about Lion in the now-referenced-three-times article posted by @Meetai.com was broken. Thankfully, the Web Archive has a copy:

https://web.archive.org/web/20140520170633/http://www.cloudfarm.it/fix-error-opening-terminal-xterm-256color-unknown-terminal-type/

Anyhow, again, it's on the client side, not DD-WRT. Try your "workaround" before ssh'ing to DD-WRT and see if it mysteriously works, even.

More info related to Windows SSH client:

https://unix.stackexchange.com/questions/385834/error-opening-terminal-xterm-256color

https://github.com/PowerShell/Win32-OpenSSH/issues/828

https://github.com/PowerShell/Win32-OpenSSH/issues/425

https://duckduckgo.com/?q=fix+xterm-256-color+windows+ssh+terminal

Waiting for the unpleasant reply from Sebastian, if any. Enjoy.

_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
ho1Aetoo
DD-WRT Guru


Joined: 19 Feb 2019
Posts: 3006
Location: Germany

PostPosted: Fri Sep 29, 2023 13:12    Post subject: Reply with quote
dale_gribble39 wrote:
Alozaros wrote:
there was a thread how to fix it (htop).... if im not wrong...not gonna waste time finding it sharing it as im too busy atm...

You mean this build thread?

New Build - 11/15/2021 - r47644 - page 3

Really shocked that sir ho1Aetoo didn't look for the actual solution as already noted:

https://stackoverflow.com/questions/6804208/nano-error-error-opening-terminal-xterm-256color


So no idea what you are babbling again.

First, I posted a solution and second, the problem is that xterm-256color is more or less standard these days but not supported by dd-wrt.

Either BS adds xterm-256color to the images or you have to tell your terminal emulators to use xterm or xterm-color and not "xterm-256color".

and you have as always no idea

Code:
root@DD-WRT:/# f
./etc/terminfo
./etc/terminfo/c
./etc/terminfo/c/cygwin
./etc/terminfo/l
./etc/terminfo/l/linux
./etc/terminfo/s
./etc/terminfo/s/screen
./etc/terminfo/v
./etc/terminfo/v/vt100
./etc/terminfo/x
./etc/terminfo/x/xterm
./etc/terminfo/x/xterm-color



Peek 2023-09-29 15-11.gif
 Description:
 Filesize:  142.68 KB
 Viewed:  5177 Time(s)

Peek 2023-09-29 15-11.gif



_________________
Quickstart guides:
use Pi-Hole as simple DNS-Server with DD-WRT
VLAN configuration via GUI - 1 CPU port
VLAN configuration via GUI - 2 CPU ports (R7800, EA8500 etc)

Routers
Marvell OCTEON TX2 - QHora-322 - OpenWrt 23.05.3 - Gateway
Qualcomm IPQ8065 - R7800 - DD-WRT - WAP
Goto page 1, 2  Next Display posts from previous:    Page 1 of 2
Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions All times are GMT

Navigation

 
Jump to:  
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
You can attach files in this forum
You can download files in this forum