emacscustomizationemacs-faces

How do I set emacs frame background colour?


I am using Emacs 24.3.1 on Ubuntu 13.10 amd64, Xubuntu session running in GUI mode.

unwanted grey frame background

As you can see the frame background is grey. I want it to be white. The following all continue to result in a grey frame background:

The screenshot shows doing M-x describe-face. All the variations are what I have found elsewhere in searching, but nothing works. (Yes I restart after changing .emacs and verify there are no errors. I don't have .Xdefaults/.Xresources.) Even picking a theme from Options > Customize Emacs > Custom Theme doesn't result in the frame background changing colour while everything else does.


Solution

  • When using XFCE or Xubuntu, Gnome 3 applications look ugly as they use no theming. The solution is to symlink $HOME/.config/gtk-3.0 to /usr/share/themes/THEMENAME/gtk-3.0 - see e.g. this thread on the XFCE forums.

    If you do this then whatever is in that theme is what Emacs uses, with it completely ignoring all other attempts to set the background colour. In theory a rule can be added to the theme CSS like

    .emacs { background-color: white;}
    

    but the documentation is not sufficient to work out what to use.

    As a hack, I now have a script to launch Emacs that moves $HOME/.config/gtk-3.0 out the way while Emacs starts:

    #!/bin/bash
    
    cd "$HOME/.config"
    mv gtk-3.0 _gtk-3.0
    emacs "$@" &
    sleep 3
    mv _gtk-3.0 gtk-3.0