-
GIMP Menu Verbiage
GIMP seems to set up its menu structure during installation, with sensible, if lengthy, hardcoded addresses and menu names for your remote (network) scanner based on its host and USB port location:
(proc-def "xsane-net-3a-plex760-2e-local-3a-genesys-3a-libusb-3a-002-3a-002" 2 … snippage … (menu-path "<Image>/File/Create/Acquire/XSane/net:plex760.local:genesys:libusb:002:002")
Should you happen to plug the scanner into a different PC or USB port, perhaps while replacing a failed system, then you must change those hideous strings all by yourself.
So, for example, plugging the aforementioned scanner into a randomly chosen USB port on a new-to-me Dell Optiplex 9020 showing up as
plex9020.localon the network produces this identification string:[ed@shiitake ~]$ scanimage -L device `net:plex9020.local:genesys:libusb:003:003' is a Canon LiDE 120 flatbed scanner
GIMP’s
~/.gimp-2.8/pluginrcfile defines the device address:(proc-def "xscanimage-net-3a-plex9020-2e-local-3a-genesys-3a-libusb-3a-003-3a-003" 2
The
-3a-string seem to be an escape sequence for the colon symbol separating parts of the address. Why we need so many different escape sequence standards mmm escapes me at the moment.The
menu-pathstring defines the text appearing in the GIMP UI, so you can use a somewhat more readable generic name:(menu-path "<Image>/File/Create/Acquire/xscanimage/Plex9020-scanner")
The
~/.gimp-2.8/menurcfile contains GIMP’s keyboard accelerators, which (apparently) must match the revisedproc-defstrings:; (gtk_accel_path "<Actions>/plug-in/xscanimage-net-3a-plex9020-2e-local-3a-genesys-3a-libusb-3a-003-3a-003" "")
A keyboard accelerator for the scanner wouldn’t save any appreciable amount of time or effort, so (I think) the semicolon marks it as
Disabledin the UI.It is remarkably easy to make a one-character typo while doing this, particularly if you’re using
sedto change All. The. Strings. at once.There is, AFAICT, no documentation, which almost certainly means I don’t know where to look.