With XQuartz 2.8.0_rc1 running on MacOS 10.15.7, when I run an xterm and ctrl-middle-click on an xterm I get a popup font menu as shown here. How can I set the default font so that all xterms open with, for example, UTF-8 encoding?

Incidentally, I'm seeking this after the XQuartz update that I accepted yesterday. I previously used Terminal and xterm -- Terminal for vim editors (because the encoding was otherwise wrong) and xterm for everything else. But after yesterday's XQuartz update, I can no longer run xterm from within Terminal (well, they "run" but they don't display). So I want to use only xterm, but I need to be able to set the font encoding, preferably to UTF-8 since that seems to be what all my remote machines are using.

enter image description here

2 Answers 2


RTM. Going through the man page for xterm, the solution is to run xterm as follows:

xterm -en UTF-8

XQuartz includes the uxterm script (/opt/X11/bin/uxterm), which looks for a workable locale using UTF-8 encoding, and sets the xterm resources to use the UXTerm class (which allows it to use suitable fonts). The uxterm manual page gives more information.

Setting the encoding without changing the fonts limits you to the ISO-8859-1 (Latin-1) codeset, plus some workarounds for line-drawing.

XQuartz is actually a little old (MacPorts has an up-to-date copy of xterm, which includes support for TrueType font-sets).

  • I so regret allowing XQuartz to update itself the other day. I rely on working remotely and the MacBook is just a remote terminal to all my "real" computers. First, logged in via Terminal, remote X applications wouldn't display. So I decided I would run Xterm exclusively and no longer use Terminal. But now I find that some remote applications no longer run from my xterms. Will un-install XQuartz and try MacPorts' xterm... Feb 26, 2021 at 17:48
  • Tried and failed to install xterm via MacPorts. I should have never updated. Feb 26, 2021 at 21:39
  • 1
    You may not have installed xorg-server (XQuartz bundles all of the pieces, while MacPorts is al la carte). Feb 26, 2021 at 21:51

You must log in to answer this question.

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