Printer sharing using Avahi

Post your tutorials and howtos here.
User avatar
Arjen Balfoort
Site Admin
Posts: 9518
Joined: 26 Jan 2013 19:36
Location: Netherlands
Contact:

Printer sharing using Avahi

Postby Arjen Balfoort » 15 Jun 2020 17:40

Situation
I have my main PC with a laser printer attached through usb. I want to share the printer so that the laptops on the same network can print directly to the shared printer. I tried with only avahi-daemon and also with only winbind installed but I could not get the server to print on my machine.

On printer server
Install needed packages:

Code: Select all

apt install avahi-daemon cups-ipp-utils winbind libnss-winbind
Fix Avahi warning (optional):

Code: Select all

sudo mkdir -p /etc/avahi/services
sudo systemctl restart avahi-daemon.service
systemctl status avahi-daemon.service
Turn the printer on.
Open a browser: http://127.0.0.1:631
Go to tab Printers and check that your printer is correctly configured and shared.

Check for "wins" in /etc/nsswitch.conf:

Code: Select all

hosts:          files wins mdns4_minimal [NOTFOUND=return] dns
Restart samba services:

Code: Select all

sudo systemctl restart smbd nmbd winbind
On laptop
Check network configuration:

Code: Select all

ping -c 5 [print server name]
ping -c 5 [print server name].local
These should return the same IP address

Open a browser: http://127.0.0.1:631
Go to tab Administration > Find New Printers: select the shared network printer.

Or manually install the network printer
Find ipp uri for shared printer on laptop:

Code: Select all

ippfind -T 5
Use uri in Tab Administration > Add New Printer > ipp

Check firewall and open port 631 on printer server and laptop if needed.

Code: Select all

sudo ufw allow to any app CUPS
sudo ufw allow from any app CUPS


SolydXK needs you!
Development | Testing | Translations

Return to “Tutorials”

Who is online

Users browsing this forum: No registered users and 1 guest