Re: [Gimp-user] Scripted Gimp Protocol 1 error

2002-04-21 Thread Jeff Trefftzs

Regarding gimp-1.3.5 -- This is the highly unstable, incomplete, developers' 
version, and is not guaranteed to even compile (although I think it does, if 
all the right libs are available).  But don't even think of using it now for 
production work.  Who knows what can still change.

Everything you've posted suggests strongly that your problems lie with Apache 
or some permission conflicts, rather than with the Gimp itself.  Have you 
tried starting the gimp first, and firing up its perl server 
(Toolbox/Xtns/Perl/Server)?  At least then you know you have a running gimp.

Good luck,



-- 
--Jeff

Jeff Trefftzs [EMAIL PROTECTED]
http://www.tcsn.net/trefftzsHome Page
http://gug.sunsite.dk/gallery.php?artist=68 Gimp Gallery
http://trefftzs.topcities.com/home.html Photo galleries



___
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user



Re: [Gimp-user] Scripted Gimp Protocol 1 error

2002-04-19 Thread pcg

On Wed, Apr 17, 2002 at 12:03:14AM +, As Signed [EMAIL PROTECTED] wrote:
 Could anyone please help me get a perl script invoked from HTML 
 via the local server run Gimp? 

Run the script with -v to see gimp's error message. Protocol error 1 most
probably means that gimp couldn't start. Most probably you don't have a
valid DISPLAY in your environment.

Gtk-WARNING **: cannot open display: 

Looks very much so. Set DISPLAY to a valid display and gimp will start.

... the above 2 are less valuable as I DON'T want display.

Well, but gimp does ;)

-- 
  -==- |
  ==-- _   |
  ---==---(_)__  __   __   Marc Lehmann  +--
  --==---/ / _ \/ // /\ \/ /   [EMAIL PROTECTED]  |e|
  -=/_/_//_/\_,_/ /_/\_\   XX11-RIPE --+
The choice of a GNU generation   |
 |
___
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user



[Gimp-user] Scripted Gimp Protocol 1 error

2002-04-16 Thread As Signed

[EMAIL PROTECTED]

My ISP doesn't carry the gimp group and I tried posting via
mixmaster but nothing gets on.   Is the ng moderated and
dumping anon posts? 

Could anyone please help me get a perl script invoked from HTML 
via the local server run Gimp? 

I have one conventional perl script that invokes other progs.
I was hoping to also launch The Gimp from within this script 
and then have it return control to the calling script to continue 
with getting the images into an html page.

The only thing I've been able to do is a separate standalone
script launch The Gimp, do some graphics and save them to disk 
before quitting. Then I have to restart the original script
to carry on with loading the saved images.

Also, this standalone script must run from a bash shell or from
a directly commanded bash script. It refuses to run either from 
any script via local served html.

Is there something Gimp-specific that Apache (1.3.2) must have 
installed? I get server errors but not much in the logs which 
might suggest scripting syntax but Gimp has proven finicky enough 
to undermine this hunch.


I've tried commands  syntax like...

   system('/usr/..path/gimpit.pl');
   protocol error (1) at 
/usr/lib/perl5/site_perl/5.6.1/i586-linux/Gimp/Net.pm line 66.

   system('/usr/bin/gimp');
   Gtk-WARNING **: cannot open display: 

   system('/usr/bin/gimp-remote -n /usr/...path/test.png');
   Gtk-WARNING **: cannot open display: 

   ... the above 2 are less valuable as I DON'T want display.

   eval {
require(/usr/..path/gimpit.pl);
};
   ...nothing.

   printa href=/usr/..path/gimpit.plgimpit.pl/a;
   protocol error (1) at 
/usr/lib/perl5/site_perl/5.6.1/i586-linux/Gimp/Net.pm line 66.

   A bash script, otherwise able to launch gimpit.pl, invoked 
   from perl/html also results in
   protocol error (1) at 
/usr/lib/perl5/site_perl/5.6.1/i586-linux/Gimp/Net.pm line 66.

   which is here... (line #'s added for clarity)
63  # this is hardcoded into gimp_call_procedure!
64  sub response {
65 my($len,$req);
66 read($server_fh,$len,4) == 4 or die protocol error (1);
67 $len=unpack(N,$len);
68 read($server_fh,$req,$len) == $len or die protocol error (2);
69 net2args(0,$req);
70  }
   ...  a long long way over my head!  
   

Would appreciate any pointers.
Sorry if this is not exactly GIMP stuff, but the perl groups will
say it's not perl, and www will say it's apache... etc ;-) and who
would know better than Gimp users?


TIA  
 
[EMAIL PROTECTED]


The original (including needs) script structure
--
#!/usr/local/bin/perl
printContent-type:text/html\n\n;
printhtmlbody;
dothings;
  #nocando
  #dosomeGimpPerChance;
dosomeotherthings;
print/body/html;
exit;
sub dothings {
blah... blah
}
#sub dosomeGimpPerChance {
#blah... blah
#}
sub dosomeotherthings {
blah... blah
}



The standalone script structure
--
#!/usr/local/bin/perl
use Gimp qw (:auto);
use Gimp::Fu;
use Gimp::Util;
#Gimp::set_trace(TRACE_ALL);
register , , , , , , None, *, ,
\doit;
exit main();
  sub doit{
 blah.. NO show, only load, change  save.
  }
  $final=gimp_image_flatten($image);
  file_png_save($image, $final, $targp, $targp, 0,9,0,0,0,0,0);
  return ();
}
--
___
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user