You are not logged in.

#1 2007-03-23 19:01:46

1311219
Member
From: Sweden
Registered: 2007-01-09
Posts: 121

[SOLVED] Window colors and the .Xdefaults file.

Normally I use a very lightweight x11 setup on my system (ratpoison+a few applications like firefox), but recently I have been experimenting with some more unnecessary eye-candy on an usb memory (beryl and kde... nice:cool:), and after using the color settings program that comes with kde I started to think if it would be possible to do something like setting a new background color for all windows (instead of the gray color) using the .Xdefaults file.

So after booting back to my normal system (with the ratpoison wm), I changed my (xterm focused tongue) .Xdefaults file:

XTerm*faceName: Bitstream Vera Sans Mono:size=11
XTerm*boldFont: Bitstream Vera Sans Mono:style=Bold:size=11
XTerm*loginShell: true
XTerm*scrollBar: false
XTerm*eightBitInput:   false
XTerm*metaSendsEscape: true

*background: black
*foreground: green

XTerm*color0:  black
XTerm*color1:  red
XTerm*color2:  green
XTerm*color3:  yellow
XTerm*color4:  blue
XTerm*color5:  magenta
XTerm*color6:  cyan
XTerm*color7:  white

(Note that I removed XTerm from the background and foreground.)

Result! The xpdf application changed colors!
However this setting doesn't affect firefox thunderbird or oo.org...:/

The kde color manager does change the colors of firefox and thunderbird, so hows that possible (I tried `xrdb>~/.Xdefaults` and disactivate the global coloring option in kde and then running xrdb ~/.Xdefaults on my usb system, but that didn't work either)?

Last edited by 1311219 (2007-03-24 12:05:13)

Offline

#2 2007-03-23 19:24:07

stb
Member
Registered: 2007-03-13
Posts: 40

Re: [SOLVED] Window colors and the .Xdefaults file.

I bet because they are not linked against a Toolkit like Gtk or Qt. For instance, you are able to change the colors in opera which is linked against Qt.

Offline

#3 2007-03-23 19:30:49

1311219
Member
From: Sweden
Registered: 2007-01-09
Posts: 121

Re: [SOLVED] Window colors and the .Xdefaults file.

So you mean that's the reason it can't be changed from the .Xdefaults? then how should I do to change the colors?:/

Offline

#4 2007-03-23 19:45:02

stb
Member
Registered: 2007-03-13
Posts: 40

Re: [SOLVED] Window colors and the .Xdefaults file.

You could use a theme for firefox, or another browser wink. Or wait for another answer from someone who knows a bit more than I do.

Offline

#5 2007-03-23 19:45:34

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: [SOLVED] Window colors and the .Xdefaults file.

Different toolkits do it different ways.  Most modern applications (sadly) don't use the X Resource database anymore, but instead use their own mechanism.  gtk apps (like firefox) are controlled via your gtkrc (or gtk theme, at a borader level).

Offline

#6 2007-03-23 19:50:04

1311219
Member
From: Sweden
Registered: 2007-01-09
Posts: 121

Re: [SOLVED] Window colors and the .Xdefaults file.

Thanks for the fast answers.
So, I can change colors of xterm and xpdf using .Xdefaults and change the colors of firefox and thunderbird by changing the settings for gtk? then I only need a way to change oo.org(unless it uses gtk to?).:)

Last edited by 1311219 (2007-03-23 19:58:03)

Offline

#7 2007-03-23 20:10:34

skymt
Member
Registered: 2006-11-27
Posts: 443

Re: [SOLVED] Window colors and the .Xdefaults file.

OO.Org uses GTK if you tell it to. Just set the env var "OOO_FORCE_DESKTOP" to "gnome" (probably in your xinitrc).

Offline

#8 2007-03-23 20:19:27

1311219
Member
From: Sweden
Registered: 2007-01-09
Posts: 121

Re: [SOLVED] Window colors and the .Xdefaults file.

Thanks! now I only have to find a way to change the default colors in gtk... I suppose it's similar to xrdb(I saw something about an gtk.rc.mine file somewhere)?

Update: I will have to create a new theme, right?

btw/OffTopic: OO.org looks a bit different when it uses gtk, what does it normally use(or is it just different themes?)?

Last edited by 1311219 (2007-03-23 20:33:14)

Offline

#9 2007-03-23 20:35:22

skymt
Member
Registered: 2006-11-27
Posts: 443

Re: [SOLVED] Window colors and the .Xdefaults file.

1311219 wrote:

Thanks! now I only have to find a way to change the default colors in gtk... I suppose it's similar to xrdb(I saw something about an gtk.rc.mine file somewhere)?

Most people use themes like those on Gnome-look. The theme syntax is human-readable, so download one you like and tweak it to use your custom colors.

You can switch GTK themes using a program like gtk-chtheme (in community).

btw/OffTopic: OO.org looks a bit different when it uses gtk, what does it use normally(or is it just different themes?)?

AFAIK it uses its own custom cross-platform toolkit. Actually, it always uses the custom toolkit, but the FORCE_DESKTOP variable makes it try to copy your GTK (or QT if you set it to "kde") look. It doesn't manage 100% integration, the menubars and dialogs still look a little "off." Firefox and Thunderbird use a similar tactic, but always copy GTK.

Last edited by skymt (2007-03-23 20:36:11)

Offline

#10 2007-03-23 20:41:38

1311219
Member
From: Sweden
Registered: 2007-01-09
Posts: 121

Re: [SOLVED] Window colors and the .Xdefaults file.

Thanks everyone, hopefully this solves everything!:)
I will post here tomorrow if it didn't work, but I think everything will.

UPDATE: After experimenting to get some themes to work, I think I've got it all working, now I only have to modify the gtkrc a little to get the colors right cool, added solved flag to the topic name.:)

Last edited by 1311219 (2007-03-24 12:08:38)

Offline

Board footer

Powered by FluxBB