share a printer to winxp from samba

To share a printer to the windows world you should:
Modify /etc/cups/cupsd. conf
<Location /printers/deskjet>
#Order Allow,Deny //comment
#Deny From All //comment
Allow From 127.0.0.1
Allow From 172.16.1.*
#AuthType None
Allow from All
</Location>
<Location />
#Order Deny,Allow
#Deny From All
Allow From 127.0.0.1
Allow From 172.16.1.*
</Location>
Browsing On
BrowseProtocols cups
#BrowseOrder Deny,Allow
BrowseAllow @LOCAL
Modify smb.conf, ensure the following is set:
printing = cups
printcap name = cups
[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
guest ok = no
writable = no
printable = yes
printing = cups
public = yes
printer name = deskjet
Then I had this error:
lpr: unable to print file: client-error-document-format-not-supported
So we edit /etc/cups/mime.types and change:
application/vnd. cups-raw (string(0,<1B>E) + !string(2,<1B>%0B)) string(0,<1B>@) 238/433
(contains(0,128,<1B>%-12345X) + (contains(0,1024,”LANGUAGE=PCL”) contains(0,1024,”LANGUAGE = PCL”)))
to
application/vnd. cups-raw (string(0,<1B>E) + !string(2,<1B>%0B)) string(0,<1B>@) (contains(0,4096,<1B>%-12345X) + (contains(0,4096,”LANGUAGE=PCL”) contains(0,4096,”LANGUAGE = PCL”)))

Leave a Reply

Your email address will not be published. Required fields are marked *