XTerm font is very small. How can I set it larger?
9 Answers
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 ~/.Xresourcesin 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.
- 1,745
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
- 871
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
- 75
- 107,582
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.
- 239
you can also simply test them with :
xterm -fn "--clean--*---*---*---*-*"
after sel with xfontsel
- 1,092
- 41
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
In my environment: Linux debian trixi, xorg, JWM; I put into /etc/jwm/system.jwmrc the next menu line:
<Program label="Terminal">urxvt -fn "xft:Bitsrteam Vera Sans Mono:pixelsize=18" -e sh -c "/bin/bash --login"</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.
- 161