On Mon, 1 Jan 2018 17:44:56 -0500 "Ed J via RT" <bug-Gimp@rt.cpan.org> wrote:
Show quoted text> <URL:
https://rt.cpan.org/Ticket/Display.html?id=123956 >
>
> If you first of all change the invocation to this:
>
> gimp --no-interface --batch '(extension-perl-server RUN-NONINTERACTIVE 0 3)'
>
> the "3" is the value of $Gimp::verbose, and 3 is the highest level, so you will get lots of debugging output.
>
> Next, that "0" is the file-descriptor you've told the Perl server to
> connect to. That's standard input. The text you saw is the raw
> Perl-Server protocol itself, which if you're interested you can learn
> more about from
>
https://github.com/GNOME/gimp-perl/blob/master/lib/Gimp/Net.pm
>
> The Perl server isn't really intended to be started the way you're
> doing it. It can spawn its own private copy of GIMP, using "spawn" in
> the GIMP_HOST env var.
>
> What are you actually trying to achieve?
I simply want to start gimp with the Gimp Perl-server ready to accept
connections on a socket *without any GUI whatsoever*. I want to have a
persistently running "gimp daemon" which I can feed perl scripts for
generating graphics.
This works fine now with the annoying exception that I need to press the
"OK" button in the Gtk dialog. I want a way to suppress this, and I
expected the --no-interface flag to gimp, combined with
the 'RUN-NONINTERACTIVE' run-mode to Gimp-Perl to achieve this.
The first argument (run-mode) to the 'extension-perl-server' can have
three values: INTERACTIVE(0), NONINTERACTIVE(1) or
RUN_WITH_LAST_VALS(2). I have been using the last option
(RUN_WITH_LAST_VALS). I guess this does not make much sense since I am
starting a new gimp instance, so there is no previous invocation of the
plugin.
There are multiple use-cases for this. My specific use case right now is
to be able to programmatically create beer-bottle labels. I have created
a Gimp-Perl script which generates these labels. This script works fine
when invoked from within the gimp UI. It also works fine running
directly from the command line, if there is no gimp perl-server running,
a new gimp instance will be started in the background.
Imagine a web form where you can enter some parameters, and being served
graphic images on-the-fly. For this to work efficiently, one needs a
persistent gimp server ready to process the requests.
--
Vegard Vesterheim
Åsvangveien 41
7049 Trondheim
Norway