Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
p910nd - The easiest way to set up Network Printing! :-)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Kai Hvatum
Tux's lil' helper
Tux's lil' helper


Joined: 04 Feb 2004
Posts: 93
Location: Traveling around the US

PostPosted: Fri Jul 20, 2007 4:49 am    Post subject: p910nd - The easiest way to set up Network Printing! :-) Reply with quote

The entire saga of setting up a Samba printer share such that it auto loads windows drivers and "just works" for clients can be difficult. Why not just set up a "dumb" print server and have Linux serve the same function that those cheap $50 networked print servers do?

Solution I: A "dumb" print server Daemon, runnable under Gentoo.
http://etherboot.sourceforge.net/p910nd/

The P910ND program simply makes your Gentoo Linux server act as a standard TCP/IP Jet Direct print server. Once it is running on a Linux server you can easily set up Windows, Linux or OSX to print to it - after all it's a method of forwarding raw print commands over the network. No messing around with Samba configurations or LPR print clients.

1. Grab the p910nd code from the site above, compile and install.
2. Figure out where your printer is in /dev. My ML-1740 was under /dev/usblp0. If this is the case then the command:
Code:
./usr/sbin/p910nd -f /dev/usblp0

Should work.
2. Add p910nd as a Daemon to xinetd or whatever else. If you're using xinetd the following should work:
Code:
p9101 stream tcp nowait root /usr/sbin/p910nd -f /dev/usblp0


Solution II: A stand along Network print server boot-able off of a floppy:
http://members.shaw.ca/nicholas.fong/printsrv/

To add clients follow these instructions. these methods are applicable whether you use the stand alone print server or the p910nd daemon under Gentoo:
Nicholas Fong wrote:
How to setup a client PC to talk to a Print Server.
Have the appropriate "printer driver" ready, either on a floppy, or on a hard disk, or on a network shared drive. If your printer model is not included in Windows' default list, use the "Have Disk" method. In some situations, you may have to install the printer driver first as if it were hooked up directly to a LPT port.

g Windows Vista:
Click Start .. Control Panel, .. Printers, ..Add Printer, .. Add Local Printer, ..Create a new port, .. Standard TCP/IP port, .. Next, .. Device type TCP/IP device, Hostname or IP address = 192.168.10.252 ... port name=PrintSrv, .. check off "Query the printer and automatically select the driver to use", wait while detecting, .. Custom, .. Settings, .. Raw, .. Port 9100, .. Next, .. select the driver, .. Next, .. Print a test page.

Thanks to Darko Separovic of University of BC, Vancouver, Canada for the Vista driver tip.

gWindows XP:
Click Start.. (Control Panel).. Printers and Faxes...Add Printer...Local Printer...(check off Auto Detect PnP)...Next....Create new port...Standard TCP/IP port...
IP address = 192.168.1.252, port name=PrintSrv, Custom, Settings.. Raw.. Port 9100

g Windows 2000 (method A)
Click Start...Settings, Printers, Add Printers, Local Printer, Create New Port,
Choose Standard TCP/IP port,
IP address = 192.168.1.252, port name=PrintSrv, Custom, Settings.. Raw.. Port 9100

g Windows 2000 (method B)
First, install AXIS Print Monitor.
Click Start...Settings, Printers, Add Printers, Local Printer, Create New Port,
Choose AXIS port, choose RAW TCP/IP port,
IP address = 192.168.1.252, port number = 9100

g Windows 2000 quirks
Sometimes the printer driver becomes corrupted, if that happens, delete the printer driver by re-installing the same printer driver on the LPT1 (local) port. Then repeat method A or method B above. Thanks to Hillie Sample of Ottawa, Canada g for this tips.

g Windows NT:
First, install AXIS Print Monitor.
Start...Settings, Printers, Add Printers, "My Computer", Add Port,
Choose AXIS port, choose RAW TCP/IP port, click OK,
IP address = 192.168.1.252, port number = 9100

