ARCHIVED: In Emacs, under the X Window System, how do I change the default settings for colors, fonts, and geometries?

This content has been archived, and is no longer maintained by Indiana University. Information here may no longer be accurate, and links may no longer be available or reliable.

In the X Window System, you can choose default settings for Emacs in the X resources database (.Xresources). Here are a few examples of lines you can add to your ~/.Xresources files to cause Emacs to start up with alternate colors, fonts, and geometries:

  Emacs*background:             Blue
  Emacs*font:                   7x14
  Emacs*foreground:             Black
  Emacs*geometry:               80x30
  Emacs*pointerColor:           yellow

After making the changes, at the command line enter:

  xrdb ~/.Xresources

You should also have the following lines in your .xinitrc file to ensure that your resources are read upon starting the X server:

  if [ -f $HOME/.Xresources ]; then
      xrdb $HOME/.Xresources;
  fi

At Indiana University, for personal or departmental Linux or Unix systems support, see Get help for Linux or Unix at IU.

This is document abdn in the Knowledge Base.
Last modified on 2018-01-18 08:48:01.