2

I have a Debian server and a Debian laptop, and I'm trying to use a cups server to print pages from all my home computers.

So I added the printer to the server's cups successfully with the correct drivers, and after that I added the printer to my laptop's cups. However, when I ask to print, I don't see my printer in the print dialog in the system.

The screen shot is from the "Manage Printers" page of cups, where you see a shared printer and an added printer from the shared printer. While yet I can't see those printers in the print dialog.

Why is this happening?

enter image description here

Thank you for any efforts.

The Quantum Physicist
  • 770
  • 4
  • 18
  • 36

2 Answers2

0

In my case, I needed to get rid of my ServerName setting in my client.conf file, and then open up access from my local network instead of staying restricted to localhost.

Thanks to @bnjmnrsr for starting me down the right path. In my case, lpstat reported:

$ lpstat -s
no system default destination
lpstat: Bad file descriptor
lpstat: Bad file descriptor

This led me to this post, in which the OP was kind enough to post his solution:

[The] problem was the following:

in /etc/cups/client.conf it is possible to manually specify a server with the syntax

ServerName hostname-or-ip:port

This is the method I used in the past for workstations on a small network connected to a predetermined print server

However, that does not seem to work anymore. Not unless the CUPS_SERVER environment variable is manually set to the same hostname.

Solution consisted in removing the manually set hostname and restoring cups default

ServerName /var/run/cups/cups.sock

In my case, I simply commented-out the ServerName in my client.conf file and restarted CUPS on the client:

$ service cups restart

When I ran lpstat again, I got a better message:

$ lpstat -s
no system default destination
lpstat: No destinations added.
lpstat: No destinations added.

Next, I ended up here to see how to configure CUPS to listen on an external IP address. I'm not sure if the entire configuration is necessary, but at the very least I observed my CUPS server was only listening to localhost:

$ netstat -an | grep 631
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN

In my /etc/cups/cupsd.conf file, I had to change the Listen directive from:

Listen localhost:631

to:

Listen <dnsnameofyourserver>:631

Once I restarted cups and cups-browsed on the server and the client, my lpstat on the client worked better. (I don't know if I needed to restart all four, but I did so anyway.)

$ lpstat -a
ML-1710 accepting requests since Fri 24 Feb 2017 07:48:59 PM EST

My File > Print dialogs are now showing the printers listed as well.

jia103
  • 594
0

I got the problem fixed. The problem was that I had also my work network defined in ~/.cups/client.conf, and this made the lpstat -s freeze, and that made me realize that the system wasn't able to read the printers because of this. Thanks to @bnjmnrsr for the help :)

The Quantum Physicist
  • 770
  • 4
  • 18
  • 36