Skip navigation.
Home
Now Shipping Version 7.0

Samba: Sharing a printer in raw mode


Posts: 3

Hello folks. I hope someone can help.

I've replaced a crumbling old Win98 PC in my home network with a shiny slightly less old PC on which I've put Mepis. It's my first exposure to Linux and it's great.

I have a Lexmark E320 laser on the parallel port on the Mepis PC and an Olivetti JOB-JET P200 printer on USB on my WinXP PC. Ideally, I would like to send print jobs to either printer from either PC.

Both printers work fine locally. Today I have tried to set it up so that I can print from the XP PC to the Lexmark. I found a great step-by-step guide on http://www.mepisguides.com/printers/samba/part1/samba-share-part-1.html

This helped a lot. Though I did need to add "public = yes" in my printers section of smb.conf
Now all computers can see that printer.
Any printing that I try from Windows to this printer: the print job just disappears.
However I CAN print from DOS after using a command such as:
net use lpt4: \\glenshee\lexmark

The strange thing with printing from DOS is that the PCL escape sequences are ignored. I print pretty invoices from a DOS program which uses PCL commands with embedded HP/GL commands for drawing. Now, I'm just seeing the text of all those commands. The other oddity is that when printing plain text, the origin is now too close to the corner of the paper so that I lose the top line and leftmost column.

So, I have 2 problems: print jobs from Windows just go nowhere and the printer is not behaving as it did when it was used under Windows.

The printer driver I selected for Mepis is Generic PCL4 - though I can't see that it should make any difference as the printer is shared as "raw".

I haven't put much effort yet into printing to the Olivetti from the Mepis PC. It seems that there's no specific driver for this printer for Linux, though I believe that Generic PCL3 should work.

I'd be grateful for any clues.
Here is my smb.conf:

;*******************section global*****************
[global]

# Do something sensible when Samba crashes: mail the admin a backtrace
panic action = /usr/share/samba/panic-action %d
printcapname = cups
printing = cups
workgroup = WORKGROUP
server string = %h server (Samba %v)
hosts allow = 192.168.1.
socket options = IPTOS_LOWDELAY TCP_NODELAY
log level = 1
dead time = 15
wins support = yes
hide unreadable = yes
passdb backend = tdbsam guest
dns proxy = no
max log size = 1000
security = share
restrict anonymous = no
domain master = yes
preferred master = no
max protocol = NT
ldap ssl = No
server signing = Auto
oplocks = No
level2 oplocks = No
;*******************section user*****************
[user]
browseable = yes
writeable = yes
available = yes
public = yes
comment = /home/user
path = /home/user
guest ok = yes
read only = no
;*******************section homes*****************
[homes]
comment = Home Directories
browseable = yes
read only = no
;*******************section printers*****************
[printers]
comment = All Printers
path = /tmp
browseable = yes
public = yes
printable = yes
guest ok = yes
create mode = 0700
guest only = yes
guest account = smbprint
use client driver = yes
print command = lpr -P %p -o raw %s -r
lpq command = lpstat -o %p
lprm command = lprm -P %p %j

Me again... I've just found

Me again...

I've just found where the log files live and I see:

[2007/02/01 12:54:55, 0] printing/print_cups.c:cups_job_submit(643)
Unable to print file to lexmark - client-error-document-format-not-supported

which probably explains the disappearing print jobs. I guess this means that samba doesn't know that incoming jobs for this printer are to be printed as raw.

And that makes me think that one of testparm's messages was significant:
Warning: Service printers defines a print command, but print command parameter is ignored when using CUPS libraries.

So, does that mean that it is ignoring my "raw" parameter? If so, how do I fix it?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.