[cups] Cups + Zebra fuzzy printing

Helge Blischke helgeblischke at web.de
Fri Feb 20 10:09:06 PST 2015


Therry,

the sandbox issue (with „Sandboxing strict“) has probably two causes:
(1) the Perl script gstoraster looks in some directories, independent of the PATH environment
variable, for an executable named gs, and by default querying file attributes („metadata“)
is denied. This could be fixed by replacing calling the lookup function by the real path of gs,
as child execution is allowed.
(2) Ghostscript usually is compiled with the X11 devices, so it needs to access the X11 stuff
when executed. Since OS X 10.9.x at least the X11 data and libraries are installed in 
/opt/X11, access to which is denied by default (static linking does not fix this, as the X11 functions
look for locale settings in a subdirectory of /opt/X11, which is hard coded therein).
An option would be to compile a Ghostscript executable without the X11 devices, like the one
delivered with the current TeX distribution (gs-noX11).

The setting
Sandboxing relaxed
sets the sandbox profile of CUPS back to the configuration  used in IS X 10.9.x.

Perhaps it would be worth while to file a bug / change request to apple to install the X11 stuff
in /ur/lib/X11 as in previous versions of OS X.

Helge
> Am 20.02.2015 um 16:55 schrieb Therry van Neerven <therry at sendcloud.nl>:
> 
> Hi Helge, 
> 
> We've just tested everything with help of your feedback and we were able to print our labels with good quality when using Adobe Reader (since it allows to print everything as an image). 
> It seems that your solution is not liking the new permissions.
> 
> When printing without any extra actions we've got the following message in the print overview:
> 
> stopped ­ GhostScript not found
> 
> When I looked into the sandboxd log I found the following line:
> 
> Feb 20 16:27:02 Reubens­MacBook­Pro.local sandboxd[273] ([6749]): perl5.18(6749) deny file-
> read­metadata /usr/local/bin/gs
> 
> After using sudo sh ­c 'echo "Sandboxing Relaxed" >> /etc/cups/cups­files.conf' we were able to print with good quality. 
> 
> Any ideas how to work around this sandboxing issue?
> 
> Kind regards,
> 
> Therry van Neerven
> 
>     
> Mobiel:     +31 (0)6 – 152 39 880 <>
> E-mail:      therry at sendcloud.nl <mailto:therry at sendcloud.nl>
> Internet:    www.sendcloud.nl <http://www.sendcloud.nl/>
> 
> SendCloud | KvK Brabant: 60316721 | BTW nummer: NL853855420B01
> 
> Bezoek ook eens:   
> The Brainport Eindhoven Python Meetup Group <http://www.meetup.com/Brainport-Python-Meetup-Group/>
> SendCloud Jobs <https://www.sendcloud.nl/jobs/>
>  
> De informatie opgenomen in dit bericht is vertrouwelijk en is uitsluitend bestemd voor de geadresseerde               .
> Indien u dit bericht onterecht ontvangt, wordt u verzocht de inhoud niet te gebruiken, maar te vernietigen en de afzender direct te informeren.
> 
> 2015-02-19 10:26 GMT+01:00 Therry van Neerven <therry at sendcloud.nl <mailto:therry at sendcloud.nl>>:
> Dear Helge, 
> 
> I'll check this next Friday on the macbook of a colleague . 
> We will send you the test results after the testing and hopefully it gives some clues how to solve this issue. 
> 
> Met vriendelijke groet,
> 
> Therry van Neerven
> 
>     
> Mobiel:     +31 (0)6 – 152 39 880 <>
> E-mail:      therry at sendcloud.nl <mailto:therry at sendcloud.nl>
> Internet:    www.sendcloud.nl <http://www.sendcloud.nl/>
> 
> SendCloud | KvK Brabant: 60316721 | BTW nummer: NL853855420B01
> 
> Bezoek ook eens:   
> The Brainport Eindhoven Python Meetup Group <http://www.meetup.com/Brainport-Python-Meetup-Group/>
> SendCloud Jobs <https://www.sendcloud.nl/jobs/>
>  
> De informatie opgenomen in dit bericht is vertrouwelijk en is uitsluitend bestemd voor de geadresseerde               .
> Indien u dit bericht onterecht ontvangt, wordt u verzocht de inhoud niet te gebruiken, maar te vernietigen en de afzender direct te informeren.
> 
> 2015-01-28 14:05 GMT+01:00 Helge Blischke <helgeblischke at web.de <mailto:helgeblischke at web.de>>:
> … where „xxx“ means the Job-ID go the test job (forgot this to mention).
> 
>> Am 28.01.2015 um 13:07 schrieb Helge Blischke <HelgeBlischke at web.de <mailto:HelgeBlischke at web.de>>:
>> 
>> Hi Therry,
>> 
>> I suspect your problem with OS X is due to the tightened sandboxing of CUPS when running 
>> in OS X 10.x (Yosemite).
>> As there my be several setscrews to settle the issue, I’d beg you to do a test job and send me
>> the output of the following two log file excerpts (after setting 
>> cupsctl —debug-logging):
>> (1) grep 'Job xxx‘ /var/log/cups/error_log
>> (2) grep -i sandboxd /var/log/system.log
>> 
>> Thanks in advance
>> 
>> Helge
>> 
>>> Am 28.01.2015 um 10:35 schrieb Therry van Neerven <therry at sendcloud.nl <mailto:therry at sendcloud.nl>>:
>>> 
>>> Hi Helge,
>>> 
>>> Unfortunately I was not able to get it working with the newest version of OSX and the configuration of my PC.
>>> However your project provides an good idea what needs to be solved. I'm planning to create my own variant on it based on a Python script (since we use it very much in our company)
>>> 
>>> If it's finished I'll share it with you.
>>> Thank you for your efforts and responses on my mail.
>>> 
>>> Met vriendelijke groet,
>>> 
>>> Therry van Neerven
>>> 
>>>     
>>> Mobiel:     +31 (0)6 – 152 39 880 <>
>>> E-mail:      therry at sendcloud.nl <mailto:therry at sendcloud.nl>
>>> Internet:    www.sendcloud.nl <http://www.sendcloud.nl/>
>>> 
>>> SendCloud | KvK Brabant: 60316721 | BTW nummer: NL853855420B01
>>> 
>>> Bezoek ook eens:   
>>> The Brainport Eindhoven Python Meetup Group <http://www.meetup.com/Brainport-Python-Meetup-Group/>
>>> SendCloud Jobs <https://www.sendcloud.nl/jobs/>
>>>  
>>> De informatie opgenomen in dit bericht is vertrouwelijk en is uitsluitend bestemd voor de geadresseerde               .
>>> Indien u dit bericht onterecht ontvangt, wordt u verzocht de inhoud niet te gebruiken, maar te vernietigen en de afzender direct te informeren.
>>> 
>>> 2015-01-26 15:44 GMT+01:00 Helge Blischke <helgeblischke at web.de <mailto:helgeblischke at web.de>>:
>>> Hi Therry,
>>> 
>>> as my stuff has been published under the GNU Public License (Version 2 or higher),
>>> it is fully OK to include it into your open source package, provided that as well is 
>>> buplished under the GPL or an equivalent license (otherwise you would need to
>>> restrict yourself to giving a link only)
>>> .
>>> 
>>> Helge
>>>> Am 26.01.2015 um 10:46 schrieb Therry van Neerven <therry at sendcloud.nl <mailto:therry at sendcloud.nl>>:
>>>> 
>>>> Hi Helge, 
>>>> 
>>>> Thanks for sharing. We will test tomorrow if it solves the problems with our shipment labels. 
>>>> 
>>>> If it works I would like to create a package installer which patches everything in a user friendly way. 
>>>> For this I would like to known from you what kind of license you use for this project and if it is OK to include your files.
>>>> I prefer to make everything open source on GitHub on the end, but if you don't like your files to be included in my project I would like to hear that in advance.
>>>> 
>>>> I'm looking forward to your answer. 
>>>> 
>>>> 
>>>> Met vriendelijke groet,
>>>> 
>>>> Therry van Neerven
>>>> 
>>>>     
>>>> Mobiel:     +31 (0)6 – 152 39 880 <>
>>>> E-mail:      therry at sendcloud.nl <mailto:therry at sendcloud.nl>
>>>> Internet:    www.sendcloud.nl <http://www.sendcloud.nl/>
>>>> 
>>>> SendCloud | KvK Brabant: 60316721 | BTW nummer: NL853855420B01
>>>> 
>>>> Bezoek ook eens:   
>>>> The Brainport Eindhoven Python Meetup Group <http://www.meetup.com/Brainport-Python-Meetup-Group/>
>>>> SendCloud Jobs <https://www.sendcloud.nl/jobs/>
>>>>  
>>>> De informatie opgenomen in dit bericht is vertrouwelijk en is uitsluitend bestemd voor de geadresseerde               .
>>>> Indien u dit bericht onterecht ontvangt, wordt u verzocht de inhoud niet te gebruiken, maar te vernietigen en de afzender direct te informeren.
>>>> 
>>>> 2015-01-25 15:56 GMT+01:00 Helge Blischke <helgeblischke at web.de <mailto:helgeblischke at web.de>>:
>>>> Therry,
>>>> 
>>>> the current version of this filter – including documentation – is here:
>>>> http://sourceforge.net/projects/cupsaddons/files/filter-gstoraster <http://sourceforge.net/projects/cupsaddons/files/filter-gstoraster>
>>>> Enjoy,
>>>> 
>>>> Helge
>>>> 
>>>>> Am 25.01.2015 um 12:54 schrieb Therry van Neerven <therry at sendcloud.nl <mailto:therry at sendcloud.nl>>:
>>>>> 
>>>>> Hi,
>>>>> 
>>>>> I came across the mailing list thread of you and Matt discussing how to solve fuzzy printing with printing Labels on a Zebra GK420d.
>>>>> 
>>>>> (https://www.cups.org/pipermail/cups/2014-July/026364.html <https://www.cups.org/pipermail/cups/2014-July/026364.html>)
>>>>> 
>>>>> The solution seemed to be to use a custom filter which uses GhostScript to rastersize the PDF files. I see you refer to a "homegrown gtoraster filter". However I can't find it.
>>>>> 
>>>>> Could you please tell me where I can find it? 
>>>>> 
>>>>> Thanks in advance! 
>>>>> 
>>>>> Kind regards,
>>>>> 
>>>>> Therry van Neerven
>>>>> 
>>>>>     
>>>>> Mobiel:     +31 (0)6 – 152 39 880 <>
>>>>> E-mail:      therry at sendcloud.nl <mailto:rob at sendcloud.nl>
>>>>> Internet:    www.sendcloud.nl <http://www.sendcloud.nl/>
>>>>> 
>>>>> SendCloud | KvK Brabant: 60316721 | BTW nummer: NL853855420B01
>>>>> 
>>>>> Bezoek ook eens:   
>>>>> The Brainport Eindhoven Python Meetup Group <http://www.meetup.com/Brainport-Python-Meetup-Group/>
>>>>> SendCloud Jobs <https://www.sendcloud.nl/jobs/>
>>>>>  
>>>>> De informatie opgenomen in dit bericht is vertrouwelijk en is uitsluitend bestemd voor de geadresseerde               .
>>>>> Indien u dit bericht onterecht ontvangt, wordt u verzocht de inhoud niet te gebruiken, maar te vernietigen en de afzender direct te informeren.
>>>> 
>>>> 
>>> 
>>> 
>> 
> 
> 
> 




More information about the cups mailing list