The Universal Resource Identifier URI
Perhaps the most important bit of CUPS configuration data is the URI, which is a superset (inverse of subset) of the more well-known URL. In other words, a URI includes regular HTTP and FTP URLs, as well as IPP interfaces such as this:
DeviceURI ipp://192.16 8.0.30/printers/LaserJonHP
Local URIs are based on printers directly connected to the local system, and networked URIs are based on printers accessed over a network. First, I present several examples of local URIs, which are almost self-explanatory. The first URI is based on an HP printer LaserJet 4L connected via a parallel port:
DeviceURI hp:/par/LaserJet_4L?device=/dev/parport0
The next two URIs suggests parallel and USB ports, respectively, with no specified printer. You might see this based on a generic print driver, or even a connected and known printer that just wasn't detected. As long as you've specified an appropriate print driver, the generic nature of the URI is not important.
DeviceURI parallel:/dev/lp0 DeviceURI usb:/dev/usb/lp0
The device that follows is based on a connection to a specific HP OfficeJet printer for fax-based print jobs:
DeviceURI hpfax:/officejet_710 0_series?
The following devices are based on local printers connected to LPD/LPRng, SCSI, and serial ports:
DeviceURI lpd DeviceURI scsi DeviceURI serial
Examples of networked DeviceURIs include the following. The first option is one way to connect to a CUPS configured printer. While the first address uses HTTP, the IPP is actually the protocol used as port 631 is specified. For that reason, the port number is not required in the second option as the URI starts with an ipp://.
DeviceURI http://ubuntuserver:631/printer/LaserJonHP DeviceURI ipp://ubuntuhardyserver/printer/LaserJonHP
The socket:// is somewhat generic; port 9100 is commonly used for some HP and Apple printers:
DeviceURI socket://192.168.0.5:9100/
The following URI connects to a printer configured to an LPD or LPRng server:
DeviceURI lpd://192.168.0.10/LaserJonHP
Continue reading here: Major CUPS Configuration Files
Was this article helpful?