Problems Printing w/ Caldera OpenServer

Joel Hammer Joel at HammersHome.com
Thu Dec 20 19:30:03 GMT 2001


Can you print from linux with an lpr command?
The thing is, if you can't print from linux with lpr or similar command, you
won't print from windows with XP. Samba just uses the linux printing
software.
This is a pretty sparse looking print share [HP952C]. Can't work.
> [HP952C]
> 	printer = HP952C
> 	printable = yes
> 

I think you HAVE to have a print command = parameter. How does samba know
where to send the print job?
The parameter should be:
lpr -Pprintqueue %s; rm %s
Then I think you HAVE to have a spool directory in the share (path =). That is the
place samba stores the print file when it is transferred from windows.
Here is what I have in my raw queue for a windows printer:
[lp]
        comment = Raw Printer for Z53
        path = /tmp
        create mask = 0700
        guest ok = Yes
        hosts allow = 192.168.
        printable = Yes
        printing = lprng
        print command = echo %J %p %s  >>  /tmp/junkJ;\
                       a="`echo '%J' | sed "s/^.*- //"`" ;\
                       echo This is truncated $a >> /tmp/junkJ;\
                       /usr/bin/lpr -Plp  -J"$a"  %s;\
                       rm %s
        lpq command = /usr/bin/lpq -Plp
        lprm command = /usr/bin/lprm -Plp %j
        lppause command = /usr/sbin/lpc hold -Plp %j
        lpresume command = /usr/sbin/lpc release -Plp %j
        printer name = lp

The print command can be simple: /usr/bin/lpr -Plp %s;rm %s.
The fancy command here is used to access the file name, passed as %J, 
not the random samba name for a
print file. The echo stuff is done to strip the long prefix
off word documents. Substitute your own print queue for lp in the above
commands. Or, just add lp as an alias to your printcap file.
Now, about that printcap file. It seems to be missing several important
items, including a print device (lp) and a print spool.
However, I don't know anything about cups, so I can't tell you much more.
You will need to ask the Caldera list or Caldera support how to set up
printing in linux with cups.
Joel


> # Global parameters
> 
> [HP952C]
> 	printer = HP952C
> 	printable = yes
> 
> my printcap file:
> HP952C:
> ps1:
> 
> 
> ---------
> Mike Wills
> AS400 Programmer
> programmerATkoldarkDOTnet




More information about the samba mailing list