Putting it all together, add and enable the new printer:
- $ lpadmin -E -p afmlab -v socket://123.45.67.89 -m gutenprint.5.2://hp-lj_4240/expert -L "LaserJet 4240, Disque 927" -E
+ # lpadmin -E -p afmlab -v socket://123.45.67.89 -m gutenprint.5.2://hp-lj_4240/expert -L "LaserJet 4240, Disque 927" -E
Note the two `-E` options. The first one (before `-p`) forces
encryption when connecting to the server. The last one enables the
You'll probably also want to make the new printer the default:
- $ lpadmin -d afmlab
+ # lpadmin -d afmlab
The CUPS daemon will eventually (i.e. after a few seconds) flush these
configuration changes into `/etc/cups/printers.conf` if you prefer
editing text files to the command line or GUI tools ;).
+If you want to add a printer to your local CUPS server that is already
+configured from another CUPS server (e.g. printing from your laptop
+(local CUPS) to a USB printer plugged into your desktop (another
+CUPS)), you can just drop the model info:
+
+ # lpadmin -E -p afmlab -v http://my-desktop:631/printers/afmlab -L "LaserJet 4240, Disque 927" -E
+
+where `my-desktop` should be the domain name or IP address of the
+remote CUPS server.
+
[CUPS]: http://www.cups.org/
[documentation]: http://www.cups.org/documentation.php
[options]: http://www.cups.org/documentation.php/doc-1.4/options.html