Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 Dec 2009 23:11:08 -0500 (EST)
From:      doug <doug@fledge.watson.org>
To:        freebsd-questions@FreeBSD.org
Subject:   Setting fonts and other defaults in Xorg
Message-ID:  <alpine.BSF.2.00.0912202157330.32571@fledge.watson.org>

next in thread | raw e-mail | index | archive | help
In trying to upgrade Xorg and firefox I ended up learning about portmaster and 
how to solve some things in xterm that have been bugging me for longer than I 
will admit to having and not fixing.

First portmaster. If you find portupgrade too complex or for any other reason do 
not want to use it, this port is well worth a look. For one, it is written in 
shell script and so has no requirements. The latest version even has the -PP 
option which for me is the only way to go with Xorg and KDE.

In getting Xorg 7.4 installed and using twm to complete setting up my work 
station, I found the black background intolerable. I turns out the answer to 
changing this is remarkably hard to find. And I did not. Warren Block provided 
the answer as an aside to trying to help me with larger Xorg woes. The other 
thing that bugged me for so long is/was setting fonts in xterm. I often want to 
use the small or tiny setting which are (at least on my PCs/laptops) less than 
ideal. All of this turns out to be relatively straight forward.

  1) background: xsetroot -grey (is one choice). This command can be added to
         /usr/local/lib/X11/xdm/Xsetup_0 or to .xinitrc (according to Google).

  2) fonts: There are a couple of cool commands, fc-list and xfontsel to list the
         installed fonts. I used these to set fonts after testing options by
         starting some variations with

            xterm -fa 'Liberation Mono' -fs 10
            xterm -fa "Bitstream Vera Sans Mono" -fs 9

         After finding what you like simply add the lines to ~/.Xdefaults:

            XTerm*faceName: Liberation Mono
            XTerm*faceSize: 10

You can make similar changes to /usr/local/share/X11/app-defaults to change 
other things. Most the file here use the format given by xfontsl. I think a 
section in the handbook that documented some of the above as well as the 
relation between .xsession, .xinitrc, .Xdefaults, .xresource and other files 
would be helpful especially to new users. There is probably other basic 
information, I would take a shot at it if I had the background.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.0912202157330.32571>