LPRng & Samba

If you need some help, this should be the first place to look.

Postby TeCuMSeH » Wed Nov 17, 2004 2:35 am

Since there are a lot of questions about printing with freesco and I want to add a printer on my Freesco box I have searched and browsed around a bit. On dingetje's site I found this. I copied it here for easier finding and the ability to give me a printerfriendly page. Maybe some of the moderaters want to move this to the faq section.

Dingetje's post:

As a matter of fact I have just switched my HP Deskjet 840C shared printer from my Win2K to the freesco box using the LPRng and Samba packages.

I will only post the relevant sections of the smb.conf and printcap file here:


? :sd=/mnt/router/packages/lprng/spool/%P
? :sh:mx=0:mc=0
? :done_jobs=0

After making these changes (where hp840c is the desired queue name, and /dev/lp1 the parallel port the printer is attached too) type these commands:

[Linux] cd /mnt/router/packages/lprng/sbin
[Linux] checkpc -V -f

Sample run:

LPRng-3.8.12, Copyright 1988-2002 <a href='http://mailto:PAPOWELL@LPRNG.COM' target='_blank'>Patrick Powell</a>,
Checking for configuration files '/mnt/router/packages/lprng/etc/lpd.conf'
found '/mnt/router/packages/lprng/etc/lpd.conf', mod 0100644
Checking for printcap files '/mnt/router/packages/lprng/etc/printcap'
Checking for lpd only printcap files '/mnt/router/packages/lprng/etc/lpd_printcap'
DaemonUID 0, DaemonGID 0
Using Config file '/mnt/router/packages/lprng/etc/lpd.conf'
LPD lockfile '/var/run/lpd.515'



#Printcap Information
Checking printcap info
Checking printer 'hp840c'
Checking directory: '/mnt/router/packages/lprng/spool/hp840c'
? directory '/mnt'
? directory '/mnt/router'
? directory '/mnt/router/packages'
? directory '/mnt/router/packages/lprng'
? directory '/mnt/router/packages/lprng/spool'
? directory '/mnt/router/packages/lprng/spool/hp840c'
checking 'control.pr' file
checking 'status.pr' file
checking 'status' file
checking 'log' file
checking 'acct' file

This is using the verbose mode, when you ommit the -V checkpc does it's work silently (unless a real error exists).

Now test run the newly added queue by sending a test file with the lpr command. If you're at this stage you're halfway through!

? ? ?  path = /mnt/router/packages/samba/var/spool
? ? ?  #? ---? do not use the Samba default path = /tmp
? ? ?  print ok = yes
? ? ?  printing = lprng
? ? ?  load printers = yes
? ? ?  printcap name = /etc/printcap
? ? ?  guest ok = yes
? ? ?  print command =? ? ?  /bin/lpr? -U%U@%M -P%p -r %s? ?
? ? ?  lpq command?  =? ? ?  /bin/lpq? -U%U@%M -P%p? ?
? ? ?  lprm command? =? ? ?  /bin/lprm -U%U@%M -P%p %j? ?
? ? ?  lppause command =? ?  /bin/lpc -U%U@%M hold %p %j? ? 
? ? ?  lpresume command =? ? /bin/lpc -U%U@%M release %p %j? ? 
? ? ?  queuepause command =? /bin/lpc -U%U@%M stop %p? ? ? ?
? ? ?  queueresume command = /bin/lpc -U%U@%M start %p

Save the changes and type rc_samba restart
Make sure the spool directory exists and is owner by root, then type:

chmod 1777 /mnt/router/packages/samba/var/spool

Next browse your network and look for the queue name on your freesco box (hp840c in the example). (Note: Image not displayed because of offsite linking to dingetjes site without permission.)

Adding a queue on the windoze box is peanuts now. A test job should print.

Here are some more tips:
<a href='http://www.lprng.com/LPRng-HOWTO-Multipart/smb.htm' target='_blank'>http://www.lprng.com/LPRng-HOWTO-Multipart/smb.htm</a>

Note: it's also possible to have your freesco samba server provide the printer driver for various windoze platforms. How to do this is described online (use Google).

<img src='http://members.home.nl/mgdijkerman/freesco/gmail3.png' border='0' alt='user posted image'>
Posts: 51
Joined: Mon Jan 28, 2002 6:57 pm
Location: Netherlands

Return to FAQ - Frequently Asked Questions

Who is online

Users browsing this forum: No registered users and 1 guest