Skip Menu |

This queue is for tickets about the Gimp CPAN distribution.

Report information
The Basics
Id: 123956
Status: open
Priority: 0/
Queue: Gimp

People
Owner: Nobody in particular
Requestors: vegard [...] vesterheim.no
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: batch-mode brings up a dialog box
Date: Thu, 28 Dec 2017 11:27:44 +0100
To: bug-Gimp [...] rt.cpan.org
From: Vegard Vesterheim <vegard [...] vesterheim.no>
When using the latest version (2.32), the command gimp --no-interface --batch '(extension-perl-server 2 0 0)' brings up a GTK dialog into which one needs to press the 'OK' button before the server starts listening for connections. Using version 2.31, the same command simply starts the server immediately, without needing any user-interaction. This is the expected behaviour, given the command line options. I would like to start the Gimp-Perl server as a background process, without any UI whatsoever. -- Vegard Vesterheim Åsvangveien 41 7049 Trondheim Norway
Thanks for the report! Can you tell me which version of GIMP and of Perl you're using? Also, what does the dialog box say?
CC: vegard [...] vesterheim.no
Subject: Re: [rt.cpan.org #123956] batch-mode brings up a dialog box
Date: Fri, 29 Dec 2017 10:21:11 +0100
To: "Ed J via RT" <bug-Gimp [...] rt.cpan.org>
From: Vegard Vesterheim <vegard [...] vesterheim.no>
On Thu, 28 Dec 2017 23:40:03 -0500 "Ed J via RT" <bug-Gimp@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=123956 > > > Thanks for the report! Can you tell me which version of GIMP and of > Perl you're using? Also, what does the dialog box say?
gimp version 2.8.16 perl version 5.22

Message body is not shown because sender requested not to inline it.

-- Vegard Vesterheim Åsvangveien 41 7049 Trondheim Norway
Thanks! Could you try changing your invocation to this? gimp --no-interface --batch '(extension-perl-server RUN-NONINTERACTIVE 0 0)' The current first arg (2) looks like it's in the RUN-INTERACTIVE/RUN-NONINTERACTIVE slot, whose valid values are 0 and 1 respectively.
Subject: Re: [rt.cpan.org #123956] batch-mode brings up a dialog box
Date: Mon, 01 Jan 2018 20:20:41 +0100
To: "Ed J via RT" <bug-Gimp [...] rt.cpan.org>
From: Vegard Vesterheim <vegard [...] vesterheim.no>
On Mon, 1 Jan 2018 04:26:27 -0500 "Ed J via RT" <bug-Gimp@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=123956 > > > Thanks! Could you try changing your invocation to this? > > gimp --no-interface --batch '(extension-perl-server RUN-NONINTERACTIVE 0 0)' > > The current first arg (2) looks like it's in the > RUN-INTERACTIVE/RUN-NONINTERACTIVE slot, whose valid values are 0 and > 1 respectively.
When using RUN-NONINTERACTIVE, I seem to get a prompt in the terminal, like this pb:PERL-SERVERi5: I am trying to have the Gimp Perl-server listen on a TCP port, using something like this: export GIMP_HOST='secretpassword@tcp/localhost:10010' gimp --no-interface --batch '(extension-perl-server RUN-NONINTERACTIVE 0 0)' & After this I expect to be able to connect to the TCP port 10010, but it does not seem to work. -- Vegard Vesterheim Åsvangveien 41 7049 Trondheim Norway
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?
CC: vegard [...] vesterheim.no
Subject: Re: [rt.cpan.org #123956] batch-mode brings up a dialog box
Date: Tue, 02 Jan 2018 09:25:44 +0100
To: "Ed J via RT" <bug-Gimp [...] rt.cpan.org>
From: Vegard Vesterheim <vegard [...] vesterheim.no>
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
That's a good idea. If you'd like to submit a patch that creates this change, go ahead! Otherwise, I'll get to it soon. If you do create such a web facility, why not make a Mojolicious::Plugin of it?
CC: vegard [...] vesterheim.no
Subject: Re: [rt.cpan.org #123956] batch-mode brings up a dialog box
Date: Mon, 26 Nov 2018 21:51:32 +0100
To: "Ed J via RT" <bug-Gimp [...] rt.cpan.org>
From: Vegard Vesterheim <vegard [...] vesterheim.no>
On Wed, 3 Jan 2018 01:33:40 -0500 "Ed J via RT" <bug-Gimp@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=123956 > > > That's a good idea. If you'd like to submit a patch that creates this > change, go ahead! Otherwise, I'll get to it soon.
Hi again Ed. FWIW, I did some manual git bisecting, and identified the "offending" commit to be 6c1a2ba. Before that commit, the command gimp-console --batch '(extension-perl-server 2 0 0 )' works as expected, it starts listening for connections without bringing up that pesky GUI. -- Vegard Vesterheim Åsvangveien 41 7049 Trondheim Norway