gdm does not respect all the given color variables in a gtkrc which is included with the gdm theme

Bug #331445 reported by Kenneth Wimer
46
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gdm (Ubuntu)
Fix Released
Medium
Cody Russell

Bug Description

Binary package hint: gdm

Setting a gtkrc from the GUI (System->Administration->Login Manager) works correct, however when including the same gtkrc in the gdm theme itself does not respect the color variables for radio boxes.

Revision history for this message
Cody Russell (bratsche) wrote :

What's the easiest way for me to reproduce this bug? I've never really messed around with themes in gdm before so it's not clear what I should do to include the gtkrc.

Revision history for this message
Kenneth Wimer (kwwii) wrote :

If you install the latest gdm theme (ubuntu-gdm-theme in bzr) you'll notice that although there is a gtk-2.0 dir with a valid gtkrc it is not respected correctly (the select session pop-up from the options menu does not seem to respect any theme colors). A hint here, the new gtkrc colors have a dark bg and white text.

If you select the same gtkrc from the GUI (described above) it all works fine.

Revision history for this message
Martin Pitt (pitti) wrote :

Cody, Ken vanDine, can either of you work on this bug?

Revision history for this message
Cody Russell (bratsche) wrote :

I have another bug I need to try to work on first, and after that I can work on this one unless Ken is working on it.

Earlier doing a really quick grep through the sources I found something that is possibly relevant, but I didn't spend the time yet to be sure. From greeter_parser.c there is a comment that says:
      /*
       * It might be nice if we allowed this property to also supply a gtkrc file
       * that could be included in the theme. Perhaps we should check first in
       * the theme directory for a gtkrc file by the provided name and use that
       * if found.
       */

Revision history for this message
Kenneth Wimer (kwwii) wrote :

RIght, the current behaviour is that when there is a gtk-2.0 dir with a valid gtkrc in the theme dir gdm will use that gtkrc BUT it apparently does not respect everything as it should as there are problems (only with radio box's it seems) and specifying a gtkrc from the login-window GUI fixes the problems. We cannot simply ship with the gtkrc defined as such as it would create problems with updates (I think, correct me if I am wrong).

Revision history for this message
Martin Pitt (pitti) wrote :

Tentatively assigning to Cody then; please unassign if you have trouble with this. Thanks!

Changed in gdm:
assignee: nobody → bratsche
status: New → Triaged
Revision history for this message
Cody Russell (bratsche) wrote :
Revision history for this message
Cody Russell (bratsche) wrote :

Sorry about the last patch. I normally have a 'write-file-functions 'delete-trailing-whitespace hook in my .emacs so it fixed every line that had extra whitespace. :)

Revision history for this message
Cody Russell (bratsche) wrote :

Tested this today and I think it works. Can you verify?

Revision history for this message
Martin Pitt (pitti) wrote :

I'll sponsor this, looks straightforward (I haven't tested it myself, though).

This should not be an issue for gdm 2.24, thus no need to forward this upstream.

Martin Pitt (pitti)
Changed in gdm:
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gdm - 2.20.8-0ubuntu8

---------------
gdm (2.20.8-0ubuntu8) jaunty; urgency=low

  * Add 72_read_theme_gtkrc.patch: Respect color variables in a
    theme's gtkrc. Thanks to Cody Russell for the patch! (LP: #331445)
  * 35_gdm.conf.patch: Change default background color to black, as
    requested by artwork team (will better match the future Jaunty
    background image).
  * Add 73_disable_user_input_tooltip.patch: Disable tooltip for
    login/password input line. It is confusing if it pops up
    automatically (depending on screen resolution this happens if the
    input box is in the screen center), and not all that helpful. As
    per request from artwork team. (LP: #331448)

 -- Martin Pitt <email address hidden> Tue, 24 Feb 2009 14:09:36 +0100

Changed in gdm:
status: Fix Committed → Fix Released
Revision history for this message
Cody Russell (bratsche) wrote :

This checks to see if you have a gtkrc property first, and if not it falls back to using {themedir}/gtk-2.0/gtkrc

Revision history for this message
Cody Russell (bratsche) wrote :

I happened to notice what appears to be a memory leak in nearby code. This patch should fix it.

Revision history for this message
Cody Russell (bratsche) wrote :

kwwii, can you test this one? :)

Martin Pitt (pitti)
Changed in gdm:
status: Fix Released → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gdm - 2.20.8-0ubuntu9

