Re: [gdm-list] GTK theme for thegreeter screen?
- From: Brian Cameron <Brian Cameron Sun COM>
- To: Sebastien Bacher <seb128 debian org>
- Cc: gdm-list gnome org
- Subject: Re: [gdm-list] GTK theme for thegreeter screen?
- Date: Mon, 13 Feb 2006 17:19:12 -0800
Le jeudi 09 février 2006 à 14:37 -0800, Brian Cameron a écrit :
gdm.conf has that comment:
"# If to allow changing the GTK+ (widget) theme from the greeter.
# this only affects the standard greeter as the graphical greeter does
# have this ability."
Is there any technically reason that applying a theme works for the
standard banner but not the greeter one? Do you have any idea of what
change would be required for that?
Currently the only way for gdmgreeter users to change the theme
using a GUI is to run gdmsetup from the login screen, although you
need to know the root password and GDM's configuration has to be
setup to allow running gdmsetup from the login program.
Hum, so you can change the GTK theme for the greeter? I've just tried to
run the "configure login manager" option and gdmflexiserver just closes
or crahs, I'll open a bug about that later.
I think the gdmflexiserver problem is fixed in 188.8.131.52. The problem
was the gtk_init call needs to happen after the --command argument
You can use the GtkRc option in the GDM config file to specify the
GtkRc file used by GDM. However this affects both gdmlogin and
*any* gdmgreeter theme the user picks.
If you modify the GtkRc file used by GDM to make your gdmgreeter
theme look right, you should probably make sure it also looks
reasonable for gdmlogin.
As long as it looks okay in the default gdmgreeter theme and gdmlogin,
it's probably okay if the default GtkRc makes other themes look
weird. If the user wants to switch to a different gdmgreeter theme,
they can always remove the GtkRc setting if they don't like it.
It would probably be better if each gdmgreeter theme could specify
in the xml format what gtkrc file to use for the theme, then each
theme could provide its own gtkrc file for customizing the entry
field, etc. The code would need to be enhanced to do this and
I would accept a patch to add this sort of feature.
The reason that we support changing themes for the gdmlogin program
is that some users require the accessibility themes (high-contrast,
low-contrast, etc.). These themes only have meaning when using gdmlogin
which uses GTK+ widgetry whereas gdmgreeter uses libgnomecanvas and
does not really use GTK theming much, if at all.
Right, the concern is to have the colors of the F10 menu matching the
Yes, you'ld have to do this via the GtkRc file defined in the
GDM config file, but this will also affect the menus in gdmlogin, mind
1) gdmgreeter has no real mechanism to support switching the theme to
high-contrast/low-contrast/etc. and even if it did support this
feature, gdmgreeter does not yet have any high-contrast/low-contrast
themes. So they would need to be designed and included with
GDM as well.
But the theme would apply to the GtkMenu no?
Right, there are two issues with supporting changing themes for
1) There should be gdmgreeter themes for a11y users, for example a
high-contrast and low-contrast theme that could be picked instead
of circles or happygnome. It's be nice if users could switch to
such a11y themes by hitting some key or gesture on the login
screen. Not sure exactly how this would work, though. You don't
really want the user to have to navigate some menus to be able
to switch to a theme they need to use in order to see what's on
2) The GTK widgets (like GtkMenu, the entry field, etc.) would need
to change to high-contrast/low-contrast/etc. if the user picked
that gdmgreeter theme. So probably, the theme would need to be
enhanced to specify which GTK Theme to use or have a specific
So there are really two possible ways to solve your problem:
1) Make it possible to specify a different GTK+ theme per gdmgreeter
2) Make it possible to speicfy a different GtkRc file per gdmgreeter
Probably #2 is really what you want because its probably better for
the theme to have complete control on the look of the menu rather
than have to depend on a GTK theme being installed. Also for a11y
purposes, being able to specify a gtkrc file per theme can be used
to meet the a11y need.
If you coded #2, I'd accept a patch to GDM CVS to make GDM support
It would be cool if people were interested in improving gdmgreeter so
it could be used by accessible users, but I think the above issues
is enough work that it will probably take a good while before
gdmgreeter is a real option for such users. And since they can just
use gdmlogin today, perhaps there isn't a real need here to make
All what you describe makes sense but is not trivial and would require
some work. My question was basically about setting a GTK theme so the
new menu can have colors matching the theme used by example.
Right. I understand better now what you are looking for. I think
updating the theme XML file to support a tag where you can specify
a theme specific gtkrc file that can be included with the theme is
probably the best approach.
Enhancing gdmgreeter so users can switch the theme would get us one
step closer, but probably isn't as hard as dealing with issues #2
and #3 mentioned above.
Is there any way to set a GTK theme for the gdmgreeter at the moment?
The gdm.conf comment suggests that's not implemented, or is that a
different configuration key?
Yes, you can do it with the current GDM by using the GtkRc configuration
option in the config file. The problem is that this key is shared by
gdmgreeter and gdmlogin so if you make the background color of the
menu a weird color that makes sense for your gdmgreeter theme it might
look really bad in gdmlogin. Since a11y users need to switch to
gdmlogin, it's a bad idea to make gdmlogin look bad by default if the
user switches it.
Even then, it isn't the end of the world, the user can always remove
the GtkRc setting if they don't like the way it looks.
Hope this helps explain why the code works as it does.
Yeah, thanks for the clear and detailed reply as usual :) There is some
extra material compared to what I was looking for, but the explanation
are interesting and there is some ideas that could be worked for the
Right. It's good to discuss how theming relates to GDM since it's
complicated. GDM has its theming, GTK has its theming, and there is
also the gtkrc file that GDM supports. It's complicated to get them
all working together. And a11y fits into all this also.
] [Thread Prev