gs not found, scripts failing

2003-02-15 Thread Per olof Ljungmark
I'm having problems with scripts involvivng Ghostscript on FreeBSD 
(4.6-4.7).
Specifically, I am implementing a Hylafax solution and most of it works 
but there a two areas that fail:
1. Running the SambaFax (http://www.purpel3.com/sambafax/) utility that 
extracts a fax number from a postscript file

2. Using the "faxrcvd" script that comes with Hylafax converting 
incoming faxes to pdf's.

In both cases the scripts seems to fail when tiff2ps, ps2pdf etc. are 
being executed.

Running the scripts manually from the shell works.

The only trace I hae so far from the logs is when (1.) is executed, 
cupsd reports "gs: not found".

How do I go about debugging this? I am in no way a programmer although I 
understand parts of what the scripts are doing.

Grateful for any advice,
Per olof


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message


Re: gs not found, scripts failing

2003-02-15 Thread Bill Moran
Per olof Ljungmark wrote:

I'm having problems with scripts involvivng Ghostscript on FreeBSD 
(4.6-4.7).
Specifically, I am implementing a Hylafax solution and most of it works 
but there a two areas that fail:
1. Running the SambaFax (http://www.purpel3.com/sambafax/) utility that 
extracts a fax number from a postscript file

2. Using the "faxrcvd" script that comes with Hylafax converting 
incoming faxes to pdf's.

In both cases the scripts seems to fail when tiff2ps, ps2pdf etc. are 
being executed.

Running the scripts manually from the shell works.

The only trace I hae so far from the logs is when (1.) is executed, 
cupsd reports "gs: not found".

How do I go about debugging this? I am in no way a programmer although I 
understand parts of what the scripts are doing.

You need to install ghostscript.  It includes the gs, tiff2ps, ps2pdf, etc
programs that are needed for everything else to run.  Ghostscript is pretty
much a requirement whenever you're converting documents from one type to
another or doing printing beyond plain text.

--
Bill Moran
Potential Technologies
http://www.potentialtech.com


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message



Re: gs not found, scripts failing

2003-02-15 Thread Heinrich Rebehn
Per olof Ljungmark wrote:

I'm having problems with scripts involvivng Ghostscript on FreeBSD 
(4.6-4.7).
Specifically, I am implementing a Hylafax solution and most of it works 
but there a two areas that fail:
1. Running the SambaFax (http://www.purpel3.com/sambafax/) utility that 
extracts a fax number from a postscript file

2. Using the "faxrcvd" script that comes with Hylafax converting 
incoming faxes to pdf's.

In both cases the scripts seems to fail when tiff2ps, ps2pdf etc. are 
being executed.

Running the scripts manually from the shell works.

seems like /usr/local/bin (this is where gs lives) is not in the PATH when your 
scripts are executed. Try to set the PATH env variable in the script, i.e.

PATH=/usr/bin:/usr/local/bin
export PATH

(Syntax is for Bourne shell)

HTH

	Heinrich


The only trace I hae so far from the logs is when (1.) is executed, 
cupsd reports "gs: not found".

How do I go about debugging this? I am in no way a programmer although I 
understand parts of what the scripts are doing.

Grateful for any advice,
Per olof


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message



--

Heinrich Rebehn

University of Bremen
Physics / Electrical and Electronics Engineering
- Department of Telecommunications -

E-mail: mailto:[EMAIL PROTECTED]
Phone : +49/421/218-4664
Fax   :-3341


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message



Re: gs not found, scripts failing

2003-02-15 Thread Per olof Ljungmark
Heinrich Rebehn wrote:

Per olof Ljungmark wrote:


I'm having problems with scripts involvivng Ghostscript on FreeBSD 
(4.6-4.7).
Specifically, I am implementing a Hylafax solution and most of it 
works but there a two areas that fail:
1. Running the SambaFax (http://www.purpel3.com/sambafax/) utility 
that extracts a fax number from a postscript file

2. Using the "faxrcvd" script that comes with Hylafax converting 
incoming faxes to pdf's.

In both cases the scripts seems to fail when tiff2ps, ps2pdf etc. are 
being executed.

Running the scripts manually from the shell works.


seems like /usr/local/bin (this is where gs lives) is not in the PATH 
when your scripts are executed. Try to set the PATH env variable in the 
script, i.e.

PATH=/usr/bin:/usr/local/bin
export PATH

(Syntax is for Bourne shell)

Thanks for the advice.

Since my original post I have concluded that the two problems are 
similar but not identical and concentrated on (2.).

From what I can see all seach paths are added in the script. Also I 
should have added earlier that a pdf file IS produced but with zero byte 
lenght.

This is when the script is called from Hylafax server. Again, when run 
from the command line, faxrcvd works and the pdf is ok.

This has led me to believe that the problem is the location of the 
temporary files used to produce the pdf.

I have tried adding "#!/bin/sh -xv" but this only works from the command 
line. How can I pipe the debugging output from a scrpt to a file?



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message


Re: gs not found, scripts failing

2003-02-17 Thread Heinrich Rebehn
Per olof Ljungmark wrote:

Heinrich Rebehn wrote:


Per olof Ljungmark wrote:


I'm having problems with scripts involvivng Ghostscript on FreeBSD 
(4.6-4.7).
Specifically, I am implementing a Hylafax solution and most of it 
works but there a two areas that fail:
1. Running the SambaFax (http://www.purpel3.com/sambafax/) utility 
that extracts a fax number from a postscript file

2. Using the "faxrcvd" script that comes with Hylafax converting 
incoming faxes to pdf's.

In both cases the scripts seems to fail when tiff2ps, ps2pdf etc. are 
being executed.

Running the scripts manually from the shell works.



seems like /usr/local/bin (this is where gs lives) is not in the PATH 
when your scripts are executed. Try to set the PATH env variable in 
the script, i.e.

PATH=/usr/bin:/usr/local/bin
export PATH

(Syntax is for Bourne shell)


Thanks for the advice.

Since my original post I have concluded that the two problems are 
similar but not identical and concentrated on (2.).

 From what I can see all seach paths are added in the script. Also I 
should have added earlier that a pdf file IS produced but with zero byte 
lenght.

This is when the script is called from Hylafax server. Again, when run 
from the command line, faxrcvd works and the pdf is ok.

This has led me to believe that the problem is the location of the 
temporary files used to produce the pdf.

I have tried adding "#!/bin/sh -xv" but this only works from the command 
line. How can I pipe the debugging output from a scrpt to a file?



You can use 'sh -xv scriptfile 2>debugoutput'.

Also you cat put '#!/bin/sh -xv' at the start of your script, so debugging is 
also enabled, if the script is executed as a command. You can have the debug 
output sent to a file with:
exec 2>debugoutput

BTW, the zero length pdf file suggests that gs cannot find or open some files 
(different user / persmission?). As a last resort your script could call gs with:
	strace -f -e trace=file -o traceoutput gs

which will show you all file operations gs has attempted.


Heinrich


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message