---------------
gdm (2.20.8-0ubuntu9) jaunty; urgency=low

  * 72_read_theme_gtkrc.patch: Check to see if you have a gtkrc
    property first, and if not it falls back to using
    {themedir}/gtk-2.0/gtkrc. Patch by Cody Russell. (LP: #331445)
  * 74_greeter_theme_memleak.patch: Fix memory leak in the greeter's
    theme reader, thanks to Cody Russell for spotting this and the
    patch!

 -- Martin Pitt <email address hidden> Wed, 25 Feb 2009 08:51:05 +0100

Changed in gdm:
status: In Progress → Fix Released
Revision history for this message
Kenneth Wimer (kwwii) wrote :

Erm, still no luck. I still get exactly the same behavior as before :(

Revision history for this message
Cody Russell (bratsche) wrote :

Ken sat down with me at the office and showed me the exact behavior, so together we managed to fix this for good. :)

For some reason gdm_session_init() is blowing away some of our theming information. Investigating why looks like it will take significant time, and Ken says we're planning to move to a new gdm next release so quite frankly it just doesn't seem worth the investment of time. This patch simply moves the RC parsing to before gdm_session_init() gets called.

Revision history for this message
Martin Pitt (pitti) wrote :

Thanks. Please reopen bugs if they aren't fixed, so that they don't fall off the radar. I'll sponsor this after the alpha-5 release today, assinging back to me.

Changed in gdm:
assignee: bratsche → pitti
status: Fix Released → In Progress
Revision history for this message
Martin Pitt (pitti) wrote :

Cody, does this patch replace the one in comment 14, or does it need to be done in addition?

Changed in gdm:
status: In Progress → Incomplete
Revision history for this message
Cody Russell (bratsche) wrote :

Sorry for the confusion. It should just replace the previous patch.

Changed in gdm:
status: Incomplete → New
Martin Pitt (pitti)
Changed in gdm:
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gdm - 2.20.8-0ubuntu10

---------------
gdm (2.20.8-0ubuntu10) jaunty; urgency=low

  * 72_read_theme_gtkrc.patch: Take three, now confirmed to fully fix the
    issues. (LP: #331445)

 -- Martin Pitt <email address hidden> Fri, 27 Feb 2009 10:30:47 +0100

Changed in gdm:
status: Fix Committed → Fix Released
Revision history for this message
lunch (launch-mailinator-com) wrote :

This fixes Kenneth's theme. Howerver I still get the error when adding the "Mist" gtkrc to the "HumanCircle" GDM theme. The radio buttons in the session menu are Murrine-style, not Mist like they should, and have Human colours.

Changed in gdm:
status: Fix Released → Confirmed
Martin Pitt (pitti)
Changed in gdm:
assignee: pitti → bratsche
Revision history for this message
Cody Russell (bratsche) wrote :

Where did you put the Mist gtkrc? Try putting it in /usr/share/gdm/themes/HumanCircle/gtk-2.0

Revision history for this message
lunch (launch-mailinator-com) wrote :

I've put it exactly there. The other widgets are drawn by the Mist engine.

Revision history for this message
Cody Russell (bratsche) wrote :

Where would it be pulling in Murrine engine from? Is there another theme that is loading that first? If that's the case then there's nothing we can do about it from the gdm code because GTK can only load a single engine module at a time.

Revision history for this message
lunch (launch-mailinator-com) wrote :

Well, it's also using colours from the Human GTK theme for symbolic colours: https://launchpad.net/bugs/337106
How does it get them? Human uses the murrine engine - if I replace the Human theme in /usr/share/themes/Human with Human-Clearlooks, the session menu has Clearlooks radio buttons.

Revision history for this message
Kenneth Wimer (kwwii) wrote :

It is possible to include references to two different gtk engines within one gtkrc. It is one of those things you don't want to do (for several reasons) but it is possible.

Revision history for this message
Kenneth Wimer (kwwii) wrote :

The current GDM should be including colors from the gtkrc within the theme itself (ie the dark colors, which are included in /usr/share/gdm/themes/Human/gtk-2.0/gtkrc).

Revision history for this message
lunch (launch-mailinator-com) wrote :

Kenneth: Please replace /usr/share/gdm/themes/Human/gtk-2.0/gtkrc with /usr/share/themes/Mist/gtk-2.0/gtkrc for testing. I get colours and radio buttons from /usr/share/themes/Human/gtk-2.0/gtkrc then, but the other widgets are drawn by the Mist engine. The Mist gtkrc only references the Mist engine.

Revision history for this message
lunch (launch-mailinator-com) wrote :

I noticed that the Mist gtkrc is applied correctly if I remove the symbolic colours and that Kenneth's gtkrc isn't if I add symbolic colours to it. If bug #337106 was fixed, this problem would probably be solved, too.

Changed in gdm:
importance: Undecided → Medium
Revision history for this message
Sebastien Bacher (seb128) wrote :

The issue is deprecated in the karmic version

Changed in gdm (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.