[SOLVED] Unable to set HP printer as shared on CUPS (HP LaserJet Pro 402dn)
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Unable to set HP printer as shared on CUPS (HP LaserJet Pro 402dn)
I'm trying to share my HP printer over the LAN on Slack 14.2_64, and for some reason it always shows up as "Not shared" in the CUPS web interface. At this address http://localhost:631/printers/HP_LaserJet_M402dn I get;
Code:
HP_LaserJet_M402dn (Idle, Accepting Jobs, Not Shared, Server Default)
Although inside /etc/cups/printers.conf it says
Code:
# Printer configuration file for CUPS v2.1.4
# Written by cupsd on 2016-08-14 15:56
# DO NOT EDIT THIS FILE WHEN CUPSD IS RUNNING
<DefaultPrinter HP_LaserJet_M402dn>
UUID urn:uuid:baea5ee1-33fe-380d-5934-d18decc1318c
Info HP_LaserJet_M402dn
MakeModel HP LaserJet Pro M402-M403 Postscript (recommended)
DeviceURI hp:/usb/HP_LaserJet_M402dn?serial=PHCND02163
State Idle
StateTime 1471153083
ConfigTime 1471153240
Type 8425684
Accepting Yes
Shared Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy stop-printer
</DefaultPrinter>
and in /etc/cups/cupsd.conf I have the default Slack config with the following added;
Code:
#Listen localhost:631
Port 631
<Location/>
Order allow,deny
Allow @LOCAL
</Location>
I'm not sure why this printer would always fail to show up as shared?
in cupsd.conf makes the printer show up as "Shared". The next problem is trying to connect a Mac computer to this share, if I work it out I will post the answer.
For future reference, adding 'BrowseLocalProtocols dnssd' and having the printer show as "Shared" in the CUPS web interface is, confusingly enough, not even required for sharing. As long as the printer is set to shared in /etc/cups/printers.conf, the minimum changes I needed in cupsd.conf were;
Code:
#Listen localhost:631
Port 631
<Location/>
Order allow,deny
Allow @LOCAL
</Location>
From there I could successfully add the printer on the client using the ipp address.
For future reference, adding 'BrowseLocalProtocols dnssd' and having the printer show as "Shared" in the CUPS web interface is, confusingly enough, not even required for sharing. As long as the printer is set to shared in /etc/cups/printers.conf, the minimum changes I needed in cupsd.conf were;
Code:
#Listen localhost:631
Port 631
<Location/>
Order allow,deny
Allow @LOCAL
</Location>
From there I could successfully add the printer on the client using the ipp address.
Thanks for the info. I also saw the "Not Shared" issue in the cups web interface. But as the same you mention in the config, it is definitely shareable since cups is listening on 631. I suspect the 'BrowseLocalProtocols dnssd' is a cosmetic assumption built into cups, and doesn't really do anything without Avahi anyway.
There really needs to be this info, and the other info collected lately, compiled into a wiki page. There isn't a site on the web that actually has any info on how cups works now. Most of the pages on the web just assume a simplistic approach with something like avahi running, and not actually using cups directly.
I will add this info in once my wiki account becomes properly active (I can't currently add pages). Might save someone a few headaches.
It's actually kinda weird on how you have to create pages (at least, I haven't found a better way). Basically, you need to edit a page to give you the link to the page you want to create (it'll be red), then you just click on that page, and at the top there'll be a "create this page" link. Click on that and you're good to go. Another option is to just create the page based on the web address directly, but I find that a bit more difficult.
I just did a link called "printer_stuff" and provide the link below. You can then see at the top the option to create the page. You can either change the url yourself, or "create the page", and edit it to provide a link to the page you actually want. Click preview, and you'll now have a clickable link. As long as you don't save the initial page, you won't have any problems. Personally, I ended up creating a page for my username (just click on it), then I put a section in there for "Unfinished pages". Once I am done with my page, I'll move it to a "Finished pages" section.
As drgibbon found on another thread, but in case others don't frequent the ARM subforum, the page creation issue has been fixed by Eric. At the top of the HOWTO categories' pages, there is now a box to help you create a page.
There's now no need for the workaround I posted...
Apologies for resurrecting and old thread, but coming late to 14.2 I found cups did not work with my old settings and spent much time trying to figure this out. So it may save some kind soul the bother :-)
The bottom line is /etc/cups/cups-browsed.conf needs an entry BrowsePoll <server_ip>:631, and /etc/rc.d/rc.cups-browsed start.
I wrote a short note on the discussion page of drgibbon's documentation. If no errors are spotted by fellow-Slackers, feel free to incorporate it in your article, drgibbon.
The comments at the top of rc.cups-browsed seem to indicate that cups must be up prior to cups-browsed. They say that cups-browsed creates local cups queues pointing to the remote ones (which I suppose means that cups is up) and that cups is 'required'. That's why I thought rc.local and rc.local_shutdown are reasonable choices. I have not tried to bring them up the other way around.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.