[cups] Only able to print from CUPS web interface ("filter failed" error otherwise)

Håkon Alstadheim hakon at alstadheim.priv.no
Fri Nov 7 08:37:02 PST 2014


On 07. nov. 2014 16:40, Mario Sanchez Prada wrote:
> Hi Håkon,
>
> On 07/11/14 14:58, Håkon Alstadheim wrote:
>> [...]
>> I have experienced problems due to different language settings (env
>> LANG=en_US.UTF-8 vs LANG=nb_NO.UTF-9) causing problems. The interactions
>> can be complex, some priter drivers will accept env. settings that
>> others will barf on ...
>>
>> I guess "anonymous" will have a more "vanilla" environment than mario.
> That's very interesting. Actually the environment for both users, as I
> can extract from the logs, is nearly identical with this exception:
>
> * From gnome-control-center (FAIL):
>    envp[19]="LANG=es_GT.UTF-8"
>
> * From CUPS web interface (OK):
>    envp[19]="LANG=C"
>
> Could this possible be related to the kind of problems you experienced?
>
>
That is my thinking, yes.

I "fixed" my problems by moving a filter aside:
      cd /usr/lib/cups/filter
     mv pstoncapcpca pstoncapcpca_0

and inserting a shell script in its place:
--------/usr/lib/cups/filter: ---------
#!/bin/sh
export  LANG=en_GB.UTF-8
exec /usr/lib/cups/filter/pstoncapcpca_0 "$@"
---------------------------------------------

Which filter your printer uses will of course vary by printer, and 
perhaps by input.

Remember to make the new file executable.

The root cause in my case is a crappy half-assed closed-source linux 
driver by Canon :-( . Guess they are too embarassed by their code to 
make it public.





More information about the cups mailing list