And I think that nothing driverless things on Raspberry Pi
> driverless -v
DEBUG: Started ippfind (PID 2834)
DEBUG: Started post-processing (PID 2835)
DEBUG: PID 2834 (ippfind) stopped with status 1!
DEBUG: PID 2835 (Post-processing) exited with no errors.
I don’t know how AirPrint works. But I can print from my iPhone by default.
@adasiko, first test whether you printer works on the Raspberry Pi. Print a file from a terminal on the Pi or print a test page from the Pi’s CUPS web interface. Make sure that your Pi shares the printer (CUPS must share printers in general and each printer needs to be shared individually). Probably this works already, your iPhone talking with the CUPS of the RaspBerry Pi. AirPrint as a server works on Ubuntu’s CUPS already for several years (as distro patch as CUPS upstream was maintained by Apple) but this support was rather rudimentary, not allowing to set options on the iPhone. Newer CUPS (2.4.x) which is maintained by OpenPrinting and not by Apple has full AirPrint support (for example the CUPS Snap).
If the Pi and your client machine running the CUPS Snap are in the same subnet, the CUPS Snap should see the printers on the Pi and automatically create a queue.
Your manual queue should principally work, the problem you mention seems to be a DNS problem. Can you log into the Pi via ssh ubuntu.local? Does a browser on your client display the Pi’s web interface via http://ubuntu.local:631/?
Server (Raspberry Pi) works fine with printer over USB and CUPS as DEB package. I do not install CUPS SNAP version on “Print Server” aka Raspberry Pi.
Only printing from client does not work with CUPS as SNAP package. Clear Desktop Ubuntu (with preinstalled CUPS as DEB package) works fine with this printing over Ethernet.
Clean Ubuntu Desktop installation with DEB CUPS - all works fine.
ping ubuntu.local - OK (It’s print server on Raspberry Pi)
Turn Off DEB CUPS services. Install SNAP CUPS. Add Printer from Web interface (it’s discovering fine with ubuntu.local name). Printing does not work - "Unable to locate printer “ubuntu.local”
ping ubuntu.local - OK
One line to /etc/hosts
192.168.181.2 ubuntu.local
And printing is working (without restart any services).
But ping is always working without problems… And original (DEB) CUPS working with it too…
@adasiko On the machine where you have the CUPS Snap running, could you run the command
sudo snap run --shell cups.cupsd
You will get a root prompt. In this shel you are under the same restrictions as your snapped cupsd. Run the command
ippfind
here and post what you get. Do you get results? Is ubuntu.local under them?
Now run
ipptool -tv URI get-printer-attributes.test
with the URIs from your ippfind output. Do you get valid printer attributes? Or do you get some kind of error output?
You can get back to your normal shell with the exit command.
adasiko@ubuntu20:~$ ping ubuntu.local -c 1
PING ubuntu.local (192.168.181.2) 56(84) bytes of data.
64 bytes from 192.168.181.2 (192.168.181.2): icmp_seq=1 ttl=64 time=0.470 ms
--- ubuntu.local ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.470/0.470/0.470/0.000 ms
adasiko@ubuntu20:~$ sudo snap run --shell cups.cupsd
root@ubuntu20:/home/adasiko# ippfind
ipp://ubuntu.local:631/printers/HP_LaserJet_Professional_P1102
root@ubuntu20:/home/adasiko# ipptool -tv ipp://ubuntu.local:631/printers/HP_LaserJet_Professional_P1102 get-printer-attributes.test
ipptool: Unable to connect to "ubuntu.local" on port 631 - Name or service not known
root@ubuntu20:/home/adasiko#
One line “192.168.181.2 ubuntu.local” in /etc/hosts and all works. But simple ping works without it…
@adasiko Could you check the syslog (/var/log/syslog file or journalctl command) whether at the point in time when ipptool had answered ipptool: Unable to connect to "ubuntu.local" on port 631 - Name or service not known to you, whether there are messages containing audit and DENIED? This way we could see whether the CUPS Snap’s security shield is blocking DNS.
If you cannot determine the exact time when you have issued the ipptool command, simply repeat the commands from above.
@adasiko I do not get such messages, for me all is working correctly, I can print with the CUPS Snap to a remote printer without any problems. I have Ubuntu Hirsute (upcoming 21.04).
NOTE: To run the CUPS Snap’s CUPS on a system with installed but de-activated CUPS you need to enter this additional command now to make the system’s CUPS invisible for the CUPS Snap:
sudo mv /etc/cups /etc/cups.old
Otherwise the CUPS Snap will go into the new proxy mode. Alternatively, one can suppress the proxy mode altogether and make the CUPS Snap behave as before:
sudo touch /var/snap/cups/common/no-proxy
(remove the file again to return to the new behavior)
Works great here! Everything behaves the way I’d expect it to.
Tested with the following setup:
OS: Ubuntu Core 20 (all-snap system).
Printer: connected over USB and added manually through cups.lpadmin.
Application: print jobs sent from a headless application snap that includes the cups-client stage-package, initiates print jobs with lp, and is connected to the CUPS snap’s cups slot.
Notes: my use-case only includes local printing, I did not test network printing in either direction.