Windows printer from Linux?

Windows printer from Linux?

Post by J. Rains, WSI.com Consultin » Mon, 01 Jun 1998 04:00:00



Hi all... We have a small office setup here and our printer is hooked
up to a system running Win95. The server is running Samba for file
sharing... I don't know if that matters though. I would like to print
from my Linux system (not the same system as the server) to the Windows
printer. Is this possible? Can anyone point me to where to look for
information on doing this?

Thanks,
Justin Rains
http://www.wsicnslt.com/           Contact us for all

 
 
 

Windows printer from Linux?

Post by Peter Teube » Mon, 01 Jun 1998 04:00:00



Quote:

> Hi all... We have a small office setup here and our printer is hooked
> up to a system running Win95. The server is running Samba for file
> sharing... I don't know if that matters though. I would like to print
> from my Linux system (not the same system as the server) to the Windows
> printer. Is this possible? Can anyone point me to where to look for
> information on doing this?

We'll, you've already answered your own question. I found the answer
in the samba documentation. Essentially, you enable print sharing
on your win box, which you probably already have done. On your
linux box you add sometjhing like the following to your printcap
file

smb:lp=/dev/null:sd=/usr/spool/smb:sh:if=/usr/sbin/smbprint

although my memory doesn't serve me very well anymore. Hmm, I also
found /etc/printcap.smb. It worked fine for me (apart from
some page eject that didn't work one way, and a extra page
the other way around (printing via linux on W95). I confirmed
it worked both ways, but in practice I wound up using an A/B
switch.

I found the samba documentation clear enough to figure it out.

    peter

 
 
 

Windows printer from Linux?

Post by Dave Brou » Tue, 02 Jun 1998 04:00:00


Depending on what you mean by windows printer, this may or may not
possible.  If you mean "Windows Printer" as in "only will work with
special windows drivers" then it won't work with linux.  If you mean
"printer that happens to be connected to a Windows box" the it may work
with linux as well.

First, I'd try getting the printer to work with linux.  If it doesn't
depend on windows, then attach the cable to a linux box, and cat a file to
/dev/lp0 (or /dev/lp1).  If this works, setup print filters to print
various types of graphics (look at ghostscript or magic-filters).

The "best" setup would probably be to put the printer right on the
fileserver, using samba, since I assume this machine will always be
available (as in less crash prone), then attach to this as a Network
Printer from the win95 client(s).



> On Sun, 31 May 1998 18:48:53 -0400, "J. Rains, WSI.com Consulting"

>>Hi all... We have a small office setup here and our printer is hooked
>>up to a system running Win95. The server is running Samba for file
>>sharing... I don't know if that matters though. I would like to print
>>from my Linux system (not the same system as the server) to the Windows
>>printer. Is this possible? Can anyone point me to where to look for
>>information on doing this?

> From what I have read on the Printing from LINUX - HOWTO, no code for
> printing to windows printers has been written yet.  These printers
> seem to rely heavily on the computer to do all necessary computations
> that are normally performed by other printers on-board-chipsets.

> Of course, I myself, am very new to this, so I could be wrong.  That
> is just what I read.

> Whatever it was, it wasn't my fault!
> Since I hate junk mail,
> replace the "booney" with "boone" to respond.

--

 
 
 

Windows printer from Linux?

Post by Bernd G » Tue, 02 Jun 1998 04:00:00



Quote:> Hi all... We have a small office setup here and our printer is hooked
> up to a system running Win95. The server is running Samba for file
> sharing... I don't know if that matters though. I would like to print
> from my Linux system (not the same system as the server) to the Windows
> printer. Is this possible? Can anyone point me to where to look for
> information on doing this?

The question I'm wondering about: What kind of printer are you using?

* A postscript one? No Problem, just pipe the postscript file via smbclient
to your win95 printer.

*An other one? Uh! A little bit more difficult but you can deal with it.
On our private network I build up such a solution. From our Linux box all
printings are redirected to my HP DeskJet 5xx connected to my PC running
win95. In general it is right, that windows printers refer to windows
drivers, but good luck! There is a tool called ghostscript. On Linux/Unix
it is a well known tool. You can use ghostscript to convert Postscript
files in various output formats. See the list of filters below. Perhaps a
filter for your printer is available!

   x11 x11alpha x11cmyk x11mono appledmp iwhi iwlo iwlq t4693d2 t4693d4
   t4693d8 tek4696 ap3250 epson eps9mid eps9high epsonc st800 stcolor
   cdeskjet cdjcolor cdjmono cdj500 cdj550 pjxl pjxl300 deskjet djet500
   djet500c dnj650c paintjet pj pjetxl laserjet ljet2p ljet3 ljet3d ljet4
   lj4dith ljetplus lp2563 bj10e bj200 bjc600 bjc800 lbp8 lips3 declj250
   la50 la70 la75 la75plus ln03 lj250 cp50 ibmpro jetp3852 imagen m8510
   necp6 oce9050 oki182 okiibm r4081 sj48 ccr xes pbm pbmraw pgm pgmraw
pgnm
   pgnmraw pnm pnmraw ppm ppmraw dfaxhigh dfaxlow faxg3 faxg32d faxg4
   tiffcrle tiffg3 tiffg32d tiffg4 tifflzw tiffpack tiff12nc tiff24nc
psmono
   bit bitrgb bitcmyk mgrmono mgrgray2 mgrgray4 mgrgray8 mgr4 mgr8 pcxmono
   pcxgray pcx16 pcx256 pcx24b pngmono pnggray png16 png256 png16m miff24
   pdfwrite nullpage

The only thing you have to do is to install a filter script for your
printer on your Linux box wherein you pipe your printing through
ghostscript to smbclient.

Bernd

p.s. I'm going to finish my studies soon and now I'm looking for a job.
Feel free to contact me!

                       /--------------------------------------\
                       | http://no-panic.wh.uni-stuttgart.de/ |
                 MMM  /\--------------------------------------/
                 o o /
--------------OO--U--OO-------------------------------------------------

 
 
 

Windows printer from Linux?

Post by Kalevi Hautanie » Tue, 02 Jun 1998 04:00:00



: Hi all... We have a small office setup here and our printer is hooked
: up to a system running Win95. The server is running Samba for file
: sharing... I don't know if that matters though. I would like to print
: from my Linux system (not the same system as the server) to the Windows
: printer. Is this possible? Can anyone point me to where to look for
: information on doing this?

I have, in a setup of my own, HP-laserjet connected into an NT-box. I
think you can use it as a guideline for yours.

My NT is machine called 'NSRLSLC6' in our LAN. I have that printer shared
there as 'HP_4M+'. In my Linux box I have printcap entry for it like this:

HP:\
        :lp=/dev/null:\
        :sd=/usr/spool/HP_4M+:\
        :sh:\
        :mx#0:\
        :ff:\
        :if=/usr/local/sbin/smbprint:
-----------------------------------------------
My /usr/local/sbin/smbprint is like this:

#!/bin/sh -x
logfile=/tmp/smb-print.log
eval acct_file=\$$#
spool_dir=`dirname $acct_file`
config_file=$spool_dir/.config

# Should read the following variables set in the config file:
#   server
#   service
#   password
eval `cat $config_file`

#
# Some debugging help, change the >> to > if you want to same space.
#
echo "server $server, service $service" >> $logfile

(
# NOTE You may wish to add the line `echo translate' if you want automatic
# CR/LF translation when printing.
#       echo translate
        echo "print -"
        cat
) | /usr/bin/smbclient "\\\\$server\\$service" $password -U $server -N -P

Quote:>> $logfile

--------------------------------------------
And finally my /var/spool/HP_4M+/.config is:

server=NSRLSLC6
service=HP_4M+
password=""
--------------------------------------------
That's it!

In Linux, when I'm printing, I just command 'lpr -PHP <filename>'.

Smbprint file was derived from sample file accompanied with samba
-package.  Works like charm if only NT is up and running!

--
Kalevi J Hautaniemi,      Marjatankatu 12,     33730 Tampere,  FINLAND.
****  http://oh3tr.ele.tut.fi/~oh3fg/ ****  On air:  OH3FG, KO4BC  ****
tel:+358-3-364-7446    fax:+358-3-364-2476    mobile:+358-50-590-2243

 
 
 

Windows printer from Linux?

Post by Isaac T » Wed, 03 Jun 1998 04:00:00


    Dave> Depending on what you mean by windows printer, this may or may not
    Dave> possible.  If you mean "Windows Printer" as in "only will work
    Dave> with special windows drivers" then it won't work with linux.  If
    Dave> you mean "printer that happens to be connected to a Windows box"
    Dave> the it may work with linux as well.

Hot on Linux Gazette: the problem may be solved already if what one have had
is an HP printer.

http://www.ssc.com/lg/issue29/lg_tips29.html#davis

I think the fact that it is not possible to disallow printing to file and
that it is difficult to restrict the use of such printed files make it
somewhat "difficult" to enforce NDA on printers (unless they start to do
encryption, but then performance might start dropping).

Isaac.

 
 
 

1. Need help accessing shared files in window on Linux and windows printer on Linux.

1.) Hi guys I would like to know how I can view the shared folders in
windows on my Linux machine. I can see my shared Linux home directory on
windows but I can't access the shared windows folders on Linux or even see
them on my Linux box. How would I go about correcting this problem?

2.) Also how would I be able to print from Linux box onto my printer  (
Lexmark 2050 Color Ink Jet Printer ) on my windows machine ?

P.S. Thanks in advance.

--
My System Specs: http://www.anandtech.com/mysystemrig.html?rigid=13762

2. Recompiled kernel does not work! (Ygg Fall 94)

3. Mount a Windows printer in Linux with Samba.

4. HELP!!! Xconfig... HELP!!!

5. Windows Printer/GDI Linux driver project.

6. Questions about gethostbyaddr()

7. Accessing a remote Windows Printer from Linux

8. Warning ECC corrected errors

9. Share a Windows Printer with Linux

10. WINDOWS printers and Linux

11. Printer to windows printers

12. Using samba and windows drivers to print to windows printer

13. Can I use the printer attached a PC Windows 95 or Windows NT