Saturday, August 25, 2012

Customize xterm

Edit the /home/USER/.Xresources to customize the xterminal.  I like green text on a black background, and the default font size is too small for me.  First, run the xfontsel from the terminal, and adjust the parameters to your liking and system availability. The image below shows my fontsel with fmly set to 'fixed',  wght set to 'medium', and pxlsz set to 14.  The english alphabet appears in the window if you have a font that matches your settings.  If the english alphabet is not visible (Chinese or some other alphabet appears) you need to adjust your settings until the english alphabet appears (assuming you want english).  The string between the parameters and the alphabet is used to set the xterm font.  Copy it.

In this case, I copy "-*-fixed-medium-*-*-*-14-*-*-*-*-*-*-*".  Now open or create the /home/USER/.xresources file.  Mine is pasted below, and sets green text - size medium font - on a black background.  My terminal saves the previous 512 lines in the history.
!Comments start with !

xterm*background: black
xterm*foreground: green
xterm*font: -*-fixed-medium-*-*-*-14-*-*-*-*-*-*-* 
xterm*saveLines:  512
See http://invisible-island.net/xterm/ for full xterm documentation.
   The following /home/USER/.xinitrc file checks for an xresources file, then runs xmonad.  This will find your xterm customizations once you run the startx command.
if [ -f $HOME/.xresources ]; then
    xrdb -merge $HOME/.xresources
fi

xmonad

No comments:

Post a Comment