Gimp::Net - Communication module for the gimp-perl server.
For Gimp::Net (and thus commandline and remote scripts) to work, you first have to install the "Perl-Server" extension somewhere where Gimp can find it (e.g in your .gimp/plug-ins/ directory). Usually this is done automatically while installing the Gimp extension. If you have a menu entry
<Xtns/Perl-Server> then it is probably installed.
The Perl-Server can either be started from the
<Xtns> menu in Gimp, or automatically when a perl script can't find a running Perl-Server.
When started from within The Gimp, the Perl-Server will create a unix domain socket to which local clients can connect. If an authorization password is given to the Perl-Server (by defining the environment variable
GIMP_HOST before starting The Gimp), it will also listen on a tcp port (default 10009).
The environment variable
GIMP_HOST specifies the default server to contact and/or the password to use. The syntax is [auth@][tcp/]hostname[:port] for tcp, [auth@]unix/local/socket/path for unix and spawn/ for a private gimp instance. Examples are:
www.yahoo.com # just kidding ;) yahoo.com:11100 # non-standard port tcp/yahoo.com # make sure it uses tcp authorize@tcp/yahoo.com:123 # full-fledged specification unix/tmp/unx # use unix domain socket password@unix/tmp/test # additionally use a password authorize@ # specify authorization only spawn/ # use a private gimp instance
is called after we have succesfully connected to the server. Do your dirty work in this function, or see Gimp::Fu for a better solution.
sends the perl server a quit command.
(Ver 0.04..) This module is much faster than it ought to be... Silly that I wondered wether I should implement it in perl or C, since perl is soo fast.
Marc Lehmann <firstname.lastname@example.org>