Help with Win->Unix printing

Help with Win->Unix printing

Post by John Clark » Wed, 25 Jun 2003 12:40:29



Am running Samba V2.2.7a on a SCO 5.0.2 system.
The printer 'spmgm3' is a valid unix printer attached to a wyse terminal at
/dev/prn1c06.

Have added the following to smb.conf to make 'spmgm3' available to windows
users.

[spmgm3]
  printing = sysv
  comment = Johns Test Printer
  browseable = yes
  printable = yes
  printer name = spmgm3
  public = yes
  writable = yes
  create mode = 0755
  path = /tmp
  print command = lp -o nobanner -s -c -d %p %s > /dev/null 2>&1 ; rm %s
  printer driver = Epson LX-300+

The printer 'spmgm3' then appears in the network neighborhood, and I am able
to create this printer on a windows box. When I print to it, a file
'/tmp/smbprn.000004.a0079f' is created and I assume sent to the Epson
printer 'spmgm3'.

Problem is that the printer prints about 2 characters and locks up,
requiring a restart. Looking at the file above is no help as it is not
readable. It appears to be a compiled file created by the print process from
windows.

Can anyone help me with this one??

Thanks and regards,

John Clarke

 
 
 

Help with Win->Unix printing

Post by Dirk Kraus » Wed, 25 Jun 2003 17:50:12




Quote:> Am running Samba V2.2.7a on a SCO 5.0.2 system.
> The printer 'spmgm3' is a valid unix printer attached to a wyse
> terminal at /dev/prn1c06.

> Have added the following to smb.conf to make 'spmgm3' available to
> windows users.

> [spmgm3]
>   printing = sysv
>   comment = Johns Test Printer
>   browseable = yes
>   printable = yes
>   printer name = spmgm3
>   public = yes
>   writable = yes
>   create mode = 0755
>   path = /tmp
>   print command = lp -o nobanner -s -c -d %p %s > /dev/null 2>&1 ; rm
>   %s printer driver = Epson LX-300+

> The printer 'spmgm3' then appears in the network neighborhood, and I
> am able to create this printer on a windows box. When I print to it, a
> file '/tmp/smbprn.000004.a0079f' is created and I assume sent to the
> Epson printer 'spmgm3'.

> Problem is that the printer prints about 2 characters and locks up,
> requiring a restart. Looking at the file above is no help as it is not
> readable. It appears to be a compiled file created by the print
> process from windows.

> Can anyone help me with this one??

> Thanks and regards,

> John Clarke

Hi John,

in the Windows system control go to the printers properties,
in the extended settings set
"start printing after spooling last page". This prevents
a connection timeout which might happen if the first part of
the print job is submitted and the next page - i.e. a
complicated graphics - needs a longer time to be printed.

Another possible problem source is automatic print job
translation by the print system itself. Some print systems
(i.e. LPRng i use) classify incoming print jobs to be
raw print data, postscript, dvi, groff output or plain text...
and run filters to enforce postscript output.
When printing from Windows systems your jobs file type
is binary or raw print data. When running LPRng lpr command
I can specify "-l" or "-b". Unfortunately I do not know sysv
printing options for this, please check the man page.

Yet another problem might be the "lpr ... ; rm ...".
On some systems the lpr command returns immediately
while doing the printing in a background process. In this
case the rm removes the print data file while printing
is running. LPRng's lpr command has a "-r" option
to remove the printed file after finishing printing.
This allows to run "lpr -r ..." instead of
"lpr ... ; rm ...".
Check your lp for one of the following options:
- remove printed file after printing or
- make lpr return after spooling the file is completed or
- use a temporary copy of files for printing.

Hope this helps.
Regards,

Dirk

--
Dirk Krause
http://et.fh-schmalkalden.de/personen/dhp/krause

 
 
 

Help with Win->Unix printing

Post by John Clark » Thu, 26 Jun 2003 10:17:08


Dirk,

Thanks for your thoughts, no luck though.

Tried setting the printer in windows to print after last page spooled and
print directly to printer but no change.
Have removed the 'rm' command from the print command also so that I can
check on the file being printed.

 I cant find any options other than postscript and raw for the SCO lp
command.

Whatever options I try, my printer simply prints a few characters jammed

As the file created on my unix box each time I send a print request from
windows it appears to be binary, this is not my area so I am assuming here,
this is probably be what is causing the problem. Also I have naturally
tested that a plain text file created in unix prints fine.

Thanks agin for your thoughts, perhaps someone else will pick up on this.

Kind regards,

John




> > Am running Samba V2.2.7a on a SCO 5.0.2 system.
> > The printer 'spmgm3' is a valid unix printer attached to a wyse
> > terminal at /dev/prn1c06.

> > Have added the following to smb.conf to make 'spmgm3' available to
> > windows users.