g Windows 98/ME: (pain+)
First, install AXIS Print Monitor.
Second, click Start...Settings, Printers, Add Printers, Local Printer, choose TCP/IP AXIS port.
(Windows 98 will ask for the Windows 98 CD, unless c:\windows\options\cabs is intact).
Third, right click on the new printer icon, choose Properties, Details, Add Port, click Other,
choose AXIS port, click OK, choose RAW (TCP/IP), click OK,
IP address = 192.168.1.252, port number = 9100, click Apply, click OK
(caution: AXIS defaults to port 9900, you must change it to port 9100)

g Windows 95 (pain++)
First, install AXIS Print Monitor.
Click Start...Settings...Printers Add Printers ... Local Printer .. install the printer driver on LPT1.
(Windows 95 will ask for the Windows 95 CD, unless c:\windows\options\cabs is intact)
Right click the Printer Icon, choose Properties, Details...Add Port, click Other,
choose AXIS port, click OK, choose RAW (TCP/IP), click OK,
IP address = 192.168.1.252, port number = 9100
Click OK until you are back to the correct Printer Icon, right click, Properties, Details,
At the "Print to the Following Port" drop-down box, choose
"192.168.1.250_9100 AXIS Port", click OK.

g Linux with CUPS: (easy)
Alan Lythaby of UK reported that Linux running CUPS works with this print server.
Use the Add printer "wizard", Device="Appsocket/HP JetDirect",
socket://192.168.1.252:9100

g Ubuntu using HP JetDirect and CUPS:
In System/Administration/Printing --> add new printer --> Network Printer --> HP JetDirect, enter IP address and port 9100, choose cups driver to suit.
Thanks to Grant Galbraith of Mittagong, Australia for this.

g Mandrake 9.0, 9.1, 9.2 with CUPS: (easy)
Herve Delmas of Montréal, Québec Canada canada reported that he used printerdrake to configure the printer. See this screen shot.

Darko Separovic of Vancouver, BC Canada g :
Open Mandrake Control Center-System configuration tool, click on "Hardware", "Printer Drake", "Add new printer", "Network Printer TCP/Socket", OK, "Is your printer a multi-function device...", say NO, enter Name, Description, and Location info (this is information for users), OK, select the printer from a list of printers, OK, select printer default settings (letter, mode, duplex...), OK, select Yes if this is a default printer, print a test page if you want to. See these screen shots by Darko.

gLinux with lpr: (maximal pain+++)
(Assuming you have a PCL5-language printer, most laser printers are PCL5 capable)
The most painless method is upgrade your 20-year old BSD lpr to LPRng , install magicfilter
(or other suitable printcap filters), create a new entry in /etc/printcap like below, create a directory
/var/spool/lpd/raw, make sure that /etc/lpd.conf has a line called force_localhost@
raw:
: sd=/var/spool/lpd/raw : lp=192.168.1.252%9100 : lpr_bounce
: if=/etc/magicfilter/laserjet-filter : sh : mx#0

When you meet the 5 conditions (LPRng, magicfilter, printcap, /var/spool/lpd/raw, /etc/lpd.conf),
you can print from a Linux box to your network-enabled printer, e.g.,
lpr -Praw sometext.txt
lpr -Praw fancygraphics.pdf
lpr -Praw mydoc.ps
man -t cp | lpr -Praw (format and printout the man page 'cp') (beware, some man pages are long)

If you are absolutely stuck on using the old BSD RFC1179 printing system, use this module lpd.lrp but you have to mess with /etc/printcap and /etc/hosts.lpd on the floppy. The filter on the floppy print system is not working; if you can train the Linux desktop to use printcap's filter on-board before sending the job off to the lpd print server, then it may work.
If you have no success in messing with /etc/printcap and /etc/hosts.lpd to work with the floppy LPD print system, netcat or this perl script will send a raw file from stdin to raw port 9100

Mac OS X:
(first, install ghostscript and ppd driver available at linuxprinting.org, if necessary )
Add printer --> IP Printing --> Printer Type --> Socket/HP JetDirect, enter IP address, choose driver from list.
Thanks to Grant Galbraith of Mittagong, Australia for this.

