PeasyCUPS Printer Control
When you install a network printer in CUPS, it is identified by the IP address that it gets from your router's DHCP system. If your network eventually resets, the printer's IP address may change and it will stop working. So you must reinstall the printer using the new IP on each client machine.
The permanent solution is to give the printer a static IP address. Most modern printers can do this through their own control panel or internal web interface. Some routers let you assign a fixed IP address to each device on your network.
If you don't want to bother with static IP, PeasyCUPS provides an alternative. Instead of installing the printer in CUPS by IP address, use a hostname. Then add an entry to /etc/hosts with the IP address and the name. When the address changes, you need only update the hosts file.
For example, the printer's original URI in CUPS might be "socket://192.168.2.12". Change it to "socket://HP-M127FN" and add the hosts entry "192.168.2.12 HP-M127FN".
To locate the new IP address, use the PeasyCUPS "Scan network for printers" tool. Or use PeasyPort and scan for ports 515,631,9100. Then use "Edit /etc/hosts".
Occasionally, CUPS will install a printer by its internal name. If so, locate its IP address and add the corresponding line to the hosts file. Some Brother printers are installed using the lpd:// protocol and a hostname. Scan for port 515 to find the IP address.
Look for PeasyCUPS in the Internet menu.
Update: Project temporarily withdrawn for maintenance. If anyone wants the latest version, they should post a request.
Hints:
1. Once you start working with network printing, you should give each machine on your LAN a unique hostname instead of "live". Put the name in /etc/hostname and reboot.
2. If you are installing a vendor printer driver, you may now need the additional package "libcupsimage2". It has been removed from the basic CUPS install because the CUPS developers want to eliminate vendor drivers in favour of AirPrint technology!
---------------------
- out.jpg (35.4 KiB) Viewed 5847 times
---------------------------
Driverless Printing in CUPS with AirPrint
The conventional way to install a printer in Linux involves going to the vendor website, locating a driver package for your model and hoping that it is compatible with your system. The developers of CUPS are working to remove this headache by using the standardized driver technology built into many modern wireless printers.
This "driverless" capability is called AirPrint. In the Linux world, it is called "IPP Everywhere". Here is a procedure for using these printers.
1. Since the printer is acting as a server, each computer becomes a client. The client requires a CUPS install AND the two extra packages
"avahi-daemon" and "avahi-utils". It does NOT need a specific printer driver package.
2. Start PeasyCUPS. As a test, run PeasyPort and scan your network for port 631. It should identify the AirPrint-capable printer by its IP address. Non-AirPrint units may be detected on Port 9100 and can be installed using the regular CUPS AppSocket/JetDirect protocol with a driver.
3. Open the AirPrint tab and run "Scan Network for Airprinters". You may need to try several times before the printer is detected.
4. Select "Run ippfind". This will locate the AirPrinter and return its URI. Leave this window open.
5. Run "Install an AirPrinter in CUPS". Select a one-word nickname for the printer, like "DeskJet-2655-AirPrint". Paste in the URI. Click OK.
6. Check /etc/hosts. There should be a new entry for the printer containing its IP address and hostname.
7. Launch the CUPS web interface in a browser and open the Printers section. Your printer should be listed. Print a test page.
8. Run an application and print something.
------------
AirScan
Your AirPrint-capable unit probably also has driverless scanning ability. This is easy in Linux - the new versions of SANE include the "escl" backend. It detects the wireless scanner and works automatically with PeasyScan. If escl does not work well, get the package "sane-airscan".
Both of these backends require avahi-daemon to be running.
------------------
Sharing a Local Printer
If you have a USB-attached local printer, you can share it over the network using avahi.
1. Give the computers on your LAN different hostnames. Avahi will get confused if everyone is named "live".
2. On the server computer, run CUPS and declare the printer to be shared in the usual two places. If avahi-daemon is running, that's all the setup you need.
3. On the client, install avahi-daemon, avahi-utils and PeasyCUPS. Locate and install the remote printer just like it was a standalone AirPrinter.
------------------------
AirPrint over WiFi Direct
An AirPrint-capable unit should also work with WiFi Direct - you can access the printer directly without needing a home WiFi network or a printer driver. Assuming that you know the printer's WiFi Direct password, use your WiFi connection app to join the printer's network. Run "Scan network for AirPrinters" and do the above CUPS setup.
------------------------