> > [spmgm3]
> >   printing = sysv
> >   comment = Johns Test Printer
> >   browseable = yes
> >   printable = yes
> >   printer name = spmgm3
> >   public = yes
> >   writable = yes
> >   create mode = 0755
> >   path = /tmp
> >   print command = lp -o nobanner -s -c -d %p %s > /dev/null 2>&1 ; rm
> >   %s printer driver = Epson LX-300+

> > The printer 'spmgm3' then appears in the network neighborhood, and I
> > am able to create this printer on a windows box. When I print to it, a
> > file '/tmp/smbprn.000004.a0079f' is created and I assume sent to the
> > Epson printer 'spmgm3'.

> > Problem is that the printer prints about 2 characters and locks up,
> > requiring a restart. Looking at the file above is no help as it is not
> > readable. It appears to be a compiled file created by the print
> > process from windows.

> > Can anyone help me with this one??

> > Thanks and regards,

> > John Clarke

> Hi John,

> in the Windows system control go to the printers properties,
> in the extended settings set
> "start printing after spooling last page". This prevents
> a connection timeout which might happen if the first part of
> the print job is submitted and the next page - i.e. a
> complicated graphics - needs a longer time to be printed.

> Another possible problem source is automatic print job
> translation by the print system itself. Some print systems
> (i.e. LPRng i use) classify incoming print jobs to be
> raw print data, postscript, dvi, groff output or plain text...
> and run filters to enforce postscript output.
> When printing from Windows systems your jobs file type
> is binary or raw print data. When running LPRng lpr command
> I can specify "-l" or "-b". Unfortunately I do not know sysv
> printing options for this, please check the man page.

> Yet another problem might be the "lpr ... ; rm ...".
> On some systems the lpr command returns immediately
> while doing the printing in a background process. In this
> case the rm removes the print data file while printing
> is running. LPRng's lpr command has a "-r" option
> to remove the printed file after finishing printing.
> This allows to run "lpr -r ..." instead of
> "lpr ... ; rm ...".
> Check your lp for one of the following options:
> - remove printed file after printing or
> - make lpr return after spooling the file is completed or
> - use a temporary copy of files for printing.

> Hope this helps.
> Regards,

> Dirk

> --
> Dirk Krause
> http://et.fh-schmalkalden.de/personen/dhp/krause

 
 
 

Help with Win->Unix printing

Post by Dirk Kraus » Thu, 26 Jun 2003 17:50:56




> Whatever options I try, my printer simply prints a few characters

> work.

Hi John,


