Why does my text show up as square characters when I forward an X11 session via SSH with CentOS? I’ll show you how to fix it and why it happens.
It has to do with font packages not being installed on the sending side(headless server etc) of the session. You’ll get a hint when forwarding, similar to this:
This can mainly happen when using a minimal server install.
For the new guys, this can trip you up. What font should I install? Where do I start?
Easy Fix:
You can use either use the x11-font package, another style of font (yum search *font*
) or my personal favourite, Dejavu.
CentOS / RHEL:
yum install xorg-x11-fonts-Type1
OR
yum install dejavu-lgc-sans-fonts
Et Voila! - Using Dejavu font:
Handy Hint:
If you’re on windows and using Putty, you’ll find you need an X11 Server on your client. An easier way is to use MobaXterm. It has an inbuilt X11 Server, tabs for multiple SSH sessions and an SCP/SFTP browser window built in. That means you can also drop WinSCP.
If you’re interested in something similar to MobaXterm. There’s also mremoteng, RoyalTS, SecureCRT and good ole Cygwin.