printer configuration largely undocumented

Bug #208240 reported by DaveAbrahams
4
Affects Status Importance Assigned to Milestone
system-config-printer (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

The "Printer Configuration" application has prominent options such as "New Class" that are explained nowhere in the documentation.

Furthermore, when I go to set up my HP Laserjet 1300 I get the choice of about 7 or 8 drivers, the difference between which is explained nowhere.

I consider these to be major usability bugs.

Testing the Printing Class...

Adding the "New Class" in the Unix printing environment means a capability to create a clustered printers using one single alias name for the group of the printers. This means that you may create one class and assign into it many printers and set the class to be your default printer instead using only one single printer. If you have e.g. two similar printers in one place at work, you can create a class for those two printers to be able to load balance your print jobs between those two printers. This also helps then when the other printer fails, the printing queue of the class redirects all the new requests to the remaining printer.

An easy and funny 10-steps-back-and-forth-way to test the printing classes on the Linux with the "dummy" printers described here below:

Open two different terminal windows and type "tty" on both of them. By default the values are somewhat: "/dev/pts/0" and "/dev/pts/1" depending on how many terminal sessions you had open prior. Create couple of dummy printers using the command line as seen here below. First, if you have the CUPS in use, you have to add into the /etc/cups/cupsd.conf file the URI directive "FileDevice Yes" without quotation marks to be able to use the lpadmin command. After adding the line, you have to restart the CUPS.

1. Add the "FileDevice Yes" directive to the last line of the file
                 $ sudo vi /etc/cups/cupsd.conf

2. Restart the CUPS service to make the new directive effect
                 $ sudo /etc/init.d/cups restart

3. Add two dummy printers to the system (remember to check the dummy pseudo device addresses of the terminals opened earlier to be the destination dummy printers).
                 $ sudo lpadmin -p test1 -v /dev/pts/0 -o nobanner -u allow:all
                 $ sudo lpadmin -p test2 -v /dev/pts/1 -o nobanner -u allow:all

4. Enable and accept the newly created devices and check that the devices are accepting printing requests and being enabled
                 $ sudo cupsenable test1 test2
                 $ sudo accept test1 test2
                 $ sudo lpstat -t

5. If the dummy devices are being created correctly, you should be able to print in to their dummy output devices terminal windows from the third terminal window using the commands seen here below. In the example we are printing the content of the ascii file /etc/passwd to them.
                 $ lp -d test1 /etc/passwd
                 $ lp -d test2 /etc/passwd

6. If you were able to print to the both of the dummy devices, then the printing class can be created and activated using the following commands (remember to check what was your initial default printer and mark that information down before moving on to be able to restore your preferred real printing environment back later on)
                 $ sudo lpadmin -p test1 -c class1
                 $ sudo lpadmin -p test2 -c class1
                 $ sudo cupsenable class1
                 $ sudo accept class1

7. Let's make the "class1" printing class the default printer for the system that we are able to test the class in action.
                 $ sudo lpadmin -d class1

8. Now you can print and repeat the printing jobs as many as you like and as fast as you can from the 3rd terminal window to this class1 printing class. Note, now that we made the class1 to be your default printer, you don't have to use the -d destination option with the command lp, to be able to print to the class1 directly.

                 $ lp /etc/passwd; lp /etc/passwd; lp /etc/passwd; lp /etc/passwd; lp /etc/passwd

9. and notice that the system is now by default load balancing the print jobs between these two dummy devices test1 and test2. The following set of commands is for restoring the initial status of the system and removing these dummy devices. T

                 $ sudo lpadmin -x class1
                 $ sudo lpadmin -x test1 test2
                 $ sudo lpadmin -d <initial printer>

10. Remove the last line directive entry from the file /etc/cupsd.conf we added there earlier if it is bothering you and restart the CUPS.
                 $ sudo vi /etc/cups/cupsd.conf
                 $ sudo /etc/init.d/cups restart

These instructions are valid for the real case creations just by replacing the dummy devices with the real ones. These instructions are valid also for the GUI creation with the GUI program Printing, which by the way does have an authorization bug on the Ubuntu, so you should launch the program from the command line with the command: "sudo python /usr/share/system-config-printer/system-config-printer.py" if you would like to use x program instead. Due to my nature of CLI lower, I don't bother to explain how to do the thing in the x environment... :-)

Revision history for this message
Luke Faraone (lfaraone) wrote :

Triage recommendation: Low

John Dong (jdong)
Changed in system-config-printer:
importance: Undecided → Low
Revision history for this message
kekkonj (kekkonj) wrote :
Download full text (4.6 KiB)

Testing the Printing Class...

Adding the "New Class" in the Unix printing environment means a capability to create a clustered printers using one single alias name for the group of the printers. This means that you may create one class and assign into it many printers and set the class to be your default printer instead using only one single printer. If you have e.g. two similar printers in one place at work, you can create a class for those two printers to be able to load balance your print jobs between those two printers. This also helps then when the other printer fails, the printing queue of the class redirects all the new requests to the remaining printer.

An easy and funny 10-steps-back-and-forth-way to test the printing classes on the Linux with the "dummy" printers described here below:

Open two different terminal windows and type "tty" on both of them. By default the values are somewhat: "/dev/pts/0" and "/dev/pts/1" depending on how many terminal sessions you had open prior. Create couple of dummy printers using the command line as seen here below. First, if you have the CUPS in use, you have to add into the /etc/cups/cupsd.conf file the URI directive "FileDevice Yes" without quotation marks to be able to use the lpadmin command. After adding the line, you have to restart the CUPS.

1. Add the "FileDevice Yes" directive to the last line of the file
                 $ sudo vi /etc/cups/cupsd.conf

2. Restart the CUPS service to make the new directive effect
                 $ sudo /etc/init.d/cups restart

3. Add two dummy printers to the system (remember to check the dummy pseudo device addresses of the terminals opened earlier to be the destination dummy printers).
                 $ sudo lpadmin -p test1 -v /dev/pts/0 -o nobanner -u allow:all
                 $ sudo lpadmin -p test2 -v /dev/pts/1 -o nobanner -u allow:all

4. Enable and accept the newly created devices and check that the devices are accepting printing requests and being enabled
                 $ sudo cupsenable test1 test2
                 $ sudo accept test1 test2
                 $ sudo lpstat -t

5. If the dummy devices are being created correctly, you should be able to print in to their dummy output devices terminal windows from the third terminal window using the commands seen here below. In the example we are printing the content of the ascii file /etc/passwd to them.
                 $ lp -d test1 /etc/passwd
                 $ lp -d test2 /etc/passwd

6. If you were able to print to the both of the dummy devices, then the printing class can be created using the following commands (remember to check what was your initial default printer and mark that information down before moving on to be able to restore your preferred real printing environment back later on)
                 $ sudo lpadmin -p test1 -c class1
                 $ sudo lpadmin -p test2 -c class1

7. Let's make the "class1" printing class the default printer for the system that we are able to test the class in action.
                 $ sudo lpadmin -d class1

8. Now you can print and repeat the printing jobs as many as you like and as fast as you can from the 3rd te...

Read more...

kekkonj (kekkonj)
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.