(HP's print job language) and other printer control languages.
Normally such strings should not be printed, they are used to
set up printer resolution, duplex printing...
If this string appears on paper it is very likely some
filtering is going on in your print system converting
these control strings to printable output.
So you should try the "raw" option of your lp program.
If filtering is working the problem is to find out whether
filtering takes place in your Samba server's print system
or in the Wyse terminal's print system.

To check whether the printer driver and it's settings are
ok connect the printer locally to the Windows computer and print
a test page.

Another test is to print a test print job (i.e. from notepad or so)
to file on the Windows computer and to print the same thing to
the Samba printer share. If you have no "rm" running you can
compare the /tmp/smbprn.000004.a0079f file and the file created
on the Windows computer, they should have the same contents.

You can also transfer the Windows print job file to
the Samba server and play with lpr/lp options allowing to print
the file correctly. On success use the same options in smb.conf.

Try to place "printing=sysv" in the global configuration section.

Regards,

Dirk

--
Dirk Krause
http://et.fh-schmalkalden.de/personen/dhp/krause

 
 
 

Help with Win->Unix printing

Post by John Clark » Fri, 27 Jun 2003 17:07:38


Hi Dirk,

Thanks for the suggestions.
The printer works fine if I send a print job directly to it when connected
to a Win box.

Have tried to print 'This is a test' from wordpad to a file on my windows
box and to the shared samba printer on unix.
Both files were identical as under;



 t  6 R  P  (U
 (C  o  (c  H r
 r  $5  * p                                                              

 J  $5  * p                                                            




Is this what you would expect?

Have tried all combinations of printing this file in unix with lp but

Something that seems so simple should not be so difficult I am sure.

Lp must be changing this file somehow to make it unnacceptable to the
printer as printing it from windows to a windows Epson LX300 printer is
fine. (From wordpad that is and not from the file created.)

Have had a few other opportunities today so didnt have much time for this
but will try again tomorrow.

Thanks again for your help.

John




> > Whatever options I try, my printer simply prints a few characters

> > work.

> Hi John,


> (HP's print job language) and other printer control languages.
> Normally such strings should not be printed, they are used to
> set up printer resolution, duplex printing...
> If this string appears on paper it is very likely some
> filtering is going on in your print system converting
> these control strings to printable output.
> So you should try the "raw" option of your lp program.
> If filtering is working the problem is to find out whether
> filtering takes place in your Samba server's print system
> or in the Wyse terminal's print system.

> To check whether the printer driver and it's settings are
> ok connect the printer locally to the Windows computer and print
> a test page.

> Another test is to print a test print job (i.e. from notepad or so)
> to file on the Windows computer and to print the same thing to
> the Samba printer share. If you have no "rm" running you can
> compare the /tmp/smbprn.000004.a0079f file and the file created
> on the Windows computer, they should have the same contents.

> You can also transfer the Windows print job file to
> the Samba server and play with lpr/lp options allowing to print
> the file correctly. On success use the same options in smb.conf.

> Try to place "printing=sysv" in the global configuration section.

> Regards,

> Dirk

> --
> Dirk Krause
> http://et.fh-schmalkalden.de/personen/dhp/krause

 
 
 

Help with Win->Unix printing

Post by Dirk Kraus » Sat, 28 Jun 2003 01:49:35



Quote:

> Hi Dirk,

> Thanks for the suggestions.

Hi John,
on my old Solaris 2.6 the lp man page says, I have to
use the "-r" option for raw printing.
So you can try

lp -r ...

Another test:
Transfer the file to the Wyse terminal, log in as root
there and type

cat file > /dev/...      (insert printer device here)

If this prints the file correctly, go to the Samba server
and try


use your print queue name and the host name or IP address
of the Wyse terminal. Possibly you have to replace
-d by -P, consult the man page.

I have a long weekend now, will be back on monday.
Can you send a copy of your lp's man page?

On Solaris 2.6 there is a directory
/etc/lp/fd containing files *.fd.
These files contain print filter descriptions, each file
has a line like "Input types: simple,postscript" and a
line "Command: /usr/bin/cat". Input types and commands differ.
Check for one *.fd file pointing to the "cat" command
or which has no command specified. Take a look at the input
type and try
lp -T simple -r ...
This marks the print job as type "simple". While looking at
the *.fd files the print system finds the appropriate filter
information and selects the cat command as filter which
does not apply any change to the print job before transferring
it to the printer.

Regards and have a nice weekend

Dirk

--
Dirk Krause
http://et.fh-schmalkalden.de/personen/dhp/krause

 
 
 

Help with Win->Unix printing

Post by John Clark » Sat, 28 Jun 2003 09:36:16


Dirk,


option as per the man pages

Tried 'cat samba_print_file >/dev/prnxxxx' where /dev/prnxxxx is the printer
attached to the Wyse terminal.

My Wyse terminal does not have an ip address nor a print queue nor any
ability to store a file for printing. It's just a dumb serial terminal. It
uses pass through or attached printing. All print jobs are prefixed and
appended with a control code by my Stallion serial port software. These
control codes switch the display off/printer on and back again at the end of
the print job.

Also have the -T option with SCO's lp.
Tried lp -T simple -r etc, but same result.

I guess my thoughts at this time are that if I cannot cat the file
successfully to the printer which would send it 'as is' then there must be a
problem with the contents of the file itself.

If you send a print job to a samba printer share from wordpad on your win pc
that says 'This is a test', does the file created on your unix box look the
same as mine from my prev. post?

Will attach the lp man file to a separate mesg and send it direct thogh I'm
not sure that you will find much.
I've been thru it a dozen times already.

You must be having a long weekend with Friday off if you are off for the
weekend already.
Good luck to you. I have 8 hours to go before mine.

Have a good one and thanks again.

Regards,

John




> Hi John,
> on my old Solaris 2.6 the lp man page says, I have to
> use the "-r" option for raw printing.
> So you can try

> lp -r ...

> Another test:
> Transfer the file to the Wyse terminal, log in as root
> there and type

> cat file > /dev/...      (insert printer device here)

> If this prints the file correctly, go to the Samba server
> and try


> use your print queue name and the host name or IP address
> of the Wyse terminal. Possibly you have to replace
> -d by -P, consult the man page.

> I have a long weekend now, will be back on monday.
> Can you send a copy of your lp's man page?

> On Solaris 2.6 there is a directory
> /etc/lp/fd containing files *.fd.
> These files contain print filter descriptions, each file
> has a line like "Input types: simple,postscript" and a
> line "Command: /usr/bin/cat". Input types and commands differ.
> Check for one *.fd file pointing to the "cat" command
> or which has no command specified. Take a look at the input
> type and try
> lp -T simple -r ...
> This marks the print job as type "simple". While looking at
> the *.fd files the print system finds the appropriate filter
> information and selects the cat command as filter which
> does not apply any change to the print job before transferring
> it to the printer.

> Regards and have a nice weekend

> Dirk

> --
> Dirk Krause
> http://et.fh-schmalkalden.de/personen/dhp/krause

 
 
 

Help with Win->Unix printing

Post by Dirk Kraus » Tue, 01 Jul 2003 18:14:10




Quote:

> My Wyse terminal does not have an ip address nor a print queue nor any
> ability to store a file for printing. It's just a dumb serial
> terminal. It uses pass through or attached printing. All print jobs
> are prefixed and appended with a control code by my Stallion serial
> port software. These control codes switch the display off/printer on
> and back again at the end of the print job.

Hi John,
you can verify the correctness of the print file by attaching
the printer to the Windows computer and typing
  copy file lpt1: /B
May be the problem is in the control codes switching the
Wyse terminal between display and printer use.
A binary print job file may contain seqences of binary numbers
which your Wyse terminal may interprete somehow.
I'd suggest to connect the printer to either the Windows PC or to
the UNIX server running Samba.
If the printer is a PostScript printer you can try to install a
PostScript driver for that printer on the Windows PC. But you must
make sure the print jobs generated by the driver do not contain
leading and trailing binary job control data. Maybe you need to
edit the *.ppd file for the printer. Alternatively you can use
the Adobe standard Postscript driver.

Regards,

Dirk

--
Dirk Krause
http://et.fh-schmalkalden.de/personen/dhp/krause

 
 
 

Help with Win->Unix printing

Post by John Clark » Wed, 02 Jul 2003 14:24:36





> Hi John,
> you can verify the correctness of the print file by attaching
> the printer to the Windows computer and typing
>   copy file lpt1: /B
> May be the problem is in the control codes switching the
> Wyse terminal between display and printer use.
> A binary print job file may contain seqences of binary numbers
> which your Wyse terminal may interprete somehow.
> I'd suggest to connect the printer to either the Windows PC or to
> the UNIX server running Samba.
> If the printer is a PostScript printer you can try to install a
> PostScript driver for that printer on the Windows PC. But you must
> make sure the print jobs generated by the driver do not contain
> leading and trailing binary job control data. Maybe you need to
> edit the *.ppd file for the printer. Alternatively you can use
> the Adobe standard Postscript driver.

Dirk,

You hit the nail on the head. I don't know why I didn't think to test this.

It DOES NOT work with ATTACHED printers.

I set up a dedicated serial printer and BINGO, worked perfectly first time.

As I said before, something so simple should not be hard to set up and it
wasn't in the end.
I will have to change a few printers over from attached to dedicated but
that then fixes the problem.

Thanks for your help and if you are ever in Adelaide, South Australia, I owe
you a few beers.

Kind regards,

John Clarke

 
 
 

1. Printing NT w/s > NT srv > Unix > Lexmark

We are suffering from very slow printing. I think that the actual
printing itself is quick, but when Word opens a document or when the
print pop-up is requested it takes 5-10 minutes to appear and then, to
change printer takes a very long time. When the little printer
icon indicates that it is actually printing, the busy light on the
printer starts flashing almost immediately.

We have a number of NT4 workstations looked after by an NT4 PDC and
backup.  Our printers (HP and Lexmark) are driven from 2 Solaris 7
machines, one for HP and one for Lexmark.  The NT backup server looks
after the printers for the PCs and sends the requests to Solaris with
Samba 2.0.7.  The printer drivers are set up on the NT server, rather
than on each PC.  It is my impression that the slowness is when PC apps,
such as Word, ask for information about the printer. The printing on
the Solaris side works fine, including from smbclient.

When things are running slowly I can see lpstat being constatly run on
the Samba server, in response to requests coming over the net from the
NT server.  It is variable, sometimes the response is very fast and
lpstat is not to be seen running on the Samba server.

On the NT server it appears that the Lexmark software has been installed
to drive the printers (Markvision), along with the printer drivers
needed by the PCs.  Among the services running on the server is LexBce
which is closely coupled with the spooler.  (Stopping one, stops the
other)

I get the impression that the Lexmark software is being too clever
and getting in the way on the NT server.

Is the concept of using the NT server to supply the drivers, while
passing on the print request via Samba, ok? One down side is that
the print request is handled as administrator on the NT server,
which is then executed as the guest account on Solaris.

Thank you for any help or advice

Geoff Gibbs
--
UK-Human Genome Mapping Project-Resource Centre,
Hinxton, Cambridge, CB10 1SB, UK

2. how does CR0 work?

3. Floating Exception error printing unix->win

4. automatic Reply-To filling

5. Printing problem (from UNIX->NT->Win95 server)

6. Outlook Express, yProxy and Spybot Search & Destroy

7. connect UNIX->PC->UNIX

8. SLRN 0.8.8.1 is...well, look at my header

9. Unix -> Windows printing

10. Unix --> Work Group 4 Windows printing

11. Printing UNIX --> Wg4W

12. UNIX --> NT printing

13. Printing Problem from NT -> UNIX(FreeBSD)