CUPS backend issue writing to file

Helge Blischke h.blischke at acm.org
Fri Apr 30 08:51:33 PDT 2010


Daniel Stoeck wrote:

> Hello everybody,
> 
> I am trying to set up a virtual printer that writes postscript files to
> the harddrive. After that these ps-files are postprocessed by an Acrobat
> Distiller with professional DTP joboptions, but that shall not be
> important now. My problem happens earlier.
> 
> I am using a cups backend which is pretty simple. After some exception
> handling it just does the following in short (if you need the complete
> backend, just say so):
> 
> FILE=$6
> TARGETFILE=${DEVICE_URI#filewrite:}/${TITLE}.ps
> cat $FILE > $TARGETFILE
> 
> The path where cups writes the file is given in the DEVICE-URI. This works
> pretty well on my Macbook Pro with Mac OS X 10.6.3 and CUPS 1.4.3. (As an
> example: the DEVICE-URI looks like filewrite:/tmp/postscripts/) Now I
> wanted to transfer the whole story on our Mac OS X Server running 10.6.x
> and also CUPS 1.4.3. But the printer doesn't want to work. (My goal is to
> use CUPS with around 40 virtual printers, every single one just writing
> postscript files to particular hotfolders where the ps-files are getting
> processed furthermore)
> 
> I can add the printer with the same settings as on my Macbook Pro with
> non-SERVER Mac OS X. But when I try to print anything I get the following
> error message: "The printing software was not installed correctly.
> Reinstall the printing software or call your vendor." (Translated from the
> german error message "Die Druckersoftware wurde nicht korrekt installiert.
> Installieren Sie die Druckersoftware erneut oder wenden Sie sich an den
> Hersteller.")
> 
> * the Mac OS X Server is a raw installation with the newest system updates
> * I tried several PPD files
> * the write-permissions to the $TARGETFILE path are given
> * the backend has +x permissions to be executed
> 
> I made a screenshot from the only error I get. You can find it here:
> http://img714.imageshack.us/img714/4072/screenqac.png
> 
> I do not know any further. Please help me :)

I hacked a print to file backend (a Perl script) which additionally allows 
to do postprocessing the result file (by calling a program/script).

When writing the file or executing the postprocessing stuff, it runs as the 
job-requesting-user (parameter usename in the command line) or, if that 
isn't a user known to the local system, as the user (and group) owning the 
destination directory.

I have this baqckend running on Mac OS X 10.5.8 and OpenSuSE 11.1;
for Snow Leopard, you probably need to modify the sandbox profiles.

If you are interested, drop me an e-mail for that script.

Helge





More information about the cups mailing list