How can I change the default background color of all windows in X?
Window decorations (title bar, borders, etc.) are handled by the window manager, but window contents (menus, etc.) are handled by the application itself. There is no standard mechanism to configure parameters such as background colors.
Most applications use a widget toolkit, such as GTK (used by Gnome), Qt (used by KDE), Motif, Athena (an old, pretty basic one), etc. Some widget toolkits offer a cross-application configuration mechanism. Old-timey toolkits such as Athena and Motif can be configured through X resources. Gtk and Qt have themes, which allow things such as background colors to be configured for all applications using that toolkit. A word of caution with themes: some applications use colors for elements that are not defined by the scheme, and these colors are not always configurable, which can lead to nasty situations like black-on-black because the foreground color is hard-coded in the application and the background color comes from the theme.
PCManFM, Leafpad and Audacity are all based on GTK (it's the most popular toolkit these days). This explains why their appearance is similar. You can change their appearance by selecting a different theme. There is a selection of themes available on the Gnome site; your distribution probably includes a few of them. Different versions of GTK use different themes; to see what version of GTK a program is linked with, run e.g. ldd /usr/bin/audacity | grep libgtk
and look at the version number after libgtk-
. There are several tools you can use to view and switch GTK themes, including gnome-tweak-tool
and several possibilities listed in the Arch Wiki.
Related videos on Youtube
Velovix
Updated on September 18, 2022Comments
-
Velovix almost 2 years
I've noticed nearly every window, pop-up, right-click menu, and button all take on this same shade of gray. In the attached picture, you see PCManFM, Leafpad, and Audacity all use this color for their menus and backgrounds. This color appears to be #dcdad5, or RGB(220, 218, 213).
The consistency makes me think there might be some kind of config file that specifies what color this is. I'd like to brighten up my desktop a bit. I'm not using a desktop manager, just Awesome WM on Arch Linux. Is there any way I can accomplish this?
-
Jasen about 9 yearshave a look at
.Xresources
but I'm not making any promises. (man 1 xrdb
) -
Gilles 'SO- stop being evil' about 9 yearsThere's no global setting, only one per GUI framework. These are all Gtk applications. Other GUI frameworks include Qt, Motif, etc.
-
-
Gilles 'SO- stop being evil' about 9 yearsX resources only affect frameworks that use them, such as Xaw and Motif. They don't affect Gtk or Qt.