Penguin

Differences between version 33 and predecessor to the previous major change of CUPSNotes.

Other diffs: Previous Revision, Previous Author, or view the Annotated Edit History

Newer page: version 33 Last edited on Thursday, May 11, 2006 1:34:42 pm by JohnMcPherson Revert
Older page: version 32 Last edited on Saturday, March 18, 2006 7:40:56 pm by CraigBox Revert
@@ -1,25 +1,4 @@
-!!Simple CUPS setup  
-  
-I plugged a Epson Color Stylus 760 into the [USB] port of a Debian Sarge machine, and this is how I made it go:  
-  
-* Install CUPS: <tt>apt-get install cupsys cupsys-driver-gimpprint gs-esp</tt>  
-* Edit <tt>/etc/cups/cupsd.conf</tt> and add Apache-like <i>Allow</i> stanzas at the <Location> sections at the bottom: I wanted all of my local network to be able to administer or use the printer, so I added <tt>Allow From 10.1.30.0/24</tt>.  
-* You need to have your USB drivers loaded: in my case, they were a <tt>modprobe ehci-hcd; modprobe uhci-hcd; modprobe usblp</tt> away. I put the module names in /etc/modules so they would be loaded at boot. If you want, you can use hotplug to manage USB: see HotPlugNotes. Ubuntu does this all automatically for you.  
-* Navigate to http://server:631/ and log in. Use credentials of someone in the 'lpadmin' group: either add yourself, or use root.  
-* Click "printers" on the top bar; click "Add a printer". Follow your nose through here. Print a test page at the end to make sure its going.  
-  
-<i>Hint</i>: If it doesn't go, set '~LogLevel debug' in /etc/cups/cupsd.conf, restart cups, and look at /var/log/cups/error_log.  
-  
-Congratulations, you now have a printer at ipp://<i>server</i>/printers/<i>printername</i>.  
-  
-From an Ubuntu Dapper client, click System, Administration, Printing. Double click "New printer", set the type to CUPS printer (IPP), and add the URL above.  
-  
-Follow your nose again through the rest, and then you should have a working printer.  
-  
-If you want to share the printer with Windows clients, see SambaPrinting.  
-  
-  
 !!Printing to PDF 
  
 If you have an application that can't output natively to PDF, you can create yourself a PDF printer. 
  
@@ -55,78 +34,28 @@
  Browsing off 
 Or set the network/address mask for the ~BrowseAllow/~BrowseDeny variables (for incoming broadcasts) and ~BrowseAddress (for outgoing broadcasts). Debian [Sarge] defaults to browsing on, accepting incoming information from anywhere and not sending out any information. 
  
 ---- 
-!! Using Netatalk2 with cups  
+!!!Examples of adding printers  
+!!Simple CUPS setup  
  
-With the release of sarge , debian are now using automatic cups stuff, rather than the old lpr support.  
+I plugged a Epson Color Stylus 760 into the [USB] port of a Debian Sarge machine , and this is how I made it go:  
  
-This means you cannot just use the old <tt>papd .conf</tt> and hope it works . You'll get such wonderful things as it simply disapearing , and not removing the pid file , without any errors . Lovely thing that
+* Install CUPS: <tt>apt-get install cupsys cupsys-driver-gimpprint gs-esp</tt>  
+* Edit <tt>/etc/cups/cupsd .conf</tt> and add Apache-like <i>Allow</i> stanzas at the <Location> sections at the bottom: I wanted all of my local network to be able to administer or use the printer, so I added <tt>Allow From 10 .1.30./24</tt>.  
+* You need to have your USB drivers loaded: in my case , they were a <tt>modprobe ehci-hcd; modprobe uhci-hcd; modprobe usblp</tt> away. I put the module names in /etc/modules so they would be loaded at boot. If you want, you can use hotplug to manage USB: see HotPlugNotes. Ubuntu does this all automatically for you.  
+* Navigate to http://server:631/ and log in. Use credentials of someone in the 'lpadmin' group: either add yourself , or use root .  
+* Click "printers" on the top bar; click "Add a printer". Follow your nose through here. Print a test page at the end to make sure its going
  
-So , you 'll need to do a few things
+<i>Hint</i>: If it doesn't go , set '~LogLevel debug' in /etc/cups/cupsd.conf, restart cups, and look at /var/log/cups/error_log
  
-Cups broadcasting is great , however, it's not always as great as it would seem. It can (and will in our case) pick up other cups broadcasted printers. You need to disable the reception of these printers in your config otherwise pap can also die
+Congratulations , you now have a printer at ipp://<i>server</i>/ printers/<i>printername</i>
  
-EG:  
+From an Ubuntu Dapper client, click System, Administration, Printing. Double click "New printer", set the type to CUPS printer (IPP), and add the URL above.  
  
-in <tt>/etc/cups/cupsd.conf</tt> find the browse section , and add in, something much like the following:  
-<verbatim>  
-#Allows browsing from the local network  
-BrowseAllow 192.168.2./24  
-#Disables printer broadcast from backup server  
-BrowseDeny 192.168.6.10/255.255.255.255  
-</verbatim>  
-Make sure you have:  
-<verbatim>  
-BrowseOrder allow,deny  
-</verbatim>  
-Set as well
+Follow your nose again through the rest , and then you should have a working printer
  