g

Novell iPrint on Netware 6.5 works with print to port 9100.
Thanks to Andrew Grant, Rhodes University, Grahamstown, South Africa

Novell NDPS server/broker environment - port 9100 does not work. Use lpd. Delete p9100.lrp from the floppy, add lpd.lrp, modify syslinux.cfg accordingly. For your convenience, simply use this image. Add the appropriate network card driver (modules.lrp), see above.
After the print server boots up (wait for the 3 beeps),
ae /etc/hosts.lpd and mention EVERY ip address g or host that needs to access this print server. ctrl-s to save the file.
ae /etc/printcap and add the following 2 lines:
:ff=:\
:sf=:\
type lrcfg and choose backup, then choose (2) etc

_________________
Still using Gentoo, just too busy for forums these days.
Back to top
View user's profile Send private message
darkphader
Veteran
Veteran


Joined: 09 May 2002
Posts: 1217
Location: Motown

PostPosted: Fri Jul 20, 2007 5:46 am    Post subject: Re: p910nd - The easiest way to set up Network Printing! :-) Reply with quote

Kai Hvatum wrote:
The entire saga of setting up a Samba printer share such that it auto loads windows drivers and "just works" for clients can be difficult. Why not just set up a "dumb" print server and have Linux serve the same function that those cheap $50 networked print servers do?

It may serve a similar function as a dumb print server but it doesn't come close to replacing Samba/CUPS or just CUPS. It doesn't provide an authentication method. It doesn't provide automatic printer driver download. It doesn't allow for a simple connection to a network share, it needs admin privileges to create a port. It doesn't spool, or do page counting - unless it's a front end to CUPS. Once you have CUPS you can just use IPP printing (no Samba needed) from any modern client if you want to forgo auto-driver download and Windows authentication.

Just some thoughts...I don't quite see its value but I also admit I haven't used it.

Chris
_________________
WYSIWYG - What You See Is What You Grep
Back to top
View user's profile Send private message
Kai Hvatum
Tux's lil' helper
Tux's lil' helper


Joined: 04 Feb 2004
Posts: 93
Location: Traveling around the US

PostPosted: Fri Jul 20, 2007 6:36 am    Post subject: Re: p910nd - The easiest way to set up Network Printing! :-) Reply with quote

darkphader wrote:
Kai Hvatum wrote:
The entire saga of setting up a Samba printer share such that it auto loads windows drivers and "just works" for clients can be difficult. Why not just set up a "dumb" print server and have Linux serve the same function that those cheap $50 networked print servers do?

It may serve a similar function as a dumb print server but it doesn't come close to replacing Samba/CUPS or just CUPS. It doesn't provide an authentication method. It doesn't provide automatic printer driver download. It doesn't allow for a simple connection to a network share, it needs admin privileges to create a port. It doesn't spool, or do page counting - unless it's a front end to CUPS. Once you have CUPS you can just use IPP printing (no Samba needed) from any modern client if you want to forgo auto-driver download and Windows authentication.

Just some thoughts...I don't quite see its value but I also admit I haven't used it.

Chris


This takes about two minutes to set up. If you need authentication or auto-driver download then by all means go with CUPS. But if you're looking to share a printer to three or four people in a small office or home then CUPS/IPP requires a lot more setup. This just works, if the printer driver exists for your OS then it will work over the Jet Direct protocol. :)

I'm not knocking CUPS, but just look at the thread which explains how to set up IPP with CUPS, a lot of people posting there are just looking to share a printer with one or two other people. A few people even ended up going (back to) with USB print servers because they had problems setting up IPP. For those who just want a really simple dumb print server, requiring about a 60 seconds of setup, this is a good option. No need to use a nuke when all you need to do is swat a fly.

Remember, active word dumb. For anyone with more complex needs CUPS is the undisputed king. :D
_________________
Still using Gentoo, just too busy for forums these days.
Back to top
View user's profile Send private message
darkphader
Veteran
Veteran


