broken layout in htop

When I run htop, I get a messed up layout, especially on the top section; you can see a sample here:

I’m running version 2.0.2, and this happens only on the terminals inside the graphical DE, not on the virtual tty’s accessed with CTRL+ALT+F1 and so on.

How can I solve this?

Set TERM to something else.

It’s caused by a change in ncurses, that uses a specific command for xterm now that most other terminal emulators don’t support.

See also: