1

terminal is not displaying outputs properly, it displays outputs mostly like given in the image below

enter image description here

while it should display outputs like this

enter image description here

any suggestions on how it can be fixed?

thanasisp
  • 7,802
  • 2
  • 26
  • 39
knkadnk
  • 11
  • 3
  • 1
    Have you set the `COLUMNS` environment variable to something less than the width of your terminal? Does the issue resolve itself if you first do `unset -v COLUMNS`? Or, is the issue that you are using a font that doesn't have a fixed width (not a monospaced font)? – Kusalananda Apr 21 '22 at 08:44
  • No I have not. I tried `unset -v COLUMNS` it is still the same. the font I'm using is the default font that came with it. – knkadnk Apr 21 '22 at 09:04
  • 1
    Is it a gui terminal where system font is used? Can you change it to monospace (regular)? – thanasisp Apr 21 '22 at 11:54
  • It is QTerminal, I have tried and changed it to all monospaced fonts including monospace but the outputs are still the same. @thanasisp – knkadnk Apr 21 '22 at 12:21

1 Answers1

1

You are using a proportionally spaced font, and what you want is a monospaced font.

From an open QTerminal window:

  • click File, then Preferences; the Appearance tab should display
  • the top line should be the Font selection; the default shown on my installation is Liberation Mono 12 pt
  • click Change... and select a monospaced font, such as Liberation Mono or Courier 10 Pitch
  • click OK, then Apply, then OK. This should return you to your QTerminal session.

Test with the output of ps or similar command and ensure that the columns align.

Confirm that your font choice is recorded in QTerminal's settings:

$ grep ^font ~/.config/qterminal.org/qterminal.ini 
fontFamily=Courier 10 Pitch
fontSize=12
Jim L.
  • 7,188
  • 1
  • 13
  • 25