13

I'm using bash version 4.3.42(1)-release in an ArchLinux/Gnome environment. When I type my commands some of the written characters gets transformed in some weird ones. Overall, all displayed text looks strange.

My character encoding is set to Unicode (UTF-8). I also checked my input language, which is correct. Since it worked before I assume it has something to do with an update but I'm not sure.

The following picture shows the output of bash -version and at the bottom the two words minus and moreover where you can see the strange behavior. enter image description here

How can i fix this?

The output of my locale

$ locale

LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
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=

Following my set font in /etc/vconsole.conf

KEYMAP=de
FONT=lat9w-16
6
  • Which terminal or "terminal emulator" are you using? "text console"? gnome-terminal? xterm? – andcoz Mar 30 '16 at 7:57
  • I'm using gnome-terminal. – JustCoding Mar 30 '16 at 8:01
  • Also, opening just a shell and typing shows the same behavior, so I guess it is not bash related. – JustCoding Mar 30 '16 at 8:04
  • 6
    there's no unusual characters in the output you posted. Characters are just misplaced/misaligned. Try other fonts. – Tagwint Mar 30 '16 at 8:05
  • In this case (and AFAIK), /etc/vconsole.conf is irrelevant. /etc/vconsole.conf settings apply to the virtual console, the one that pops-up when you hit ctrl+alt+f2. – andcoz Mar 30 '16 at 8:05
13

For terminal emulators, you should choose a monospace (a.k.a. fixed with) font. The letters are positioned in a grid, rather than as it would look nice according to the width of each individual letter.

3
  • wish this was showing earlier, completely fixed my problem. – meanbunny Oct 3 '17 at 3:18
  • thanks I had to fiddle with a few monospace fonts to find a one that finally worked on my kali box. I think in the end it was 'Dejavu Sans Mono Book'. Not all monospace fonts worked as they were still overlapping so just noting down if someone else comes across the same. – Vicer May 6 '18 at 11:44
  • thanks a bunch! Just as a side note: I had this other issue with unrendered glyphs. Issue persisted despite installing powerline-fonts. Reinstalling terminator(after powerline-fonts) fixed that issue. – farthVader Sep 3 '18 at 22:22
9

I had this exact same problem with a fresh Arch install.

I added the ttf-dejavu and kbd packages as per this and this.

problem solved! Not sure which of these fixed it but there you go, sorted.

sudo pacman -S ttf-dejavu kbd
-1

You should switch to a monospace font(like Monospace Regular)under the "custom font" option in Profile Preferences and the spacing will be correct.

-1

Try increasing font size in the terminal. I increased font size from 10 to 11 and it worked. (Edit > Preferences)

Not the answer you're looking for? Browse other questions tagged or ask your own question.