News:

The Latest electronic and computer Tips that work!

Main Menu

Airprint Linux server Any printer on your Network

Started by branx86, September 21, 2015, 11:45:01 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

branx86

 :)  You need avahi-daemon and cups to make airprint work!!! :)

1st. Configure your Cups to your printers.

2nd. Edit the CUPS' config file.  located in /etc/cups/cupsd.conf and make the section that looks like:

# Only listen for connections from the local machine.
Listen localhost:631
Listen /var/run/cups/cups.sock

look like this:

# Listen on all interfaces
Port 631
Listen /var/run/cups/cups.sock


3rd. Then you need to modify the Apache specific directives to allow connections from everywhere as well. Replace the followin section:

<Location />
# Restrict access to the server...
Order allow,deny
</Location>
<Location /admin>
# Restrict access to the admin pages...
Order allow,deny
< /Location>
<Location /admin/conf>
AuthType Default
Require user @SYSTEM
# Restrict access to the configuration files...
Order allow,deny
</Location>

to:

<Location />
# Restrict access to the server...
Order allow,deny
Allow all
</Location>
<Location /admin>
# Restrict access to the admin pages...
Order allow,deny
Allow all
</Location>
<Location /admin/conf>
AuthType Default
Require user @SYSTEM
# Restrict access to the configuration files...
Order allow,deny
Allow all
</Location>

4th. Restart your cups daemon:

# /etc/init.d/cupsd restart

5th. You should now be able to log into cups on your server with:

https://yourserverip:631



6th.  Create new mime files - This is needed for iOS 6 to recognize CUPS print shares! :

# echo "image/urf urf string(0,UNIRAST<00>)" > /usr/share/cups/mime/airprint.types
# echo "image/urf application/pdf 100 pdftoraster" > /usr/share/cups/mime/airprint.convs


# mkdir /opt/airprint
# cd /opt/airprint
# wget -O airprint-generate.py --no-check-certificate https://raw.github.com/tjfontaine/airprint-generate/master/airprint-generate.py
# chmod +x airprint-generate.py
# ./airprint-generate.py -d /etc/avahi/services
# /etc/init.d/avahi-daemon restart

Do # ls /etc/avahi/services/   You should see something like "AirPrint-Name-of-your-printer".

Just to be sure we we've got everthing. service avahi-daemon restart and service cups restart

                            FYI-- If you need to connect a CUPS to a Windows printer that is connected via usb or parallel port use     smb://user:password@WindowsPC-name/Printer-ShareName  In CUPS server_IP:631 and connect as SMB