Skip to content
This repository has been archived by the owner on Jul 11, 2022. It is now read-only.

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Enable AirPrint #2

Closed
gid204 opened this issue Jun 26, 2020 · 3 comments
Closed

Enable AirPrint #2

gid204 opened this issue Jun 26, 2020 · 3 comments

Comments

@gid204
Copy link

gid204 commented Jun 26, 2020

Hey, I've installed this container using docker-compose (ubuntu) and am able to access cups and print the test page from the GUI.
However I use the print function on my iOS device, it can't find the printer, is there a way to enable this or should it be enabled by default?

Once the container starts I move the .service file from /services to /etc/avahi/services and then restart the container.

@RagingTiger
Copy link
Owner

tl;dr I have no experience with this problem .... unfortunately.

SHORT EXPLANATION
I have never had problems discovering the printer via iOS device ... granted I have never extensively printed using my iOS device ... I predominantly print from a macOS laptop.

LONG EXPLANATION
My usage case for this Docker image has always been to setup a Raspberry Pi on my local network (wired), install Docker, connect whatever printer(s) to it, deploy this image, configure everything, and print from my laptop.

I am also not the original author, and as such, have not extensively studied the scripts being used to configure the container. So I do not know what role the .service file plays in avahi discovery, or iOS. You might consider looking through the issues on the original author's GitHub repo: https://github.com/quadportnick/docker-cups-airprint.

@hans362
Copy link

hans362 commented Jul 13, 2020

I encountered the same problem as yours, and I have found a solution.

First, you have to make sure that your container is running in host network.

Then, you have to install avahi packages on your host machine.
sudo apt-get install avahi-daemon avahi-utils

Finally, you have to enable avahi reflector by modifying /etc/avahi/avahi-daemon.conf on your host machine.
Change #enable-reflector=no to enable-reflector=yes

Restart the avahi service on your host machine by running sudo service avahi-daemon restart and restart your container. Hopefully, you will find your printer on your iOS devices.

@P1Rebo
Copy link

P1Rebo commented Jan 9, 2021

@gid204 Thanks a lot for providing this docker image.
It might make sense to add this info to the readme.

@hans362 Thank you, this helped out also in my case, using a RPi4 with Arch Linux.
With Arch Linux simply install the avahi package.
pacman -S avahi

Edit the config file, e.g. using nano
nano /etc/avahi/avahi-daemon.conf

Change #enable-reflector=no to enable-reflector=yes

Afterwards, start and enable the avahi daemon on host using
systemctl start avahi-daemon.service
systemctl enable avahi-daemon.service

After restart of the container it worked like a charm!

Repository owner locked and limited conversation to collaborators Jan 24, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants