2

I have installed xterm on WSL2.

Whenever I execute xterm, I get:

xterm: cannot load font "-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1"

I installed several fonts with:

 sudo apt-get install xfonts-... 

But the problem persists. How can I solve this?

Additionally, for some reason sometimes it keeps on printing the letter "w"...

Best regards

1
  • Recommend posting the "w" problem as a separate question. I've had both of these issues as well and just haven't take the time to resolve, since I typically just use xterm as a "simple case" app to make sure WSLg (or other GUI methods) are working. In my case, by the way, mine prints d repeatedly on startup (sometimes, but not always). Mar 9, 2022 at 18:26

2 Answers 2

1

To set the font when starting xterm, first get a list of your installed fonts with:

fc-list

You don't mention which distribution you are running, so I'm not sure what fonts you will have. On Ubuntu on WSL, it looks like "DejaVuSansMono" is installed by default, and it's a nice fixed-width terminal-type font.

You can try it out by launching xterm and specifying the font face (and likely size) with:

xterm -fs 14 -fa DejaVuSansMono

If that font works for you, you can make it permanent by creating a ~/.Xresources with:

xterm*faceName: DejaVuSansMono
xterm*faceSize: 14

And then merge it into your X resources database with:

xrdb -merge ~/.Xresources

Also note that the "repeating characters" problem appears to be fixed in the latest Preview WSLg.

0

To load the default fonts required by xterm try installing the package - xfonts-base

This fixed the problem for me on Ubuntu 22.04 under WSL-2 of xterm not being able to scale by the CTRL - right-click menu

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .