Jump to content

htop has strange "layout"


pazzoide

Recommended Posts

Armbianmonitor:

Hello,

 

I don't know if this is board related or probably armbian related... anyway.

 

In my old banana pi (4.19.13-sunxi) htop (version 2.1.1) is like this:

 

728344859_Schermatadel2019-02-0809-50-32.png.3f7b1bec1eac63d8d35942074b1e8aec.png

 

While on every other linux PC, server or whatever I have it looks like:

 

136301414_Schermatadel2019-02-0809-51-06.png.d8e22ff6f7b0679cdaab55e32ba648a3.png

 

The small and stupid difference is in those blue "tree view" lines (under the Command column), which I don't really like nor understand. Is there a way to set those lines as they normally should be?

 

(and why was it set???)

 

Thanks

 

Link to comment
Share on other sites

Both pictures show the tree lines, but the Banana Pi may have not used a UTF-8 font in his terminal-window?

The tree-view is enabled/toggled in htop with the lowercase Key "t" or F5

If you leave htop with F10 the current view will be saved ( with Ctrl-C it wouldnt saved)

With the uppercase Key "S" (or F2) you could enter the Setup-Mode of htop

 

"man htop" is your friend ;)

Link to comment
Share on other sites

Type in the shell:

printf   "This is ASCII representation:\n|\n\`\n\`-\nThis is UTF-8 representation:\n\xe2\x94\x82\n\xe2\x94\x9c\n\xe2\x94\x94\xe2\x94\x80\n"
 

You should see this:

This is ASCII representation:
|
`
`-
This is UTF-8 representation:


└─
 

If you don't see the above representation, you should set UTF-8 for your language in Terminal.

Link to comment
Share on other sites

On 2/8/2019 at 3:23 PM, guidol said:

you could set a UTF8 language in armbian-config at the SBC-side 

and in puTTY terminal you could under configurations you could also set utf8

I don't use putty , connecting from a linux ssh client.

Anyway, this is may armbian-config

1556190640_Schermatadel2019-02-1109-40-25.png.fd6513deea322a6ee52f4417d486dc37.png

 

and this my locale
 

# locale
LANG=en_US
LANGUAGE=
LC_CTYPE="en_US"
LC_NUMERIC=it_IT.UTF-8
LC_TIME=it_IT.UTF-8
LC_COLLATE="en_US"
LC_MONETARY=it_IT.UTF-8
LC_MESSAGES=en_US.UTF-8
LC_PAPER=it_IT.UTF-8
LC_NAME=it_IT.UTF-8
LC_ADDRESS=it_IT.UTF-8
LC_TELEPHONE=it_IT.UTF-8
LC_MEASUREMENT=it_IT.UTF-8
LC_IDENTIFICATION=it_IT.UTF-8
LC_ALL=

 

It is already correctly configured with UTF-8.

 

 

***

 

15 hours ago, Tido said:

the classic problem, 60cm away from the screen :D

 

 

The problem is further being it an headless server, maybe in Zurich /ot

 

***

 

7 hours ago, @lex said:

If you don't see the above representation, you should set UTF-8 for your language in Terminal.

 

 

I do:

 

859596712_Schermatadel2019-02-1109-57-10.png.f092b31a8c5e11030a33031946dae0f3.png

 

 

***

 

On 2/9/2019 at 12:40 AM, ftp-bin2fex said:

hello pazzoide B) still shows enough to help, why don't you try to change your htop version.

My version is the one that comes with armbian and I'd prefer to find the nature of the problem, instead. Also the banana htop version is newer then the desktop version, but seems older in ascii view.

But if I have no other options I will change version.

 

***

 

 

I found this github issue https://github.com/hishamhm/htop/issues/133

regarding a lib problem in compiling the software. Maybe it is compiled with --disable-unicode opt?

 

Anyway, do any other users has this view in their htop with armbian or just my own has this ascii view?

 

Link to comment
Share on other sites

htop was built without support for ncursessw (shared libraries for terminal handling (wide character support)).

I realized that is not the problem, i found out if you run htop from ssh terminal and from a console terminal you get ASCII on one and UTF-8 on the other (or vice-versa) and both have UTF-8 support.

Can you please check if you have the same behavior?  

 

 

Edited by @lex
Trying to figure out where the problem is.
Link to comment
Share on other sites

I don't have a console terminal attached to the banana, so I can't check (it's not in my place, I only have ssh access to it). But If I ssh into the banana and then from the banana ssh to another server i see UTF htop, so I agree, it's just configuration.

 

If I echo $LANG I get

it_IT.UTF-8 in my desktop

and

en_US in the banana

 

 

anyway somehow I solved the issue. After trying to reconfigure my locales there was a C.UTF-8 that was not selected in the list and that I previously ignored. But only selecting that as default locale everything kinda fixed.

 

googling: C.utf8 = POSIX standards-compliant locale, extended to allow the basic use of UTF-8. No character upper-lower case relationships and collation orders defined beyond ASCII.

 

Don't know if my EN.US.utf8 is corrupted, nothing happens if I try to regenerate it. I'll just stick with the C.utf8 (which works fine) still I was not able to understand the nature of the problem....

 

Thanks evrybody

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines