Go Back   DaemonForums > Miscellaneous > Guides

Guides All Guides and HOWTO's.

Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   (View Single Post)  
Old 21st December 2011
J65nko J65nko is offline
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 3,503
Default Changing font size in xterm

Several years ago, on what used to be my workstation, I wrote a small script to create some xterms with a different and larger font size then the default. Yes, older age comes with diminishing eyesight for me

This proved to be handy when creating complex regular expressions for grep or friends. Being too lazy to go to the garage through the cold, to unpack that box, connect a keyboard and monitor to it, I decided to google for 'xterm font size unix'.
The most helpful was http://invisible-island.net/xterm/xt....html#how_do_i
How do I change the font size?
Xterm uses fonts given as resource settings. You can switch between these fonts at runtime, using a menu. This is documented in the manpage, in the MENUS section.

X Consortium xterm provides popup menus, by pressing the control key together with the mouse button. Control right mouse button pops up the VT FONTS menu, from which you can select fonts that are specified in xterm's resources. Usually these are in increasing order of size.

Modern xterm provides the menu, plus a feature adapted from rxvt: pressing the shifted keypad plus or minus keys steps through the font menu selections, in order of their size.

Xterm's manpage does not document the syntax for X resources; it is done in the X documentation. If you are instead asking about a problem displaying a given font, it may be due to a problem with your resource settings.
In my case the "shifted keypad plus or minus keys" only made the fonts smaller, not larger, so my quest for a larger font size continued.

The xterm man page is quite long but this site also has a nice version of the xterm man page : http://invisible-island.net/xterm/manpage/xterm.html

The MENU section : http://invisible-island.net/xterm/manpage/xterm.html

If you use 'less' as pager for the man pages .....
 $ grep PAGER .profile      
export PAGER=/usr/bin/less
then you can move that section of xterm(1) with a simple /MENUS

       Xterm  has  four  menus, named mainMenu, vtMenu, fontMenu,
       and tekMenu.  Each menu pops up under the correct combina-
       tions  of  key  and  button presses.  Each menu is divided
       into sections, separated by a horizontal line.  Some  menu
       entries  correspond to modes that can be altered.  A check
       mark appears next to a  mode  that  is  currently  active.
       Selecting  one  of  these  modes toggles its state.  Other
       menu entries are commands; selecting one of these performs
       the indicated function.

       All  of  the menu entries correspond to X actions.  In the
       list below, the  menu  label  is  shown  followed  by  the
       action's name in parenthesis.
A summary of these CONTROL:key and mouse button presses:
  1. Code:
     Main Options
        The  xterm  mainMenu  pops  up  when the "control" key and
           pointer button one are pressed in  a  window.   This  menu
           contains  items that apply to both the VT102 and Tektronix
           windows.  There are several sections: ........
  2. Code:
       VT Options
           The vtMenu sets various modes in the VT102 emulation,  and
           is popped up when the "control" key and pointer button two
           are pressed in the VT102 window.
  3. Code:
       VT Fonts
           The  fontMenu  pops  up  when  when  the "control" key and
           pointer button three are pressed in a window.  It sets the
           font  used  in  the  VT102 window, or modifies the way the
           font is specified or displayed.  There  are  several  sec-
  4. Code:
       TEK Options
           The tekMenu sets various modes in the Tektronix emulation,
           and is popped up when the "control" key and pointer button
           two are pressed in the Tektronix window.  The current font
           size is checked in the modes section of the menu.

So to change the the font size: press the CONTROL key with one hand, and click the right mouse button. A menu appears, with the following font alternatives:
              Default (fontdefault)
                     Set the font  to  the  default,  i.e.,  that
                     given by the *VT100.font resource.

              Unreadable (font1)
                     Set   the   font   to   that  given  by  the
                     *VT100.font1 resource.

              Tiny (font2)
                     Set  the  font  to   that   given   by   the
                     *VT100.font2 resource.

              Small (font3)
                     Set   the   font   to   that  given  by  the
                     *VT100.font3 resource.

              Medium (font4)
                     Set  the  font  to   that   given   by   the
                     *VT100.font4 resource.

              Large (font5)
                     Set   the   font   to   that  given  by  the
                     *VT100.font5 resource. 

             Huge (font6)
                     Set  the  font  to   that   given   by   the
                     *VT100.font6 resource.
Problem solved
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump

Last edited by J65nko; 21st December 2011 at 06:55 AM. Reason: fixing some VBulletin codes
Reply With Quote

font size, x window, xterm

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to change the font size? atop xterm, aterm, etc jb_daefo General software and network 12 13th July 2010 10:42 AM
font-misc-ethiopic & font-misc-meltho Beastie General software and network 0 27th February 2009 11:21 AM
CLI font size idefix FreeBSD General 3 7th February 2009 11:19 AM
changing Firefox's font(s)? spiderpig General software and network 4 5th June 2008 03:09 PM
Wrong screen resolution, font size etc. PatrickBaer FreeBSD General 10 14th May 2008 10:00 AM

All times are GMT. The time now is 10:00 PM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick