site  contact  subhomenews

Easy network printing with CUPS

January 12, 2018 — BarryK

I have been trying all day to setup printing over a small network, just two PCs running Easy 0.6.6, connected to an ethernet router (and to the Internet via wi-fi wan, to my mobile phone hotspot).

One PC, my "midi-tower", has a Brother HL-2040 laser printer connected via USB port. Local printing works fine. The other PC is my Mele "mini-pc", and I want to be able to print from it.

The problem is, I cannot get the "ipp" protocol to work. I have studied online documentation, and can get the client machine, my mini-pc, to see the remote printer, however when do an actual print, get the dreaded "Filter failed".

As stated, I have messed around all day, trying different things. Then, I found something that "just works", very simple. I would like to acknowledge "paulkerry" for this info:

https://bbs.archlinux.org/viewtopic.php?id=206669

Just a comment: there is a lot of outdated, vague, ambiguous and misleading documentation about CUPS online. For example, one "very official" site explained the format of the ipp protocol as:

ipp://hostname/printers/printername

...without explaining that only "hostname" and "printername" must be substituted, and the text "printers" must be left as-is. There wasn't even an example, nor was it properly explained how to find the printername.

Anyway, I did learn how to specify ipp properly, but got stuck at "Filter failed".

The method described by paulkerry works, so here is a little tutorial to explain how to set it up. Note, I plan to semi-automate this, by extending QuickSamba, which I plan to rename to EasyShare. Anyway, the tut...

1: Firewall

I ran the firewall setup on both client (my mini-pc) and server (my midi-tower) PCs, so that the CUPS port (631) is enabled. In this snapshot, I have also enabled Samba ports, but that isn't necessary for just printing with CUPS:

image

On the server-PC, just setup the local printer as you normally would, but tick some extra boxes...

2: Server PC

You need to have the cupsd daemon running and point the web browser at http://localhost:631. In Puppy/Quirky/Easy, you do this by running the "CUPS Printer Wizard":

image

A window will popup asking if you want to add a new printer, and you click "Yes", then you will get the CUPS web interface:

image

...click on "Adding Printers and Classes", then the next window:

images

...click each of those, 1, 2, 3 and 4. Do not miss "Change Settings". Probably "Allow remote administration" is optional, but I enabled it, as I was then able to bring up the CUPS web interface of the server-PC on my client-PC. Next window...

image
...well, anyone who has setup a local printer will be familiar with this. Continuing, as per usual, except an important checkbox to tick...

image
...the first two boxes are pre-filled. It is not essential, but useful, to fill "Location". And, you must tick "Share This Printer".

In the next window, you choose a driver...

image

And set some printer options...

image

That's it, the server-PC is setup. Before setting up the client, you will need to know the IP-address of the server. A few ways of doing that. Open a terminal and type "ifconfig", and you will see it -- in my case it is "192.168.0.3":

image

In Puppy/Easy/Quirky, there is no need to edit the /etc/cups/cupsd.conf main configuration file, as it is pre-configured OK. Note, for this tutorial, I am running pristine EasyOS Pyro64 version 0.6.6.

Now for the client-PC...

3: Client PC

Over on my Mele mini-pc, setup is easy-peasy. I created file /etc/cups/client.conf...

image

...with content just one line, "ServerName <ip address of server>"

Finally, restart the cupsd daemon...

image

...and run "lpstat -t" to verify that the remote printer is found.

That's it, nothing more to do. If you ran an application and choose "Print...", the remote printer will be offered, in my case, my Brother HL-2040.

Also, the CUPS web interface of the server can be accessed from the client, by going to "http://192.168.0.3:631" in the client web browser.

As stated, I have thoughts how this setup can be semi-automated, including automatic creation and update (if the ip-address changes) of /etc/cups/client.conf. Stay tuned.

Tags: linux, easy, quirky