Skip to content

Instantly share code, notes, and snippets.

@DrPsychick
Last active April 27, 2020 21:34
Show Gist options
  • Save DrPsychick/52c7593b44766a7a43669c7344e9d48f to your computer and use it in GitHub Desktop.
Save DrPsychick/52c7593b44766a7a43669c7344e9d48f to your computer and use it in GitHub Desktop.
airprint-bridge playground
# start a container to play with it
docker run -d --rm -e CUPS_WEBINTERFACE="yes" -e CUPS_REMOTE_ADMIN="yes" \
--hostname mycups --name cups-setup drpsychick/airprint-bridge
# you can search for local printers via the web interface
IP=$(docker inspect --format '{{ .NetworkSettings.Networks.bridge.IPAddress }}' cups-setup)
echo "http://$IP:631"
# you can open a shell to explore printers via `lpinfo`, `lpadmin`, `lpoptions`
docker exec -it cups-setup lpinfo --make-and-model "Epson Stylus Photo RX" -m
# add a samba printer shared by a local windows host
docker exec -it cups-setup lpadmin -p Epson-RX520 -D 'Epson Stylus Photo RX520' \
-m 'gutenprint.5.3://escp2-rx620/expert' -o PageSize=A4 -v smb://user:pass@host/Epson-RX520
# explore options you can set for your printer and rerun above `lpadmin` command with the options
docker exec -it cups-setup lpoptions -p Epson-RX520 -l
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment