Bug 1057584

Summary: htop display is misplaced (ncurses in Konsole?)
Product: [openSUSE] openSUSE Tumbleweed Reporter: Emr Rec <erecio>
Component: KDE ApplicationsAssignee: E-Mail List <opensuse-kde-bugs>
Status: RESOLVED DUPLICATE QA Contact: E-mail List <qa-bugs>
Severity: Major    
Priority: P5 - None CC: develop7, erecio, wbauer
Version: Current   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: screenshot of konsole and htop
screenshot 2 of konsole and htop
x-term screenshot (working)

Description Emr Rec 2017-09-07 11:33:54 UTC
Created attachment 739726 [details]
screenshot of konsole and htop

When I start htop, the output is misformatted. At first draw everything is fine, but as the meters begin to rise and fall, the redrawing causes it to be out of synch. If I press F2 to go to Setup, the selection items are not under the right colums. I have attached a snapshot.

In the first screenshot, everything is not aligned correctly.

In the second screenshot, notice the meter for CPU#5; Notice Tree View option doesn't line up with the column. 

I am using Konsole for htop. Note it works fine in a Linux console (Ctrl-Alt-F2), and it works fine in Xterm (xterm-327-2.4.x86_64)

Locale Settings:
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME=C
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

Detailed Version Information:
Name        : htop
Version     : 2.0.2
Release     : 3.4
Architecture: x86_64
Install Date: Fri Sep  1 19:33:41 2017
Comment 1 Emr Rec 2017-09-07 11:34:40 UTC
Created attachment 739727 [details]
screenshot 2 of konsole and htop
Comment 2 Emr Rec 2017-09-07 11:35:29 UTC
Created attachment 739728 [details]
x-term screenshot (working)
Comment 3 Wolfgang Bauer 2017-09-07 11:43:27 UTC
Probably related to bug#1054448.

Try to set e.g. TERM=linux in konsole's profile settings (environment variables).

Or try to run "TERM=linux htop".

Does it work as expected then?
Comment 4 Emr Rec 2017-09-10 04:58:50 UTC
(In reply to Wolfgang Bauer from comment #3)
> Probably related to bug#1054448.
> 
> Try to set e.g. TERM=linux in konsole's profile settings (environment
> variables).
> 
> Or try to run "TERM=linux htop".
> 
> Does it work as expected then?

Kind of. the formatting is correct. However, the F keys don't work. F2 == setup, but I have to press F4 to get to the setup screen when I set my TERM=linux. In any case, when I press F4 to get to the setup menu, the columns are formatted correctly.
:)
Comment 5 Andrei Dziahel 2017-09-10 08:59:50 UTC
Affects me too in GNOME + Tilix/GNOME Terminal (both are using gnome's VTE).

`export TERM=vte-256color` fixed the issue for me (I've had xterm-256color)
Comment 6 Wolfgang Bauer 2017-09-11 07:31:39 UTC
(In reply to Emr Rec from comment #4)
> Kind of. the formatting is correct. However, the F keys don't work.

This could probably be "fixed" by setting the keyboard layout to "Linux Konsole" too then, I suppose.
Or try a different value for $TERM, I think even xterm or xterm-color should work (konsole's default is xterm-256color, and that seems to be broken).

In any case, this is not a bug in konsole (as confirmed by comment#5 as well), but rather in the recent terminfo-base update (part of ncurses).
Installing the package from Leap 42.2/3 (or at least copying /usr/share/terminfo/x/xterm from there) should be a workaround as well.

*** This bug has been marked as a duplicate of bug 1054448 ***
Comment 7 Wolfgang Bauer 2017-09-25 11:30:27 UTC
Actually it's rather a duplicate of bug#1056020.
There were quite a few similar bug reports at the same time...

As mentioned there, this boils down to missing REP support in those terminal emulators and has to be implemented first to fix the problem.

*** This bug has been marked as a duplicate of bug 1056020 ***