-Once this is done, edit <tt>/etc/netatalk/papd.conf<tt>, and add:  
-<verbatim>  
-cupsautoadd@yourzonehere:op=root:  
-</verbatim>  
  
-This will automatically get the cups printers, and use the ppd that cups uses.  
-  
-if pap is not running, either restart netatalk in the normal way, just type papd, which starts it, uses the config, and inserts a pid file.  
-  
-The logs should show something like:  
-  
-<verbatim>  
-Jul 15 12:13:23 host papd[16668]: restart (2.0.2)  
-Jul 15 12:13:23 host papd[16668]: CUPS support enabled (1.1)  
-Jul 15 12:13:30 host papd[16668]: Authentication disabled: SharpC150  
-Jul 15 12:13:30 host papd[16668]: register SharpC150:LaserWriter@zone1  
-Jul 15 12:13:36 host papd[16668]: Authentication disabled: hplj4-letterhead  
-Jul 15 12:13:36 host papd[16668]: register hplj4-letterhead:LaserWriter@zone1  
-Jul 15 12:13:42 host papd[16668]: Authentication disabled: hplj4  
-Jul 15 12:13:42 host papd[16668]: register hplj4:LaserWriter@zone1  
-Jul 15 12:13:48 host papd[16668]: Authentication disabled: hp8100  
-Jul 15 12:13:48 host papd[16668]: register hp8100:LaserWriter@zone1  
-Jul 15 12:13:54 host papd[16668]: Authentication disabled: hp5000  
-Jul 15 12:13:54 host papd[16668]: register hp5000:LaserWriter@zone1  
-</verbatim>  
-The only error I have so far encountered, is this:  
-<verbatim>  
-can't register SharpC150@greed:LaserWriter@zone1  
-Jul 15 11:24:08 host papd[7929]: Deleting CUPS temp PPD file for SharpC150_greed (/var/spool/cups/tmp/42d6f4186a35b)  
-</verbatim>  
-  
-This was because it was a broadcast printer, and cups didn't have a local copy of its ppd. THis is why I recommend disabling cups broadcast receive (send is fine) using ~BrowseDeny.  
-  
-It is also possible to setup netatalk to use the cups printers, but add your own settings. I won't go into much detail due to lack of time, however,  
-  
-If for example, you wanted to add a cups printer, with a different zone, and maybe running as a different user, you would enter into <tt>papd.conf</tt>:  
-<verbatim>  
-hp5000-test2@another zone:\ - This is the printername that will be broadcast  
- :pr=hp5000:\ - This is the cups printer that will be used (opt)  
- :pd=/usr/share/lib/ppd/anotherdriver.PPD: -The ppd you want to use (opt)  
-  
-opt= optional. space constraints.  
-</verbatim>  
-  
-----  
 !! Setting up a USB printer by the command line 
  
 These are just some observations of what I did to set up a Brother HL 1440 laser printer (using the [USB] port) on a machine that already had [CUPS] installed, and had an HP Deskjet installed. This was done on debian woody (or close enough to woody) remotely via an ssh connection. These instructions also worked perfectly for a Brother HL 1430 on a Redhat 9 system running XimianDesktop although I didn't use any of the graphic configuration tools. Hopefully these instructions are generic enough to work with any USB printer supported by cups. 
  
@@ -166,23 +95,19 @@
  
 ! /etc/printcap 
 4) Edit /etc/printcap for "[Legacy]" applications. cups does make a printcap file, but in debian the default name is /etc/printcap.cups. Just copy that - it had empty entries for my two installed printers. 
  
-  
-! Gotchas  
-remove ~/.lpoptions (for all users) as that hard-coded the default printer to be the old one ! I don't know what created that file, as only some users had it. 
+----  
+!!! Random Hints/Printer-specific bugs/workarounds  
+!! Wrong printer/options being used by default  
+remove ~ ~/.lpoptions (for all users) as that hard-coded the default printer! I don't know what created that file, as only some users had it. 
  
 Check for a PRINTER environment variable and make sure that it's either unset or set correctly. 
  
-------------------------  
-I'm using linux debian woody , with kernel 2 .4 .18  
-mknod /dev /usb /lp0 c 180 0 allowed cups to see the printer but not to work .  
-The only solution seems to upgrade the kernel or to use a different printer.c that comes from hpoj.sourceforge.net, but I still have not tested it..
+!!<tt>cupsd</tt> loading modules on startup  
+On my Debian and Ubuntu systems , CUPS causes the <tt>lp .ko</tt> (and parport-related) modules to be loaded . It turns out that cupsd runs all the programs in the <tt> /usr /lib /cups/backend</tt> directory, and the 'parallel' program in there explicitly loads the lp module . Remove this symlink if you want to stop this behaviour
  