Joined: 09 May 2002
Posts: 1217
Location: Motown

PostPosted: Fri Jul 20, 2007 7:04 pm    Post subject: Re: p910nd - The easiest way to set up Network Printing! :-) Reply with quote

Kai Hvatum wrote:
But if you're looking to share a printer to three or four people in a small office or home then CUPS/IPP requires a lot more setup.

Can't see that at all. CUPS is pretty straightforward and is the de facto standard with most distros (and the Mac OSX). IPP is also straightforward and to use it you don't need to add a local port on Windows. Plus, when you're sharing a printer with multiple users you really want spooling.

Kai Hvatum wrote:
I'm not knocking CUPS, but just look at the thread which explains how to set up IPP with CUPS, a lot of people posting there are just looking to share a printer with one or two other people. A few people even ended up going (back to) with USB print servers because they had problems setting up IPP.

Sorry, don't know which thread you're referring to. But we aren't going to come to agreement on this one. As even when I use a printer with a JetDirect card, or AXIS print server, etc. a system always acts as the print server to handle at minimum the spooling, and all other systems print to it and not directly to a non-spooling device.

Chris
_________________
WYSIWYG - What You See Is What You Grep
Back to top
View user's profile Send private message
Kai Hvatum
Tux's lil' helper
Tux's lil' helper


Joined: 04 Feb 2004
Posts: 93
Location: Traveling around the US

PostPosted: Fri Jul 20, 2007 9:12 pm    Post subject: Re: p910nd - The easiest way to set up Network Printing! :-) Reply with quote

darkphader wrote:
Kai Hvatum wrote:
But if you're looking to share a printer to three or four people in a small office or home then CUPS/IPP requires a lot more setup.

Can't see that at all. CUPS is pretty straightforward and is the de facto standard with most distros (and the Mac OSX). IPP is also straightforward and to use it you don't need to add a local port on Windows. Plus, when you're sharing a printer with multiple users you really want spooling.


Adding a local port on windows is not hard, takes about thirty seconds. And no, when I'm sharing a printer with three or four people who print on average three of four pages a day, I really don't want to spend an extra nanosecond setting up spooling, because it's a flat waste of time. Trust me, I do know what I want. :)

https://forums.gentoo.org/viewtopic-t-110931-highlight-p910nd.html

darkphader wrote:
Kai Hvatum wrote:
I'm not knocking CUPS, but just look at the thread which explains how to set up IPP with CUPS, a lot of people posting there are just looking to share a printer with one or two other people. A few people even ended up going (back to) with USB print servers because they had problems setting up IPP.

Sorry, don't know which thread you're referring to. But we aren't going to come to agreement on this one.


Sorry, this isn't a matter of agreement or disagreement, it's a flat fact. Just look at the other thread, and you will see that I'm right.

https://forums.gentoo.org/viewtopic-t-110931-highlight-p910nd.html

Anyway, I really didn't post this to have a CUPS/IPP vs. Samba vs. JetDirect vs. KDE vs. Gnome argument. Just hoped to help a few people out who were in a similiar situation is me, hopefully save them the hour I spent trying to follow the directions in the IPP/CUPS/Samba network printing thread. Arguing about this isn't doing any good, anyone reading this far will have enough information and be able to make the choice as to what will suite them best.

Anyway, I'm out. Have a good one. Hopefully someone might find this information of use.
_________________
Still using Gentoo, just too busy for forums these days.
Back to top
View user's profile Send private message
darkphader
Veteran
Veteran


Joined: 09 May 2002
Posts: 1217
Location: Motown

PostPosted: Fri Jul 20, 2007 11:18 pm    Post subject: Reply with quote

No, you are not right, you're conflating Samba/CUPS with pure CUPS/IPP.
Just look at the title of the thread you link to:
CUPS+Samba Printer Serving/Sharing with Windows, Linux, BSD---plus automagical Windows Driver Upload.
That thread is titled and mainly concerned with Samba acting as a Windows NetBIOS print server, with auto-driver download, and not direct IPP printing from a Windows client to an IPP server (in this case CUPS) with no Samba involved.

