I don't know if this is an absolute fix, but it is a fix.
It's still a mystery why xscreensaver's JPG loading works for /most/
users of Mandrake 9.0 but not for /any/ of my machines -- according to
gdb, the problem was the GType system not being initialized, so how could it be
initialized for some installations and not for others?
There was also a benign bug where the xlib_rgb_init is called twice
(according to the docs, gdk_pixbuf_xlib_init also calls xlib_rgb_init)
here's the patch of my changes:
--- xscreensaver-4.05/driver/xscreensaver-getimage.c 2002-05-29 16:49:34.000000000
-0400
+++ xscreensaver-4.05a/driver/xscreensaver-getimage.c 2002-09-29 17:20:02.000000000
+-0400
@@ -437,6 +437,9 @@
GdkPixbuf *pb;
Display *dpy = DisplayOfScreen (screen);
char *filename = get_filename (dpy, ac, av);
+#ifdef HAVE_GTK2
+ GError *gerr = NULL;
+#endif /* HAVE_GTK2 */
if (!filename)
{
@@ -448,11 +451,15 @@
fprintf (stderr, "%s: loading \"%s\"\n", progname, filename);
gdk_pixbuf_xlib_init (dpy, screen_number (screen));
+#ifndef HAVE_GTK2
xlib_rgb_init (dpy, screen);
+#else
+ g_type_init();
+#endif
pb = gdk_pixbuf_new_from_file (filename
#ifdef HAVE_GTK2
- , NULL
+ , &gerr
#endif /* HAVE_GTK2 */
);
@@ -526,6 +533,10 @@
else if (filename)
{
fprintf (stderr, "%s: unable to load %s\n", progname, filename);
+#ifdef HAVE_GTK2
+ fprintf (stderr, "%s: reason %s\n", progname, gerr->message);
+#endif /* HAVE_GTK2 */
+
goto FAIL;
}
else
--
Gary Lawrence Murphy - [EMAIL PROTECTED] - TeleDynamics Communications
- blog: http://www.auracom.com/~teledyn - biz: http://teledyn.com/ -
"Computers are useless. They can only give you answers." (Picasso)