Sharing printers on the LAN

Hello, all. I used SuSE for ages (starting well over 20 years ago), but have been away from linux altogether for a few years now. Now I have need of it again, and I am struggling.

My son has an OpenSUSE 15.2 machine, and I’m running 15.2 on an old iMac. He has a printer connected via USB to his machine; works well (simple HP LaserJet). He’s wired, I’m wireless, but we’re both on the LAN in the house. I want his machine to share that printer so I can print to it. I’ve told YaST to make that happen. It says ‘ok.’ My machine says there are no network-connected printers available. Both our machines’ firewalls are set to allow cups on the “local” interface, and both our machines are set to have our network adapters on the “local” interface.

What do I need to do to get his printer shared on the LAN, and to get mine to see and use it?

On a related note, my wife’s iMac is sharing a printer on the local network, but neither of our openSuSE machines acknowledge its existence. An Ubuntu installation saw it fine, but for other reasons I erased Ubuntu (not realizing I might need configuration info from it for this problem, since it wasn’t a problem to see and set up on Ubuntu).

What do I need to do to get our openSuSE installations to see the shared printer on the iMac?

Thanks.

Welcome aboard. The distro is now known as openSUSE of course. CUPS uses Avahi to advertise printers these days. So make sure to allow mdns if you have an active firewall on a given host.

Some pertinent references:
https://www.cups.org/doc/firewalls.html
https://wiki.archlinux.org/index.php/CUPS/Printer_sharing

Thank you for your reply. I was out with my family yesterday evening. I re-started openSUSE this morning and, without having changed a thing since posting my request for help, the system ‘sees’ both of the shared printers on the LAN in the YaST printer section (the one on my son’s openSUSE system is listed twice), and also on the taskbar in the lower right corner. I must have not got a daemon or service (re-)started or something, after my initial setup and troubleshooting efforts, though I did try.

Sadly, printing fails to both printers (even test page printing in the YaST setup section). What do I need to chase now?

Read the ArchLinux wiki page I linked to already. That should explain all that is necessary.

Some additional information here…
https://www.cups.org/doc/sharing.html

I installed a HL-L2350DW several months ago:

  • It shows up in the router and accepts print jobs.
  • I can access all my printers e.g. from host 3400G
    by pointing my browser to host erlangen using: http://erlangen:631/printers/

Does that work with your setup?

The OP mentioned that they have USB-connected printer, hence their reference to a host acting as the CUPS server. Much easier with network-connected printers of course.

Just guessing! I kept having such problems due to double filtering - sometimes I guess. If you export your printer queue filtered you may have issues if you try to set up the filtering on the client on top of it. You may try and export it as a raw queue, only.

The problem appears to me to be on my machine rather than the ‘print servers,’ since I cannot print to either the other openSUSE machine or the Mac. I will re-read the arch linux page tomorrow, but it doesn’t appear to get at the issue. It was helpful in getting the one machine to advertize and the other to ‘see’ the printer(s), though, so thank you for that.

At this point the ‘printers’ dialogue down on the lower right of the task bar reports the printers correctly as to what and where they are, but the pages I’ve tried to send to them are “Paused - Rendering completed.” Telling it to re-start the print process tries to re-start the process, but shortly it reverts to “Paused - Rendering completed.”

Check page http://localhost:631/admin for correct settings.

As kasi042 mentioned, it could be double-filtering at play. In the old days, it was common to configure the client computers with a raw print queue, and let the server do the print job filtering. (In fact it can also be done the other way around as well.)

Anyway, Try configuring the client printer queue manually as an IPP Everywhere printer…

lpadmin -p *printer* -E -v ipp://*server*/printers/*printer* -m everywhere

An easy solution: yast2 printer > print via network > Do all printing via one single CUPS server > OK.

That’s what I used to do. I have to admit, setting up the shared printer via network always is some hit-and-hope for me. So often had the same issues as the OP, the clients not even seeing the printers or not being able to print etc. Letting the server do the print sometimes ended up in permission problems. With the server exporting only the raw queue I find it much easier at the clients’ end.

I use ‘yast2 printer > Share Printers > Allow Remote Access > For computers with the local network > OK’. Always worked so far.

That relates to the CUPS server. The OP is concerned with the client hosts. CUPS supports such connectivity using the IPP protocol. Easily configured with the CUPS web interface, lpadmin, (or YaST).

Sure, see post #12. Clients contact servers. Proper configuration of both is a requirement.

Actions performed:

  • Printer: run linux-brprinter-installer-2.2.2-1 on server
  • Server: yast2 printer > Share Printers > Allow Remote Access > For computers with the local network > OK
  • Client: yast2 printer > print via network > Do all printing via one single CUPS server > OK

Tested printing on command line and with dolphin in Tumbleweed.

YaST is only one means to an end. Read my comments. :wink:

Or just use cupsctl…

sudo cupsctl --share-printers

Simple!

  • Client: yast2 printer > print via network > Do all printing via one single CUPS server > OK

Tested printing on command line and with dolphin in Tumbleweed.

If CUPS discovery is working, shared printers should be shown automatically. In any case, always good to know what YaST is doing under the hood…as I’ve already shared…
https://www.cups.org/doc/sharing.html

The default server is normally the local system (“localhost”). To override the default server create a file named /etc/cups/client.conf with a line as follows:
ServerName server
The server name can be the hostname or IP address of the default server.

Changes made to /etc/cups/cupsd.conf by ‘yast2 printer’:

11a12 
> Listen *:631 
27c28,30 
<   Order allow,deny 
--- 
> Allow @LOCAL 
> Order allow,deny 
> Allow 127.0.0.2 
224a228,232 
> # 2020-01-02,20:52:55 modify_cupsd_conf Allow @LOCAL 
> # 2020-01-02,20:52:56 modify_cupsd_conf Browsing On 
> # 2020-01-02,20:52:56 modify_cupsd_conf Listen all 

Okay. This was not going well. In fact it went sufficiently not-well that I erased and tried fedora. Don’t like it. Re-installed openSUSE. This new install ‘sees’ the printer connected to the Mac right out of the box, but no longer ‘sees’ the one connected to the other openSUSE machine.

However, when I try to print to the printer hooked to the Mac, nothing prints and shortly my machine says “unable to locate printer” when I look at the print queue in the status and notifications tool on the task bar. The printer is on and awake, as is the Mac it is connected to. YaST reports that the printer is “Ready,” and the setup screens you all had me check at localhost:631 appear to be correct.

You all had suggested printing to a raw print queue. That is how SUSE set up the Mac-attached printer initially and automatically, so I’m already there.

What’s the deal here?