149

XTerm font is very small. How can I set it larger?

Eliah Kagan
  • 119,640
Sudo
  • 1,493

9 Answers9

139

If you don't already have one, create a file in your home directory named .Xresources to store your preferences for various X programs. Append a line to the file such as

xterm*font:     *-fixed-*-*-*-18-*

This informs xterm to use the 'fixed' font at size 18. From here, to incorporate the changes you've made you can either:

  • restart X; or
  • run xrdb -merge ~/.Xresources in a terminal

All new xterms should now have the font change.

If you run man xterm and go down to the RESOURCES section, you can find a wealth of additional, configurable xterm options.

noffle
  • 1,745
98

Use -fa and -fs parameters:

xterm -fa 'Monospace' -fs 14
nvd
  • 1,250
77

You can add the following as an example to your ~/.Xresources file:

! Use a truetype font and size.
xterm*faceName: Monospace
xterm*faceSize: 14

Then run the following:

xrdb -merge ~/.Xresources
52

You can also Ctrl-Right mouse click for temporary change of font size

Ev Dolzhenko
  • 4,749
15

From messing with /etc/X11/app-defaults/XTerm file and man page for Xterm I found two methods.

Method 1: A simpler method but not permanent: hold Ctrl key and right click button. This should bring up a menu for VT fonts, which stays on only as long as you hold right click key. You should see 7 choices, the largest being huge, which is what I'm using because my vision isn't exactly good.

Source: xterm(1) man page, part VT Fonts, which states "The fontMenu pops up when when the “control” key and pointer button three are pressed in a window."

Method 2: Permanent. Look through /etc/X11/app-defaults/XTerm, find what sizes lines such as *VT100.font1: , choose one, and write somewhere xterm*font: 10x20 (10x20 , again this is my choice for reasons I already stated).

About my system: I'm running Ubuntu 13.10

Lii
  • 75
10

One more option, add this to your ~/.Xresources to make hotkeys for changing the font size:

XTerm.vt100.translations: #override \n\
  Ctrl <Key> minus: smaller-vt-font() \n\
  Ctrl <Key> plus: larger-vt-font()

If you use uxterm, be sure to use UXTerm.vt100.translations instead.

Then you can use ctrl++ to increase font size or ctrl+- to decrease the size, just like you can with ctrl+right-click and selecting one of the other font size options.

Matthew
  • 239
4

you can also simply test them with :

xterm -fn "--clean--*---*---*---*-*"

after sel with xfontsel

pat
  • 41
4

Creating the .Xresources file with specified lines of code (provided in the answer by noffle) fixed my issue, but on reboot the settings got lost again.

If the settings specified in the .Xresource file are not getting reflected automatically, try adding the below line to ~/.bashrc.

[[ -f ~/.Xresources ]] && xrdb -merge ~/.Xresources
Zanna
  • 72,312
Jerin
  • 141
0

In my environment: Linux debian trixi, xorg, JWM; I put into /etc/jwm/system.jwmrc the next menu line:

<Program label="Terminal">urxvt -fn &quot;xft:Bitsrteam Vera Sans Mono:pixelsize=18&quot; -e sh -c &quot;/bin/bash --login&quot;</Program>

Sorry I cannot explain what each option means, while I composed this line starting with an example from man urxvt and tuning the values.

I would be glad if it will be helpful to anyone.

schweik
  • 161