Setup CUPS-1.4.6 in Solaris 10?

dickson iswslui at ust.hk
Mon Feb 14 20:27:49 PST 2011


> dickson wrote:
>
> >> dickson wrote:
> >>
> >> >> dickson wrote:
> >> >>
> >> >> >> dickson wrote:
> >> >> >>
> >> >> >> >> > dickson wrote:
> >> >> >> >> >
> >> >> >> >> > > I compile and install CUPS-1.4.6 in /usr/local/cups-1.4.6
> >> >> >> >> > > directory. I use Web interface to setup a printer
> >> >> >> >> > > I need to use the full path to send a print job as follow:
> >> >> >> >> > > /usr/local/cups-1.4.6/etc/cups/bin/lp -d EPSON
> >> >> >> >> > > chinese_UTF8.txt
> >> >> >> >> > >
> >> >> >> >> > > fail with the following message:
> >> >> >> >> > > /usr/local/cups-1.4.6/bin/lp: Unsupported format
> >> >> >> >> > > 'text/plain'!
> >> >> >> >> > >
> >> >> >> >> > > Question : what is wrong?
> >> >> >> >> >
> >> >> >> >> > Did you disable the default ipp listener service?
> >> >> >> >> > Check its status by
> >> >> >> >> >
> >> >> >> >> > svcs -a | grep ipp
> >> >> >> >> >
> >> >> >> >> > and, if it is enabled, disable it using the svcadm command.
> >> >> >> >> >
> >> >> >> >> > Helge
> >> >> >> >> >
> >> >> >> >>
> >> >> >>
> >> >>
> >>
> -------------------------------------------------------------------------------
> >> >> >> >> 8-Feb-2011
> >> >> >> >> Thanks for your help.
> >> >> >> >>
> >> >> >> >> 1. The default ipp listener service is disabled. What else?
> >> >> >> >>
> >> >> >> >>    Sun Microsystems Inc.   SunOS 5.10      Generic January 2005
> >> >> >> >>    server_one:webadmin~ >svcs -a | grep ipp
> >> >> >> >>    disabled       Dec_15
> >> >> >> >>    svc:/application/print/ipp-listener:default
> >> >> >> >>
> >> >> >> >> 2. Do I need to disable the original(default) "lp,enable,cancel"
> >> >> >> >> command under /usr/bin?
> >> >> >> >>
> >> >> >> >> 3. I attach more log for you to investigate my problem. I find
> >> >> >> >> that cups can load the mime.types
> >> >> >> >>
> >> >> >> >
> >> >> >> >
> >> >> >>
> >> >>
> >>
> -------------------------------------------------------------------------------
> >> >> >> > 8-Feb-2011 10:26AM
> >> >> >> >
> >> >> >> > I use "debug2" for loglevel and find that the error is caused by
> >> >> >> > EPSON-24pin dot matrix printer driver. How can I fix this
> >> >> >> > problem?
> >> >> >> >
> >> >> >> >
> >> >> >> > d [08/Feb/2011:10:19:53 -0800] cupsdFindPolicyOp: Found exact
> >> >> >> > match... D [08/Feb/2011:10:19:53 -0800] load_ppd: Loading
> >> >> >> > /usr/local/cups-1.4.6/var/cache/cups/EPSON.ipp4... d
> >> >> >> > [08/Feb/2011:10:19:53 -0800]
> >> >> >> > cupsdSetPrinterReasons(p=aaba0(EPSON),s="-cups-missing-filter-
> >> >> >> warning,cups-insecure-filter-warning"
> >> >> >> > d [08/Feb/2011:10:19:53 -0800] add_printer_filter: EPSON: adding
> >> >> >> > filter application/vnd.cups-raw printer/EPSON 0 - d
> >> >> >> > [08/Feb/2011:10:19:53 -0800] add_printer_filter: EPSON: adding
> >> >> >> > filter application/vnd.cups-raster printer/EPSON 50 rastertoepson
> >> >> >> > d
> >> >> >> > [08/Feb/2011:10:19:53 -0800] add_printer_formats: 36 types, 42
> >> >> >> > [filters
> >> >> >> > d [08/Feb/2011:10:19:53 -0800] add_printer_formats: EPSON:
> >> >> >> > application/octet-stream needs 1 filters d
> >> >> >> > [08/Feb/2011:10:19:53 -0800] add_printer_formats: EPSON:
> >> >> >> > [application/pdf
> >> >> >> > not supported d [08/Feb/2011:10:19:53 -0800] add_printer_formats:
> >> >> >> > EPSON: application/postscript not supported d
> >> >> >> > [08/Feb/2011:10:19:53 -0800] add_printer_formats: EPSON:
> >> >> >> > application/rss+xml not supported d
> >> >> >> > [08/Feb/2011:10:19:53 -0800] add_printer_formats: EPSON:
> >> >> >> > application/vnd.cups-banner not supported d [08/Feb/2011:10:19:53
> >> >> >> > -0800] add_printer_formats: EPSON: application/vnd.cups-command
> >> >> >> > not supported d
> >> >> >> > [08/Feb/2011:10:19:53 -0800] add_printer_formats: EPSON:
> >> >> >> > application/vnd.cups-pdf not supported d [08/Feb/2011:10:19:53
> >> >> >> > -0800] add_printer_formats: EPSON:
> >> >> >> > application/vnd.cups-postscript not supported d
> >> >> >> > [08/Feb/2011:10:19:53 -0800] add_printer_formats: EPSON:
> >> >> >> > application/vnd.cups-ppd not supported d
> >> >> >> > [08/Feb/2011:10:19:53 -0800] add_printer_formats: EPSON:
> >> >> >> > application/vnd.cups-raster needs 1 filters d
> >> >> >> > [08/Feb/2011:10:19:53 -0800] add_printer_formats: EPSON:
> >> >> >> > application/vnd.cups-raw needs 1 filters d [08/Feb/2011:10:19:53
> >> >> >> > -0800] add_printer_formats: EPSON: application/vnd.hp-hpgl not
> >> >> >> > supported d
> >> >> >> > [08/Feb/2011:10:19:53 -0800] add_printer_formats: EPSON:
> >> >> >> > application/x-cshell not supported d [08/Feb/2011:10:19:53 -0800]
> >> >> >> > add_printer_formats: EPSON: application/x-csource not supported d
> >> >> >> > [08/Feb/2011:10:19:53 -0800] add_printer_formats: EPSON:
> >> >> >> > application/x-perl not supported d [08/Feb/2011:10:19:53 -0800]
> >> >> >> > add_printer_formats: EPSON: application/x-shell not supported d
> >> >> >> > [08/Feb/2011:10:19:53 -0800] add_printer_formats: EPSON:
> >> >> >> > [image/gif needs 1
> >> >> >> > filters d [08/Feb/2011:10:19:53 -0800] add_printer_formats:
> >> >> >> > EPSON: image/jpeg needs 1 filters d [08/Feb/2011:10:19:53 -0800]
> >> >> >> > add_printer_formats: EPSON: image/png needs 1 filters d
> >> >> >> > [08/Feb/2011:10:19:53 -0800] add_printer_formats: EPSON:
> >> >> >> > [image/tiff needs
> >> >> >> > 1 filters d [08/Feb/2011:10:19:53 -0800] add_printer_formats:
> >> >> >> > EPSON: image/x-alias not supported d [08/Feb/2011:10:19:53 -0800]
> >> >> >> > add_printer_formats: EPSON: image/x-bitmap needs 1 filters d
> >> >> >> > [08/Feb/2011:10:19:53 -0800] add_printer_formats: EPSON:
> >> >> >> > [image/x-icon not
> >> >> >> > supported d [08/Feb/2011:10:19:53 -0800] add_printer_formats:
> >> >> >> > EPSON: image/x-photocd needs 1 filters d [08/Feb/2011:10:19:53
> >> >> >> > -0800] add_printer_formats: EPSON: image/x-portable-anymap needs
> >> >> >> > 1 filters d
> >> >> >> > [08/Feb/2011:10:19:53 -0800] add_printer_formats: EPSON:
> >> >> >> > image/x-portable-bitmap needs 1 filters d [08/Feb/2011:10:19:53
> >> >> >> > -0800] add_printer_formats: EPSON: image/x-portable-graymap needs
> >> >> >> > 1 filters d
> >> >> >> > [08/Feb/2011:10:19:53 -0800] add_printer_formats: EPSON:
> >> >> >> > image/x-portable-pixmap needs 1 filters d [08/Feb/2011:10:19:53
> >> >> >> > -0800] add_printer_formats: EPSON: image/x-sgi-rgb needs 1
> >> >> >> > filters d
> >> >> >> > [08/Feb/2011:10:19:53 -0800] add_printer_formats: EPSON:
> >> >> >> > image/x-sun-raster needs 1 filters d [08/Feb/2011:10:19:53 -0800]
> >> >> >> > add_printer_formats: EPSON: image/x-xbitmap needs 1 filters d
> >> >> >> > [08/Feb/2011:10:19:53 -0800] add_printer_formats: EPSON:
> >> >> >> > [image/x-xpixmap
> >> >> >> > needs 1 filters d [08/Feb/2011:10:19:53 -0800]
> >> >> >> > add_printer_formats: EPSON: printer/EPSON not supported d
> >> >> >> > [08/Feb/2011:10:19:53 -0800] add_printer_formats: EPSON: text/css
> >> >> >> > not supported d
> >> >> >> > [08/Feb/2011:10:19:53 -0800] add_printer_formats: EPSON:
> >> >> >> > [text/html not
> >> >> >> > supported d
> >> >> >> > [08/Feb/2011:10:19:53 -0800] add_printer_formats: EPSON:
> >> >> >> > [text/plain not
> >> >> >> > supported d [08/Feb/2011:10:19:53 -0800] add_printer_formats:
> >> >> >> > EPSON: 17 supported types D [08/Feb/2011:10:19:53 -0800]
> >> >> >> > cupsdRegisterPrinter(p=aaba0(EPSON)) I [08/Feb/2011:10:19:53
> >> >> >> > -0800] Loading job cache file
> >> >> >> > "/usr/local/cups-1.4.6/var/cache/cups/job.cache"...
> >> >> >>
> >> >> >> It seems that there is no possible filter chain to convert the text
> >> >> >> types (text/plain, application/x-shell etc.) to
> >> >> >> application/vnd.cups-raster, as this is the only non-raw format the
> >> >> >> printer accepts (using the rastertoepson filter).
> >> >> >>
> >> >> >> Please post the *.convs files from both
> >> >> >> /usr/local/cups-1.4.6/share/cups/mime
> >> >> >> and
> >> >> >> /usr/local/cups-1.4.6/etc/cup
> >> >> >>
> >> >> >> and post a list of the installed filters (probably from
> >> >> >> /usr/local/cups-1.4.6/lib/filter).
> >> >> >>
> >> >> >> Helge
> >> >> >>
> >> >> >
> >> >> >
> >> >>
> >>
> -------------------------------------------------------------------------------
> >> >> > 10-Feb-2011 11:40AM
> >> >> >
> >> >> > mime.convs  ( inside /usr/local/cups-1.4.6/etc/cup, I create a
> >> >> > softlink point to /usr/local/cups-1.4.6/share/cups/mime - same file)
> >> >> >
> >> >>
> >>
> *******************************************************************************
> >> >> > # PostScript filters
> >> >> > #
> >> >> >
> >> >> > application/pdf			application/vnd.cups-postscript	66	pdftops
> >> >> > application/postscript		application/vnd.cups-postscript	66	pstops
> >> >> > application/vnd.hp-HPGL		application/postscript		66	hpgltops
> >> >> > application/x-cshell		application/postscript		33	texttops
> >> >> > application/x-csource		application/postscript		33	texttops
> >> >> > application/x-perl		application/postscript		33	texttops
> >> >> > application/x-shell		application/postscript		33	texttops
> >> >> > text/plain			application/postscript		33	texttops
> >> >> > text/css			application/postscript		33	texttops
> >> >> > text/html			application/postscript		33	texttops
> >> >> > image/gif			application/vnd.cups-postscript	66	imagetops
> >> >> > image/png			application/vnd.cups-postscript	66	imagetops
> >> >> > image/jpeg			application/vnd.cups-postscript	66	imagetops
> >> >> > image/tiff			application/vnd.cups-postscript	66	imagetops
> >> >> > image/x-bitmap			application/vnd.cups-postscript	66	imagetops
> >> >> > image/x-photocd			application/vnd.cups-postscript	66	imagetops
> >> >> > image/x-portable-anymap		application/vnd.cups-postscript	66
> >> >> > imagetops
> >> >> > image/x-portable-bitmap		application/vnd.cups-postscript	66
> >> >> > imagetops
> >> >> > image/x-portable-graymap	application/vnd.cups-postscript	66
> >> >> > imagetops
> >> >> > image/x-portable-pixmap		application/vnd.cups-postscript	66
> >> >> > imagetops
> >> >> > image/x-sgi-rgb			application/vnd.cups-postscript	66	imagetops
> >> >> > image/x-xbitmap			application/vnd.cups-postscript	66	imagetops
> >> >> > image/x-xpixmap			application/vnd.cups-postscript	66	imagetops
> >> >> > #image/x-xwindowdump		application/vnd.cups-postscript	66	imagetops
> >> >> > image/x-sun-raster		application/vnd.cups-postscript	66	imagetops
> >> >> > application/vnd.cups-banner	application/postscript		33	bannertops
> >> >> >
> >> >> >
> >> ########################################################################
> >> >> > #
> >> >> > # Raster filters...
> >> >> > #
> >> >> >
> >> >> > image/gif			application/vnd.cups-raster	100	imagetoraster
> >> >> > image/png			application/vnd.cups-raster	100	imagetoraster
> >> >> > image/jpeg			application/vnd.cups-raster	100	imagetoraster
> >> >> > image/tiff			application/vnd.cups-raster	100	imagetoraster
> >> >> > image/x-bitmap			application/vnd.cups-raster	100	imagetoraster
> >> >> > image/x-photocd			application/vnd.cups-raster	100	imagetoraster
> >> >> > image/x-portable-anymap		application/vnd.cups-raster	100
> >> >> > imagetoraster
> >> >> > image/x-portable-bitmap		application/vnd.cups-raster	100
> >> >> > imagetoraster
> >> >> > image/x-portable-graymap	application/vnd.cups-raster	100
> >> >> > imagetoraster
> >> >> > image/x-portable-pixmap		application/vnd.cups-raster	100
> >> >> > imagetoraster
> >> >> > image/x-sgi-rgb			application/vnd.cups-raster	100	imagetoraster
> >> >> > image/x-xbitmap			application/vnd.cups-raster	100	imagetoraster
> >> >> > image/x-xpixmap			application/vnd.cups-raster	100	imagetoraster
> >> >> > #image/x-xwindowdump		application/vnd.cups-raster	100	imagetoraster
> >> >> > image/x-sun-raster		application/vnd.cups-raster	100	imagetoraster
> >> >> >
> >> >> > # pstoraster is part of GPL Ghostscript...
> >> >> > application/vnd.cups-postscript	application/vnd.cups-raster	100
> >> >> > pstoraster
> >> >> >
> >> >> >
> >> ########################################################################
> >> >> > #
> >> >> > # Raw filter...
> >> >> > #
> >> >> > # Uncomment the following filter to allow printing of arbitrary
> >> >> > # files without the -oraw option.
> >> >> > #
> >> >> >
> >> >> > application/octet-stream	application/vnd.cups-raw	0	-
> >> >> >
> >> >> > #
> >> >> > # End of "$Id: mime.convs.in 8912 2009-12-08 02:13:42Z mike $".
> >> >> >
> >> >>
> >>
> *******************************************************************************
> >> >> >
> >> >> >
> >> >> >
> >> >> > /usr/local/cups-1.4.6/lib/cups/filter
> >> >> > # ls -la
> >> >> > total 1833
> >> >> > drwxr-xr-x   2 root     root          19 Feb  1 12:23 .
> >> >> > drwxr-xr-x   9 root     root           9 Feb  1 12:23 ..
> >> >> > -r-xr-xr-x   1 root     root       39052 Feb  1 12:23 bannertops
> >> >> > -r-xr-xr-x   1 root     root        6700 Feb  1 12:23 commandtoescpx
> >> >> > -r-xr-xr-x   1 root     root        5680 Feb  1 12:23 commandtopclx
> >> >> > -r-xr-xr-x   1 root     root        7576 Feb  1 12:23 commandtops
> >> >> > -r-xr-xr-x   1 root     root        5520 Feb  1 12:23 gziptoany
> >> >> > -r-xr-xr-x   1 root     root       57292 Feb  1 12:23 hpgltops
> >> >> > -r-xr-xr-x   1 root     root       32148 Feb  1 12:23 imagetops
> >> >> > -r-xr-xr-x   1 root     root       60604 Feb  1 12:23 imagetoraster
> >> >> > -r-xr-xr-x   1 root     root       17732 Feb  1 12:23 pdftops
> >> >> > -r-xr-xr-x   1 root     root       49996 Feb  1 12:23 pstops
> >> >> > lrwxrwxrwx   1 root     root          13 Feb  1 12:23 rastertodymo
> >> >> > -> rastertolabel
> >> >> > -r-xr-xr-x   1 root     root       14344 Feb  1 12:23 rastertoepson
> >> >> > -r-xr-xr-x   1 root     root       28116 Feb  1 12:23 rastertoescpx
> >> >> > -r-xr-xr-x   1 root     root       13872 Feb  1 12:23 rastertohp
> >> >> > -r-xr-xr-x   1 root     root       17880 Feb  1 12:23 rastertolabel
> >> >> > -r-xr-xr-x   1 root     root       28480 Feb  1 12:23 rastertopclx
> >> >> > -r-xr-xr-x   1 root     root       41108 Feb  1 12:23 texttops
> >> >> >
> >> >> >
> >> >> >
> >> >> > from error_log, it shows that it can load the filters; however, when
> >> >> > "add_printer_formats", these file types are not supported.
> >> >> >
> >>
> **************************************************************************
> >> >> > d [09/Feb/2011:11:44:01 -0800] cupsdReadConfiguration: filter
> >> >> > text/css to application/postscript 33 texttops d
> >> >> > [09/Feb/2011:11:44:01 -0800] cupsdReadConfiguration: filter
> >> >> > text/html to application/postscript 33 texttops d
> >> >> > [09/Feb/2011:11:44:01 -0800] cupsdReadConfiguration: filter
> >> >> > text/plain to application/postscript 33 texttops .... .... d
> >> >> > [09/Feb/2011:11:44:01 -0800] add_printer_formats: EPSON: text/css
> >> >> > [not
> >> >> > supported d [09/Feb/2011:11:44:01 -0800] add_printer_formats: EPSON:
> >> >> > text/html not supported d [09/Feb/2011:11:44:01 -0800]
> >> >> > add_printer_formats: EPSON: text/plain not supported d
> >> >> > [09/Feb/2011:11:44:01 -0800] add_printer_formats: EPSON: 17
> >> >> > [supported
> >> >> > types
> >> >> >
> >> >> >
> >> >> >
> >> >> > How can I fix this problem of filter chain? Can I manually add a
> >> >> > filter to this printer driver "EPSON.PPD"?(what syntax) Thanks.
> >> >>
> >> >> Oh, forgot no mention that, with the cups device included, the
> >> >> compiled binary needs libcups and libcupsimage for dynamic linking.
> >> >>
> >> >> Helge
> >> >>
> >> >
> >> >
> >>
> -------------------------------------------------------------------------------
> >> > 10-Feb-2011 10:08AM
> >> >
> >> > Thanks Helge. I will try to recompile the ghostscript 9.00 to support
> >> > cups in Solaris. Please verify the steps:
> >> >
> >> > 1. install the package "libcups" and "libcupsimage" first
> >> > 2. compile "ghostscript 9.00" with option "--with-drivers=ALL" that can
> >> > support cups 3. do I need to recompile and install CUPS again?
> >> > 4. finally, does CUPS support to print Chinese character (pdf, text)?
> >> >
> >> > Thanks a lot.
> >>
> >> .... forgot to mention in my last post:
> >>
> >> Chinese text in PDFs should be no problem, provided the fonts are
> >> embedded in the PDFs or installed on the respective printers (cups
> >> currently does not provide font embedding).
> >> Plain chinese text might be a problem, as the current texttops filter
> >> depends on Type1 fonts for the respective unicode ranges, and I doubt the
> >> default font that comes with cups contains the needed glyphs.
> >>
> >> But if you have a suitable font (be ti true type or CID font), it could
> >> be transformed to a type1 font suitable for the texttops filter (then
> >> needs only a litte tweaking of the cups' utf-8 charset file).
> >>
> >> The open source font forge application can do the font conversion very
> >> well.
> >>
> >> Helge
> >>
> >
> >
> >
> -------------------------------------------------------------------------------
> > 11-Feb-2011 09:26AM
> > Thanks again.
> >
> > As I recompile ghostscript that can include the device cups, I can print
> > the pdf (with embedded Chinese font) and English plain text file to Epson
> > dot matrix printer. However, It fails to print the pdf (without embedded
> > Chinese font) because the conversion in ghostscript has an error. As I
> > check and debug in ghostscript, I find that ghostscript 9.00 does not have
> > CIDfmap and related files. In Ghostscript 8.1.5, it has these files and I
> > use conversion command to convert that pdf successfully. At the beginning,
> > I think the new version should be better. Anyway, It seems that missing
> > CID font substitution in Ghostscript 9.00.
> >
> > Question: how can I add back CIDfmap or CID font mapping to Ghostscript
> > 9.00 so that Ghostscript can find the CID font substitution to do the
> > conversion?
>
> A template is in
> xxx/Resource/Init/cidfmap
> where xxx is a directory prefix depending on your ghostscript installation
> (probably something like /usr/share/ghostscript/9.00/).
> You need to tweak this template to your needs.
>
> Helge
>

----------------------------------------------------------------------------
15-Feb-2011 12:12pm

Thanks for GS's help. The font mapping issue is fixed in GS9.00.

When I use gs command ( in cups error_log ) to do conversion, it still fails. Even though gs generates a ps file without any error, the converted ps file cannot be viewed or printed ( just strange character ).

GS commnad
---------------------------------------------------------
/usr/local/bin/gs -dPARANOIDSAFER -dNOPAUSE -I/usr/local/share/ghostscript/9.00/Resource/Init -dDEBUG -dBATCH -dNOMEDIAATTRS -sDEVICE=cups -sOUTPUTFILE=sam.ps -c -f sam.pdf


Then I change to use "-sDEVICE=pswrite" option ( not "-sDEVICE=cups"), everything is fine (can be viewed and printed). It seems that the problem come back to CUPS-1.4.6. Do you have any idea to further debug this issue?

After last recompilation and installation of CUPS, the filters are updated as below.
# pwd
/usr/local/cups-1.4.6/lib/cups/filter
# ls -la
total 1888
drwxr-xr-x   2 root     root          22 Feb 11 16:13 .
drwxr-xr-x   9 root     root           9 Feb  1 12:23 ..
-r-xr-xr-x   1 root     root       39068 Feb 11 16:13 bannertops
-r-xr-xr-x   1 root     root        6716 Feb 11 16:13 commandtoescpx
-r-xr-xr-x   1 root     root        5696 Feb 11 16:13 commandtopclx
-r-xr-xr-x   1 root     root        7592 Feb 11 16:13 commandtops
-r-xr-xr-x   1 root     root        5536 Feb 11 16:13 gziptoany
-r-xr-xr-x   1 root     root       57308 Feb 11 16:13 hpgltops
-r-xr-xr-x   1 root     root       32156 Feb 11 16:13 imagetops
-r-xr-xr-x   1 root     root       60620 Feb 11 16:13 imagetoraster
-r-xr-xr-x   1 root     root       17748 Feb 11 16:13 pdftops
-rwxr-xr-x   1 root     root       16996 Feb 10 16:36 pdftoraster
-r-xr-xr-x   1 root     root       50012 Feb 11 16:13 pstops
-rwxr-xr-x   1 root     root        6426 Feb 10 16:36 pstopxl
-rwxr-xr-x   1 root     root        1874 Feb 10 16:36 pstoraster
lrwxrwxrwx   1 root     root          13 Feb 11 16:13 rastertodymo -> rastertolabel
-r-xr-xr-x   1 root     root       14360 Feb 11 16:13 rastertoepson
-r-xr-xr-x   1 root     root       28132 Feb 11 16:13 rastertoescpx
-r-xr-xr-x   1 root     root       13888 Feb 11 16:13 rastertohp
-r-xr-xr-x   1 root     root       17888 Feb 11 16:13 rastertolabel
-r-xr-xr-x   1 root     root       28496 Feb 11 16:13 rastertopclx
-r-xr-xr-x   1 root     root       41124 Feb 11 16:13 texttops





More information about the cups mailing list