XTerm font is very small. How can I set it larger?
29 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, you can either restart X or run xrdb -merge ~/.Xresources in a terminal to incorporate the changes you've made. 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.
Use -fa and -fs parameters:
xterm -fa 'Monospace' -fs 14 5 You can also Ctrl-Right mouse click for temporary change of font size
2You can add the following as an example to your ~/.Xresources file:
! Use a truetype font and size.
xterm*faceName: Monospace
xterm*faceSize: 14Then run the following:
xrdb -merge ~/.Xresources 2 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
2One 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.
you can also simply test them with :
xterm -fn "--clean--*---*---*---*-*"
after sel with xfontsel
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 1 If you are using code::blocks for C/C++ Development in ubuntu, then i would recommand changing your terminal to the gnome-terminal and to do so go to Settings > Enviorment > General Settings and then change the default terminal to the gnome-terminal.