A lot of person explain on internet how to share your non AirPrint server using Linux, Avahi and Cups
For Cups, you need to share the printer ( obvious ? ) and to allow Broadcasting like this
- Add to the /etc/cups/cupsd.conf file
ServerAlias * Browsing On BrowseOrder allow,deny BrowseAllow @LOCAL BrowseAllow all
- Download airprint-generate.py from https://github.com/tjfontaine/airprint-generate
- Run airprint-generate.py
- Copy resulting files to/etc/avahi/services
- Restart cups and avahi-daemon
But I realize this only work only a few minutes, so I tweak with a crontab doing : [root@eden services]# cat > /etc/cron.hourly/avahi.cron <<EOF #!/bin/bash for i in /etc/avahi/services/*; do touch $i; done EOF [root@eden services]# chmod 755 /etc/cron.hourly/avahi.cron [root@eden services]# /etc/cron.hourly/avahi.cron
Hope it helps !
AS ROOT:
echo “image/urf urf (0,UNIRAST)” > /usr/share/cups/mime/apple.types
echo “image/urf application/vnd.cups-postscript 66 pdftops” > /usr/share/cups/mime/local.convs
# pdftops can be installed with: yum install poppler-utils
#restore SELINUX permissions
restorecon /usr/share/cups/mime/*
#restart cups (print server)
systemctl restart cups.service
AS USER:
#download airprint-generate.py as stated above and run it from: https://github.com/tjfontaine/airprint-generate
cd /tmp/
python airprint-generate.py
AS ROOT:
mv /tmp/AirPrint-*.service /etc/avahi/services/
restorecon /etc/avahi/services/*
#restart the avahi service
systemctl restart avahi-daemon.service
#check the new AirPort service is running
avahi-browse –all
# no avahi-browse ?, install it: yum install avahi-tools
You also need to add the urf type to CUPS. In /usr/share/cups/mime/mime.types, in the image files section, add the line
image/urf urf string(0,UNIRAST)
In /usr/share/cups/mime/mime.convs, in the raster filters section, add the line
image/urf application/vnd.cups-raster 100 imagetoraster
Then restart CUPS with systemctl restart cups
Oops: instead of adding the above lines to mime.types and mime.convs (which get overwritten next time CUPS is upgraded), create new files local.types and local.convs (same directory) and put
image/urf urf string(0,UNIRAST)
in local.types and
image/urf application/vnd.cups-raster 100 imagetoraster
in local.convs. Then restart CUPS with
systemctl restart cups