Change default XTerm font size in Cygwin

darrenc picture darrenc · Oct 18, 2011 · Viewed 22.4k times · Source

Anyone know how to change the default font size when you open a new XTERM windown in Cygwin?

I have found references of putting information into the ~/.Xresources file but that file doesn't exist for me...

Thanks

Answer

Gonzalo picture Gonzalo · Jan 20, 2012

here is how I fixed it:

  1. Make sure your are in your home directory, so "cd" and "pwd" to see that you are there
  2. Create the .Xresources file, just like "touch .Xresources"
  3. Edit it with your favourite editor ;)
  4. Here is my set up, it is actually very useful, it includes a side bar, and removes the top bar:

    Xft*antialias:          true
    Xft*autohint:           true
    XTerm*background:   black
    XTerm*foreground:   grey
    XTerm*cursorColor:  grey
    XTerm.vt100.geometry:   79x25
    XTerm*scrollBar:    true
    XTerm*rightScrollBar:   true
    XTerm*saveLines:    10000
    XTerm*faceName:     BitStream Vera Sans Mono
    XTerm*faceSize:     12
    XTerm*toolBar:      off
    
  5. You can test this changes with "xrdb -merge .Xresources" and then opening another xterm

  6. In order to save this changes you are going to have to create or modify another file, "touch .startxwinrc", open up your editor and include the following:

    #!/bin/sh
    
    xrdb -merge ~/.Xresources
    
  7. Restart your XWin Server, and you will have a prettier cygwin terminal.