After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 360984 - use icons for the menu
use icons for the menu
Status: RESOLVED FIXED
Product: gdm
Classification: Core
Component: general
2.16.x
Other All
: Normal enhancement
: ---
Assigned To: GDM maintainers
GDM maintainers
Depends on: 422958
Blocks:
 
 
Reported: 2006-10-09 19:53 UTC by Sebastien Bacher
Modified: 2007-07-29 02:30 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
patch from Ubuntu (4.05 KB, patch)
2006-10-09 19:54 UTC, Sebastien Bacher
rejected Details | Review
updated patch (4.75 KB, patch)
2007-01-16 11:23 UTC, Brian Cameron
none Details | Review
upated index.theme (21.73 KB, patch)
2007-01-16 11:24 UTC, Brian Cameron
reviewed Details | Review
updated patch (4.50 KB, patch)
2007-03-21 12:47 UTC, Brian Cameron
reviewed Details | Review
icons in a tarball (15.00 KB, application/x-tar)
2007-03-21 12:49 UTC, Brian Cameron
  Details
New patch w/ backup icons (6.21 KB, patch)
2007-07-05 17:41 UTC, Michael Terry
committed Details | Review
24x24/Makefile.am (929 bytes, text/plain)
2007-07-05 17:42 UTC, Michael Terry
  Details
Patch using builtin icons (5.48 KB, patch)
2007-07-15 20:00 UTC, Michael Terry
none Details | Review

Description Sebastien Bacher 2006-10-09 19:53:06 UTC
Ubuntu is using that patch, some of the icons are specific to Ubuntu though
Comment 1 Sebastien Bacher 2006-10-09 19:54:08 UTC
Created attachment 74372 [details] [review]
patch from Ubuntu
Comment 2 Brian Cameron 2006-10-17 19:58:19 UTC
Added to CVS head and 2.16.  Thanks.  This looks cool.
Comment 3 Sebastien Bacher 2006-10-17 20:06:42 UTC
Thank you for commiting the change. Apparently you commited the patch with the Ubuntu specific icons too (gnome-session-*), it might be an issue. Are they simply not display if not available or will people get a "broken icon" sign?
Comment 4 Brian Cameron 2006-10-17 21:08:04 UTC
Thanks Sebastien for noticing this.  I was fooled by running gdmgreeter with DOING_GDM_DEVELOPMENT=1 and icons show up there - but I forgot they showed up there before also.

Yes, I do notice broken icon images.  I also notice that "Configure Login Manager" and "Remote login via XDMCP" do not have icons.  I'd think they probably should in case the user turns these features on.  I'm guessing you have them off by default in the GDM configuration so you didn't realize you need icons there?

Would you be willing to share the Ubuntu icons or should I work to get some created?  Also where do you install the icons just so I can ensure I put them in the right place.

I'm reopening this bug until I get the icons figured out.
Comment 5 Brian Cameron 2007-01-16 11:23:21 UTC
Created attachment 80379 [details] [review]
updated patch


Attaching a patch that applies to CVS head and also which specifies icons that Calum Benson (GNOME UI) approves of.  However, still seeing problems since some of the icons don't seem to display properly unless gnome-settings-daemon is running.  Looking into why this is the case.  Perhaps we should use other icons or figure out why g-s-d is needed?

The specific four icons that have problems are:

 preferences-desktop-locale (Select Lanugage)
 user-desktop (Select Session)
 preferences-desktop-remote-desktop (Remote Login via XDMCP)
 gnome-logout (Disconnect/Quit)

These icons seem to require gnome-settings-daemon to display, which
isn't running when GDM is running, obviously.  But Calum doesn't
understand why these icons would require g-s-d to be running for them
to work.

Calum provided me with the attached index.theme file which you can use
to replace the one in /usr/share/icons/hicolor/index.theme.  You will
notice that if you don't update this file that some additional icons
do not display properly.  I think this is a bug with the hicolor theme
that Calum plans to fix by making sure the attached index.theme file
gets updated upstream so it matches the attached version.
Comment 6 Brian Cameron 2007-01-16 11:24:11 UTC
Created attachment 80381 [details] [review]
upated index.theme


