I wrote a plugin few days back
to publish images to Flickr/Picasa. It was tried by many and I had received
various complaints about plugin not getting loaded, even after deploying in
right directory. In some cases they had hit a bug in plugin which would
prevent Gimp from loading the plugin. In recent versions I fixed some bugs
in the plugin and put a top level try-except block with a crash report
dialog, so that any bug in plugin won't go unnoticed silently.

But even after that I kept hearing few cases where users won't see the
plugin loaded and still won't get any crash report.

Today I started working on the same plugin again after some gap. Today I
tried it under two different installations of Gimp - on my Fedora 8 desktop
and in a Ubuntu VM. I am running same version of Gimp at both places, using
same plugin files. Interestingly, the plugin doesn't load in my ubuntu VM,
but it does in my Fedora 8 desktop. I cleaned my $HOME/.gimp-2.4 directory
multiple times, but same result.

Note these observations:
1) I also noticed that when the plugin gets loaded successfully on my fedora
box, the $HOME/.gimp-2.4/pluginrc file gets modified and I see following
entry appended to it:
(plug-in-def "/home/jayesh/.gimp-2.4/plug-ins/publishr.py" 1202602069

I don't see that happening on Ubuntu VM.

2) On BOTH the systems, when the Gimp splash image is diplaying the plugins
it is loading at startup, I DO SEE publishr.py (my plugin file) being
loaded. But I doubt that the register() function gets called in the ubuntu
case. I put a deliberate "raise Exception" just before register() function,
however it doesn't make any difference.

Both are running same gimp version.
$ gimp --version
GNU Image Manipulation Program version 2.4.0-rc3

The dump of gimprc is same on both systems (except for the web-browser
parameter). For Fedora 8 it is as follows.

$ gimp --dump-gimprc
# Dump of the GIMP default configuration

(temp-path "${gimp_dir}/tmp")
(swap-path "${gimp_dir}")
(num-processors 1)
(tile-cache-size 1024M)
(interpolation-type cubic)
(plug-in-path "${gimp_dir}/plug-ins:${gimp_plug_in_dir}/plug-ins")
(module-path "${gimp_dir}/modules:${gimp_plug_in_dir}/modules")
(environ-path "${gimp_dir}/environ:${gimp_plug_in_dir}/environ")
(brush-path "${gimp_dir}/brushes:${gimp_data_dir}/brushes")
(brush-path-writable "${gimp_dir}/brushes")
(pattern-path "${gimp_dir}/patterns:${gimp_data_dir}/patterns")
(pattern-path-writable "${gimp_dir}/patterns")
(palette-path "${gimp_dir}/palettes:${gimp_data_dir}/palettes")
(palette-path-writable "${gimp_dir}/palettes")
(gradient-path "${gimp_dir}/gradients:${gimp_data_dir}/gradients")
(gradient-path-writable "${gimp_dir}/gradients")
(font-path "${gimp_dir}/fonts:${gimp_data_dir}/fonts")
(default-brush "Circle (11)")
(default-pattern "Pine")
(default-palette "Default")
(default-gradient "FG to BG (RGB)")
(default-font "Sans")
(global-brush yes)
(global-pattern yes)
(global-palette yes)
(global-gradient yes)
(global-font yes)
    (width 420)
    (height 300)
    (unit pixels)
    (xresolution 72.000000)
    (yresolution 72.000000)
    (resolution-unit inches)
    (image-type rgb)
    (fill-type background-fill)
    (comment "Created with GIMP"))
    (style intersections)
    (fgcolor (color-rgba 0.000000 0.000000 0.000000 1.000000))
    (bgcolor (color-rgba 1.000000 1.000000 1.000000 1.000000))
    (xspacing 32.000000)
    (yspacing 32.000000)
    (spacing-unit inches)
    (xoffset 0.000000)
    (yoffset 0.000000)
    (offset-unit inches))
(undo-levels 5)
(undo-size 64M)
(undo-preview-size large)
(plug-in-history-size 10)
(pluginrc-path "${gimp_dir}/pluginrc")
(layer-previews yes)
(layer-preview-size medium)
(thumbnail-size normal)
(thumbnail-filesize-limit 4M)
(install-colormap no)
(min-colors 144)
    (mode display)
    (display-profile-from-gdk yes)
    (display-rendering-intent perceptual)
    (simulation-rendering-intent perceptual)
    (display-module "CdisplayLcms"))
(color-profile-policy ask)
(save-document-history yes)
(transparency-size medium-checks)
(transparency-type gray-checks)
(snap-distance 8)
(marching-ants-speed 100)
(resize-windows-on-zoom no)
(resize-windows-on-resize no)
(default-dot-for-dot yes)
(initial-zoom-to-fit yes)
(perfect-mouse yes)
(cursor-mode tool-icon)
(cursor-updating yes)
(show-brush-outline yes)
(show-paint-tool-cursor yes)
(image-title-format "%D*%f-%p.%i (%t, %L) %wx%h")
(image-status-format "%n (%m)")
(confirm-on-close yes)
(monitor-xresolution 96.000000)
(monitor-yresolution 96.000000)
(monitor-resolution-from-windowing-system yes)
(navigation-preview-size medium)
    (show-menubar yes)
    (show-rulers yes)
    (show-scrollbars yes)
    (show-statusbar yes)
    (show-selection yes)
    (show-layer-boundary yes)
    (show-guides yes)
    (show-grid no)
    (show-sample-points yes)
    (padding-mode default)
    (padding-color (color-rgb 1.000000 1.000000 1.000000)))
    (show-menubar yes)
    (show-rulers yes)
    (show-scrollbars yes)
    (show-statusbar yes)
    (show-selection yes)
    (show-layer-boundary yes)
    (show-guides yes)
    (show-grid no)
    (show-sample-points yes)
    (padding-mode default)
    (padding-color (color-rgb 1.000000 1.000000 1.000000)))
(activate-on-focus yes)
(space-bar-action pan)
(xor-color (color-rgb 0.501961 1.000000 0.501961))
(default-threshold 15)
(move-tool-changes-active no)
(trust-dirty-flag no)
(save-device-status no)
(save-session-info yes)
(restore-session yes)
(save-tool-options no)
(show-tips yes)
(show-tooltips yes)
(tearoff-menus yes)
(can-change-accels no)
(save-accels yes)
(restore-accels yes)
(menu-mnemonics yes)
(last-opened-size 10)
(max-new-image-size 128M)
(toolbox-color-area yes)
(toolbox-foo-area no)
(toolbox-image-area no)
(theme-path "${gimp_dir}/themes:${gimp_data_dir}/themes")
(theme "Default")
(use-help yes)
(show-help-button yes)
(help-locales "")
(help-browser gimp)
(web-browser "htmlview %s")
(toolbox-window-hint normal)
(dock-window-hint normal)
(transient-docks no)
(cursor-format pixbuf)
(gfig-path "${gimp_dir}/gfig:${gimp_data_dir}/gfig")
(gflare-path "${gimp_dir}/gflare:${gimp_data_dir}/gflare")
(script-fu-path "${gimp_dir}/scripts:${gimp_data_dir}/scripts")

Can someone help me understand the plugin load mechanism? What variables
(built-in/environment/config) play role in plugin loading?

Gimp-user mailing list

Reply via email to