-HP Office Jets need extra configuration files, which don't come with CUPS by default. Install the "hpoj" package (or the newer "hplip" package).  
-----  
- !!Printer-specific bugs/workarounds  
- !Brother HL-1440 
+!!Brother HL-1440 
 CUPS will recommend and use the hl1250 PPD driver for this printer. Unfortunately, it doesn't handle the page margins quite right. Since no package seems to have a PPD file specifically for this printer, you'll have to work around it. Try one of the following methods: 
  
 __1.__ Set some default options for this printer: 
 <pre> 
@@ -224,9 +149,8 @@
 __5.__: Proprietary PPD file 
 There should be an appropriate PPD file on the CD-ROM containing the windows driver that came with the printer. This might be better under CUPS than cups's 
 ppd files. Brother have also freed up the licensing on some of their printing drivers, so maybe their ppd files will be included with cups in the future. 
  
-----  
 !! Useful Command-line tools 
 To see a list of all successful print jobs from the current machine (by all users) 
  lpstat -W completed -u 
  
@@ -249,9 +173,79 @@
 <pre> 
 lpstat -a -l -p 
 </pre> 
 Note that the order of these options matters. 
+----  
+!! Using Netatalk2 with cups  
+  
+With the release of sarge, debian are now using automatic cups stuff, rather than the old lpr support.  
+  
+This means you cannot just use the old <tt>papd.conf</tt> and hope it works. You'll get such wonderful things as it simply disapearing, and not removing the pid file, without any errors. Lovely thing that.  
+  
+So, you'll need to do a few things.  
+  
+Cups broadcasting is great, however, it's not always as great as it would seem. It can (and will in our case) pick up other cups broadcasted printers. You need to disable the reception of these printers in your config otherwise pap can also die.  
+  
+EG:  
+  
+in <tt>/etc/cups/cupsd.conf</tt> find the browse section, and add in, something much like the following:  
+<verbatim>  
+#Allows browsing from the local network  
+BrowseAllow 192.168.2.0/24  
+#Disables printer broadcast from backup server  
+BrowseDeny 192.168.6.10/255.255.255.255  
+</verbatim>  
+Make sure you have:  
+<verbatim>  
+BrowseOrder allow,deny  
+</verbatim>  
+Set as well.  
+  
+Once this is done, edit <tt>/etc/netatalk/papd.conf<tt>, and add:  
+<verbatim>  
+cupsautoadd@yourzonehere:op=root:  
+</verbatim>  
+  
+This will automatically get the cups printers, and use the ppd that cups uses.  
+  
+if pap is not running, either restart netatalk in the normal way, just type papd, which starts it, uses the config, and inserts a pid file.  
+  
+The logs should show something like:  
+  
+<verbatim>  
+Jul 15 12:13:23 host papd[16668]: restart (2.0.2)  
+Jul 15 12:13:23 host papd[16668]: CUPS support enabled (1.1)  
+Jul 15 12:13:30 host papd[16668]: Authentication disabled: SharpC150  
+Jul 15 12:13:30 host papd[16668]: register SharpC150:LaserWriter@zone1  
+Jul 15 12:13:36 host papd[16668]: Authentication disabled: hplj4-letterhead  
+Jul 15 12:13:36 host papd[16668]: register hplj4-letterhead:LaserWriter@zone1  
+Jul 15 12:13:42 host papd[16668]: Authentication disabled: hplj4  
+Jul 15 12:13:42 host papd[16668]: register hplj4:LaserWriter@zone1  
+Jul 15 12:13:48 host papd[16668]: Authentication disabled: hp8100  
+Jul 15 12:13:48 host papd[16668]: register hp8100:LaserWriter@zone1  
+Jul 15 12:13:54 host papd[16668]: Authentication disabled: hp5000  
+Jul 15 12:13:54 host papd[16668]: register hp5000:LaserWriter@zone1  
+</verbatim>  
+The only error I have so far encountered, is this:  
+<verbatim>  
+can't register SharpC150@greed:LaserWriter@zone1  
+Jul 15 11:24:08 host papd[7929]: Deleting CUPS temp PPD file for SharpC150_greed (/var/spool/cups/tmp/42d6f4186a35b)  
+</verbatim>  
+  
+This was because it was a broadcast printer, and cups didn't have a local copy of its ppd. THis is why I recommend disabling cups broadcast receive (send is fine) using ~BrowseDeny.  
+  
+It is also possible to setup netatalk to use the cups printers, but add your own settings. I won't go into much detail due to lack of time, however,  
+  
+If for example, you wanted to add a cups printer, with a different zone, and maybe running as a different user, you would enter into <tt>papd.conf</tt>:  
+<verbatim>  
+hp5000-test2@another zone:\ - This is the printername that will be broadcast  
+ :pr=hp5000:\ - This is the cups printer that will be used (opt)  
+ :pd=/usr/share/lib/ppd/anotherdriver.PPD: -The ppd you want to use (opt)  
+  
+opt= optional. space constraints.  
+</verbatim>  
+  
  
 ---- 
 See CupsAccounting 
  
 Part of CategoryPrinting