This file, when installed to /usr/share/icons/hicolor/index.theme fixes some of the icon display problems.  Calum says that the fixes in this file will be going upstream.
Comment 7 Brian Cameron 2007-03-21 12:47:44 UTC
Created attachment 85037 [details] [review]
updated patch


This patch updates the icon names to the ones Calum recommends, and also applies cleanly against HEAD.

Note that for this to work we need to add the actual icons to the hicolor theme, and also update its index.html file with the fixes in the other attachment.  I'm working with Calum to make this happen.  Once the icons are in place, I will apply this patch.
Comment 8 Brian Cameron 2007-03-21 12:49:47 UTC
Created attachment 85038 [details]
icons in a tarball


this patch is a tarball containing the icons Calum proposes using.
Comment 9 Brian Cameron 2007-03-21 12:51:13 UTC
Note you need to install the icons to /usr/share/icons/hicolor/24x24/actions,
update the /usr/share/icons/hicolor/index.theme with the one attached in this bug, and apply the patch to see GDM working with icons in the menu.
Comment 10 Brian Cameron 2007-04-10 08:20:49 UTC
Note that to get this patch upstream, we will need to do some work to integrate the icons as described in bug #360984.  This seems like a bit of work, not sure when I'll have time to wrap up this.  Anybody want to help?
Comment 11 Brian Cameron 2007-04-10 08:21:31 UTC
Doh, sorry, I referenced the same bug number.  I meant bug #422958.
Comment 12 Brian Cameron 2007-06-25 03:10:02 UTC
Note that the gnome-icon-theme maintainer said that a bunch of work is needed to properly install these icons.  I haven't had time to do this, so if someone wants to help, that would be great.  Refer to bug #422958 for more information.
Comment 13 Michael Terry 2007-07-05 17:41:25 UTC
Created attachment 91262 [details] [review]
New patch w/ backup icons

This patch also installs the icons to a gdm-specific location ($pkgdatadir/icons/hicolor) as backups.  This way gdm doesn't need to depend on gnome-icon-theme and will be guaranteed to always have the icons.

It does change one thing from the previous patch -- rather than using the icon "gnome-logout", it uses "system-log-out" per the icon naming spec.

So to make this work, apply this patch, create a new 24x24 dir in pixmaps/, put in the following Makefile.am, drop in your icons and copy in gnome-logout.png from the gnome-icon-theme as system-log-out.png, and you're done.

I have tested the icon installation part of this, but I haven't tested that the icons come up like expected, because I couldn't figure out how to test new gdm greeter without closing current gdm.  ::sheepish look::  But the code was simple enough that I'd figured I'd submit anyway.  Please test.
Comment 14 Michael Terry 2007-07-05 17:42:29 UTC
Created attachment 91263 [details]
24x24/Makefile.am

Makefile.am for pixmaps/24x24/ dir
Comment 15 Brian Cameron 2007-07-09 23:15:36 UTC
Michael...

I applied your patch to GDM 2.19.4.  However, it doesn't seem to work, and I'm not sure why.  It seems that all the icons show up as invalid icons when you run GDM as GDM.  

If you run gdmgreeter in your session by setting this environment variable DOING_GDM_DEVELOPMENT=1, and then run /usr/lib/gdmgreeter, it works okay.  I think because gnome-settings-daemon is running and this seems to help programs find the right icons.

I'm guessing there is some problem with GDM not knowing how to find the icons or what theme it is using?  Not sure.  Could you take a look.  You should be able to test by running "gdmflexiserver --xnest" to run GDM in a nested window for testing.

A separate issue.  Your recent work changing how GDM installs icons broke "make distcheck".  I worked around this by modifying the toplevel Makefile.am file so distuninstallcheck_listfiles is set as follows:

distuninstallcheck_listfiles = find . -type f -print | grep -v '^\./var/scrollke
eper' | grep -v '^./share/.*/icons/hicolor/icon-theme.cache'

