Penguin

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

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

Newer page: version 27 Last edited on Thursday, April 14, 2005 10:25:08 am by JohnMcPherson Revert
Older page: version 26 Last edited on Tuesday, January 25, 2005 10:47:23 pm by MattBrown Revert
@@ -6,10 +6,11 @@
 # Install this as 'pdf' in /usr/lib/cups/backends, and set it world executable. 
 # You may need to restart CUPS (e.g. on RedHat systems run 'service cups restart') 
 # You probably need GhostScript installed (try looking for a package called gs-common) for ps2pdf(1). 
 # Add a printer, either using the web interface (http://localhost:631/), XimianDesktop's printer interface, or the command line: 
-  
- lpadmin -p PDFcreator -v pdf:/home/chris/PDFfiles -E -P /path/to/distiller.ppd 
+<pre>  
+lpadmin -p PDFcreator -v pdf:/home/chris/PDFfiles -E -P /path/to/distiller.ppd  
+</pre>  
  
 You can use any "raw" ppd you want really - I used the Raw/Raw (en) option in the installer, and it worked fine. You can download a color postscript ppd file from the [cups-pdf site|http://cip.physik.uni-wuerzburg.de/~vrbehr/cups-pdf/]. 
  
 Create the printer with the [URI] of pdf:/where/you/want/the/output. 
@@ -30,33 +31,40 @@
 [CUPS] can do broadcasts over a network to both advertise the availability of local printers as well as to find and "proxy" for remote printers. On a [LAN] this is probably what you want, but if you are on the MetaNet this may result in other people seeing your printers, and you seeing theirs. This can have unpleasant side-effects: for example, my cups found remote printers that were later firewalled/disconnected or removed. Later that day when starting a [GNOME] application, it would hang on start-up as the gnome printing backend tried contacting the remote printers which were now un-contactable. 
  
 Anyway, the lesson is to edit cupsd.conf to disable this. (This is in the /etc/cups/ directory in [Debian] and RedHat.) Either disable browsing completely by adding the line: 
  Browsing off 
-Or set the network/address mask for the ! BrowseAllow/! BrowseDeny variables (for incoming broadcasts) and ! BrowseAddress (for outgoing broadcasts). Debian [Woody] defaults to browsing on, accepting incoming information from anywhere and not sending out any information. 
+Or set the network/address mask for the ~ BrowseAllow/~ BrowseDeny variables (for incoming broadcasts) and ~ BrowseAddress (for outgoing broadcasts). Debian [Woody] defaults to browsing on, accepting incoming information from anywhere and not sending out any information. 
  
 ---- 
-!!! Setting up a Brother Laser printer  
-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. 
+!!! Setting up a USB printer  
+  
+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
  
 ! Preparation 
 Make sure the kernel has USB Printer support. I created a kernel module (CONFIG_USB_PRINTER) and made sure it installed ok. 
  
 Make a device file. I assume people using devfs don't need to do this manually. I did: 
+<pre>  
  mkdir /dev/usb 
  mknod /dev/usb/lp0 c 180 0 
+</pre>  
 although some people use the name "/dev/usb/usblp" instead. 
  
 ! Config files 
 Foomatic is the cups package with all the printer description files (*.PPD) and setup stuff. 
  
 To determine which driver cups needs to use, you do 
+<pre>  
  # foomatic-configure -O | less 
+</pre>  
 which lists all the supported printers, and search for your printer. If I search for "1440" I find an entry for the new printer that includes the line 
  <driver>hl1250</driver> 
  
 Now the magic line: 
- foomatic-configure -s cups -n Brother -c file:/dev/usb/lp0 \  
- -p Brother-HL-1440 -d hl1250 -o ! PageSize=A4 
+<verbatim>  
+ foomatic-configure -s cups -n Brother -c file:/dev/usb/lp0 \  
+ -p Brother-HL-1440 -d hl1250 -o PageSize=A4  
+</verbatim>  
 (This should all be on one line, without the "\") 
 This says to use the cups printing system, and name the new printer "Brother". The -p and -d options are the printer ID and driver I got from the previous step in the output. Also I used an option to set the default page size to A4. 
  
 Note that this can't be done until the printer is connected, as I got a "client-error-not-possible" error until someone at the remote end plugged the new printer into the USB port. 
@@ -78,10 +86,35 @@
 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... 
  
-''Possibly to do with the [USB] support in the kernel?'' -- JohnMcPherson  
+HP Office Jets need extra configuration files, which don 't come with CUPS by default. Install the "hpoj" package (or the newer "hplip" package).  
 ---- 
+!! Useful Command-line tools  
+To see a list of all successful print jobs from the current machine (by all users)  
+ lpstat -W completed -u  
  
+I've noticed that if my USB printer isn't turned on when cups is started, sometimes after turning the printer on, cups still thinks the printer isn't ready. You can manually re-enable the printer by:  
+<pre>  
+cupsenable ''printername''  
+</pre>  
+  
+For the example printer setup above, ''printername'' with be "Brother".  
+Similarly, you can temporarily disable printing to a printer (although cups will still queue jobs for it) with  
+<pre>  
+cupsdisable ''printername''  
+</pre>  
+  
+You can check the status of a printer (ie whether cups is accepting jobs, and whether the printer is enabled or not) with  
+<pre>  
+lpstat -a -p  
+</pre>  
+Or if you want more info ("__l__ong listing"):  
+<pre>  
+lpstat -a -l -p  
+</pre>  
+Note that the order of these options matters.  
+  
+----  
 See CupsAccounting 
  
 Part of CategoryPrinting