RaspBerry Pi AirPrint Server

From ProjectPages
Jump to: navigation, search

Install CUPS

$ sudo apt-get update
$ sudo apt-get install cups
$ sudo usermod -a -G lpadmin pi
$ sudo apt-get upgrade

Edit Config

$ sudo nano /etc/cups/cupsd.conf

# Only listen for connections from the local machine.
# Listen localhost:631
Port 631
Listen /var/run/cups/cups.sock
# Restrict access to the server...
<Location />
  Order allow,deny
  Allow @local

# Restrict access to the admin pages...
<Location /admin>
  Order allow,deny
  Allow @local

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

Restart CUPS

$ sudo /etc/init.d/cups restart

For HP Printers

$ sudo apt-get install hplip


# make the airprint folder
$ sudo mkdir /opt/airprint
# make that the current folder
$ cd /opt/airprint
# download the script
$ sudo wget -O airprint-generate.py --no-check-certificate https://raw.github.com/tjfontaine/airprint-generate/master/airprint-generate.py
# set the script permissions
$ sudo chmod 755 airprint-generate.py
# run the script
$ sudo ./airprint-generate.py -d /etc/avahi/services
# reboot the systemcd 
$ sudo reboot