Basically I added the " | grep -v '^./share/.*/icons/hicolor/icon-theme.cache" bit to the end of the string so "make distcheck" won't care about the icon-theme.cache files being left behind after you run "make uninstall".  Could you verify that this is the right approach to fix "make distcheck" or is there a better way to avoid "make distcheck" failing about this?

 
Comment 16 Michael Terry 2007-07-11 01:02:52 UTC
Hmm.  From what I can tell, that is the best way to fix "make distcheck".  Arguably, we could just delete the ./share/gdm/icons/hicolor/icon-theme.cache since we sort of own it (unless we have parallel installations), but we can't do that with the global one.

The listfiles hack seems like the right approach according to the documentation.

It'd be nice if gtk-update-icon-cache deleted the file if no icons were present.

I'll look into the broken icon issue.  But my problem with testing gdm is still that in order to run gdm 'for real' -- with no gnome-settings-daemon -- I need to use gdmflexiserver.  But that always gives me back the same gdm version that I have running.  Do I need to start my main gdm instance from my devel tree?
Comment 17 Brian Cameron 2007-07-11 17:29:55 UTC
If you run gdmflexiserver --xnest, it runs GDM for real.  Remember the GDM GUI runs as the "gdm" user not as your user.  So it shouldn't matter if your
user has gnome-settings-daemon running, the gdm user won't be able to use this.

If I'm wrong about this, you might need to actually log out and log back in
to test.  Note you should be able to just make a code change to gdmgreeter,
make, and "make install" the change.  Then logout and login and it should
just make use of the new greeter.  You shouldn't have to restart GDM.  This
will work as long as the daemon/GUI are the same version.  In other words,
both should be 2.19.x and the greeter should be 2.19.x with minor code changes
you have made.

Note that when you run "make install" it should put the GDM 2.19 on your system
and will likely replace the "real" one you have on your system.  You will need
to reboot or run gdm-restart to cause the daemon to restart with the new 2.19
version.  

You might be in a situation where you have two GDM's installed on your system.
This could happen if your distro installs the "real" one in a non-default
location (e.g. not in /usr/bin, /usr/lib, /usr/libexec, etc.).  If this is
the case, you could do one of the following:

-  Move aside your "real" gdm-binary program and make it instead a symlink to
   the 2.19 one. 

-  Find the script on your system that launches GDM at boot time and tell it
   to launch the 2.19 one instead of the "real" one.

-  You could just move aside your gdmgreeter program and replace it with
   the build one with the code change, but this would require that you build
   the same version of GDM you have on the system.  You can check the version
   # by running gdmflexiserver --command=VERSION.  Since this code change is
   pretty generic, I think a patch based on an older version of GDM would still
   apply okay to the latest version.  This might be an easier approach if the
   above sounds to difficult.

Does this help?
Comment 18 Michael Terry 2007-07-15 20:00:41 UTC
Created attachment 91831 [details] [review]
Patch using builtin icons

Yes, it helped.  I ended up logging out, running the devel version of gdm as my session.  Thanks for the verbose assistance.  :)

When I ran gdm, I saw the icons.  I figured there might be some facet of your setup that was stopping the icons from being found on your end.

So, I figured I would write a patch to do the icon backups the Foolproof Way.  The previous patch is a fine way to do it, but it's arguably a little lazy.  The Foolproof Way involves converting the PNG files to inline C arrays and telling GtkIconTheme about each one.

Near the end of writing it, I realized that what happened with you was probably a failure to call gtk_icon_theme_append_search_path() in all the right places in my previous patch.  But since I was already done with the patch, I'm including it here and recommend it as a more complete and guaranteed way of never seeing broken icons (since icons are builtin to executable, not on file system).  The patch is against current SVN (i.e. with previous patch applied).

If you want a less invasive fix, I bet you could call:
gtk_icon_theme_append_search_path (gtk_icon_theme_get_default (),
                                   GDM_DATADIR G_DIR_SEPARATOR_S "icons");
from gdmlogin.c's and gdmchooser.c's main() functions.  That would, I posit, fix the problem you saw.
Comment 19 Brian Cameron 2007-07-18 09:03:12 UTC
Thanks so much.  This does indeed fix the problem for me.  Marking as fixed.  I think this makes gdmgreeter look more snazzy!
Comment 20 Jonathan Matthew 2007-07-29 02:30:04 UTC
*** Bug 460751 has been marked as a duplicate of this bug. ***