Jump to content

ncurses under ssh/PuTTY - messed up horizontal spacing


Recommended Posts

OPiPC2, with Armbian Bionic
desktop mainline based kernel 4.19.y


Using it as headless server, all X and desktop stuff removed. Using PuTTY to log in via SSH, line drawing stuff (as usual) only works if translation is set to ISO-8859-1 in PuTTY.


mc looks great, but all ncurses-based software (aptitude, htop, bmon etc) does not. Main problem seems that horizontal spacing is "shrunk" whenever there is no text to keep it:




This is even more dramatic for menu systems and anything that is column-oriented. Tried dpkg-reconfigure locales to switch system to ISO-8859, but no change, really seems to be an ncurses bug. No such problems with other systems (Raspbian etc.).


Is this a known problem? Is there a workaround?



Link to comment
Share on other sites

40 minutes ago, hello_world.c said:

Thanks, but with this, now mc also doesn't show line drawing characters, and spacing in ncurses is still wrong.

OK ;)

from your apt-picture above it looks like you are NOT using a mono-font (every character the same width) so the spaces in your borders are to thin, because the space character isnt such as wide as a normal letter or sign.

for PuTTY I do use the mono-font Cousine (TTF format):


With the follwoing settings in armbian-config => Personal => Locales

and the following PuTTY-Settings I do get a good picture with lines - also in mc (Midnight Commander) :)


So you try my settings and tell me if it is getting better ;)








Link to comment
Share on other sites

My PuTTY font is Courier New which is monospace. I don't have Cuisine, but tried Consolas, same result.


With your exact settings, mc looks fine, but armbian-config does not:




No ncurses program (bmon, aptitude) shows ncurses line drawing characters when I choose UTF in PuTTY. Aptitude menu apparently is not ncurses and works like mc does:


but the dialogs seem to be ncurses so doesn't work:



With ISO translation in PuTTY, it's the opposite: mc is not showing line drawing:



but armbian-config (kind of) works, well, without background completely filled:



In aptitude, as expected, dialogs work:


but menu doesn't:



This is sooo messy... :-(


Link to comment
Share on other sites

did you use/set UTF8 in armbian-config locales?

did you remove the LC_ALL=C ?

and all after that reconnect via SSH to get the new setting?


I also got these q's as border when I didnt used UTF8 in PuTTY and armbian-config/locales at the same time (and when LC_ALL=C was also active)


Link to comment
Share on other sites

new login after setting armbian-config to en_US.UTF-8?

the black text background looks strange.

maybe I have to read more about ncurses? :(


you did click apply in PuTTY (then its only for the actual session) or you save it to you actual session (first entry in  change settings)

Link to comment
Share on other sites

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

Important Information

Terms of Use - Privacy Policy - Guidelines