And if your users have to keep resubmitting print jobs because there's no spooling you will soon wish you spent that extra nanosecond (if needed?) - they certainly will wish so.

My stance is that using CUPS and printing via IPP is more robust, simpler and faster than using p910nd.

Robust:
CUPS does spooling, page logging, error logging, access logging. Can be secure, demanding authentication if required.

Simpler:
CUPS is "standard", it is installed by default on every major distro. To install it on Gentoo requires a simple emerge, in case some other package or use flag never managed to pull it in. The distro's packaging system knows about it, and it gets updated normally. It does not have to be downloaded separately, hand compiled, and maintained separately outside the packaging system.

Faster:
On the server side:
In the vast majority of cases CUPS is already installed, for the rest...emerge...go on with your work. Create a raw queue.
For p910nd, download, compile, hack together and install an init script or emerge xinetd (installing another package) and configure.

On the Windows side:
CUPS,
Code:
Click Start...Settings, Printers, Add Printers, Network Printer, Connect to a printer...,URL-http://server:631/printers/printer

p910nd,
Code:
Click Start...Settings, Printers, Add Printers, Local Printer, Create New Port, Choose Standard TCP/IP port,  IP address = 192.168.1.252, port name=PrintSrv, Custom, Settings.. Raw.. Port 9100

Driver installation identical.

Conclusion
More nanoseconds spent installing, configuring, and maintaining p910nd than for CUPS.
More nanoseconds spent configuring the Windows client for JetDirect printing than for IPP printing.
Less functionality with p910nd than with CUPS.

Don't get me wrong. I appreciate your post and finding out about p910nd. I never knew it existed until I read your post. And I can see its use in the case of, as the author states, "p910nd is particularly useful for diskless Linux workstations booted via Etherboot that have a printer hanging off them" (in this case a small outdated system can act as JetDirect device - in a network it will still normally be driven by a front end that spools). But in general I can't see it as a viable replacement on most fronts for simply using CUPS, even in a small home network. In this case I think it's a solution in search of a problem.

Chris
_________________
WYSIWYG - What You See Is What You Grep
Back to top
View user's profile Send private message
Kai Hvatum
Tux's lil' helper
Tux's lil' helper


Joined: 04 Feb 2004
Posts: 93
Location: Traveling around the US

PostPosted: Wed Jul 25, 2007 5:30 am    Post subject: Reply with quote

darkphader wrote:
No, you are not right, you're conflating Samba/CUPS with pure CUPS/IPP.
Just look at the title of the thread you link to:
CUPS+Samba Printer Serving/Sharing with Windows, Linux, BSD---plus automagical Windows Driver Upload.
That thread is titled and mainly concerned with Samba acting as a Windows NetBIOS print server, with auto-driver download, and not direct IPP printing from a Windows client to an IPP server (in this case CUPS) with no Samba involved.


There are also a number of people (including myself) who were trying simply to get IPP working. For really basic needs I still maintain that a very simple print server is still a faster route to go with. It also requires less system resources on the server.

And multiple people trying to print at the same time at my house? This will never happen, and if it ever were somehow to happen, I've certainly already spent more time discussing the problem (here) then I could ever possibly spend efficiently addressing it.

darkphader wrote:

More nanoseconds spent installing, configuring, and maintaining p910nd than for CUPS.
More nanoseconds spent configuring the Windows client for JetDirect printing than for IPP printing.
Less functionality with p910nd than with CUPS.


Fair enough, if it really did take just an extra nanosecond to set up IPP then you would be right, that was an understatement though. Have a good one.

PS. I meant to only check this thread to see if anyone had real questions, but my stupid ego got in the way. ;)

PPS. Just for the hell of it, I just tried sending print jobs from two different computer at about (2-3 secs. difference) the same time, both printed without any problem.
_________________
Still using Gentoo, just too busy for forums these days.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum