Syndicate
Site (RSS, Atom)
Contact
Weblog status
Total entries: 78
Last entry: 2022-10-16 13:52:24
Last updated: 2022-10-16 14:12:58
powered by vim, bash, cat, grep, sed, and nb 3.4.2

2015-04-07 20:46:09

AirPrint with Red Hat / Fedora

Apple's AirPrint uses Bonjour / Zeroconf to automatically announce services and more in a network. Under the hood it uses Multicast DNS (mDNS) or DNS Service Discovery (dns-sd). On Linux servers this is done by avahi.

Many tutorials have been written for this topic. Even a special script airprint-generate.py was written to automatically create an avahi service description for every printer published by a (local) CUPS printing service.

Nevertheless many Fedora-like distros still need some manual configuration due to missing MIME type image/urf. I made a small patch to also automate adding of the MIME type and its conversion if the (local) CUPS server does not yet support it.

If the MIME type image/urf is missing then airprint-generate-rh.py will issue a warning:

# python2 airprint-generate-rh.py -v
image/urf is not in mime types, generating airprint.types and
 airprint.convs; you should restart cups by
 "systemctl restart cups.service" and run this script again
Created: /etc/avahi/services/AirPrint-Epson-smb.service

You will see two new files:

# ls -l /usr/share/cups/mime/air*
total 32
-rw-r--r--. 1 root root   53 Apr  7 16:28 airprint.convs
-rw-r--r--. 1 root root   36 Apr  7 16:28 airprint.types

After restarting cups and running the script again there should be no warning anymore.


Posted by Frank W. Bergmann | Permanent link | File under: networking, redhat, fedora, apple, python