LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-14-2016, 01:07 AM   #1
drgibbon
Senior Member
 
Registered: Nov 2014
Distribution: Slackware64 15.0
Posts: 1,220

Rep: Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943
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?
 
Old 08-14-2016, 01:27 AM   #2
drgibbon
Senior Member
 
Registered: Nov 2014
Distribution: Slackware64 15.0
Posts: 1,220

Original Poster
Rep: Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943
Turns out setting;
Code:
BrowseLocalProtocols dnssd
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.
 
Old 08-14-2016, 01:34 AM   #3
drgibbon
Senior Member
 
Registered: Nov 2014
Distribution: Slackware64 15.0
Posts: 1,220

Original Poster
Rep: Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943
Sorted it out. On the Mac computer I went to ipp://cups-server-hostname/printers/HP_LaserJet_M402dn in Safari and it automatically added.

Regarding cupsd.conf, on the forum there's some old stuff about "BrowseRemoteProtocols", but this doesn't seem to be required anymore;
Code:
E [14/Aug/2016:16:32:26 +1000] Unknown directive BrowseRemoteProtocols on line 19 of /etc/cups/cupsd.conf.
 
Old 08-14-2016, 01:46 AM   #4
drgibbon
Senior Member
 
Registered: Nov 2014
Distribution: Slackware64 15.0
Posts: 1,220

Original Poster
Rep: Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943
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.
 
1 members found this post helpful.
Old 08-14-2016, 08:36 AM   #5
the3dfxdude
Member
 
Registered: May 2007
Posts: 730

Rep: Reputation: 358Reputation: 358Reputation: 358Reputation: 358
Quote:
Originally Posted by drgibbon View Post
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.
 
1 members found this post helpful.
Old 08-14-2016, 09:39 AM   #6
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by the3dfxdude View Post
There really needs to be this info, and the other info collected lately, compiled into a wiki page.
Registrations are open again on the slackwiki
 
1 members found this post helpful.
Old 08-14-2016, 09:40 AM   #7
drgibbon
Senior Member
 
Registered: Nov 2014
Distribution: Slackware64 15.0
Posts: 1,220

Original Poster
Rep: Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943
Quote:
Originally Posted by bassmadrigal View Post
Registrations are open again on the slackwiki
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.
 
1 members found this post helpful.
Old 08-14-2016, 09:47 AM   #8
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by drgibbon View Post
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.

http://docs.slackware.com/howtos:printer_stuff

Last edited by bassmadrigal; 08-14-2016 at 02:24 PM. Reason: noparsed the url to fix :p showing a smiley face
 
Old 08-14-2016, 02:23 PM   #9
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
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...
 
Old 08-15-2016, 12:37 AM   #10
drgibbon
Senior Member
 
Registered: Nov 2014
Distribution: Slackware64 15.0
Posts: 1,220

Original Poster
Rep: Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943
I added a wiki howto for sharing a usb printer over cups, any corrections or improvements welcome.
 
1 members found this post helpful.
Old 03-10-2017, 02:30 AM   #11
pdi
Member
 
Registered: May 2008
Posts: 50

Rep: Reputation: 59
cups client configuration

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.
 
1 members found this post helpful.
Old 03-10-2017, 06:53 AM   #12
kjhambrick
Senior Member
 
Registered: Jul 2005
Location: Round Rock, TX
Distribution: Slackware64 15.0 + Multilib
Posts: 2,159

Rep: Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512
Thanks for the info pdi.

And thanks again for Cups client configuration, Slackware

Short, simple and sweet.

One Q ... I suppose that cups-browsed need not be started before cupsd ?

If not ( and apparently not ), I'll remove my mods in /etc/rc.d/rc.cups and move them into rc.local and rc.local_shutdown as you've recommended.

-- kjh
 
Old 03-10-2017, 02:37 PM   #13
pdi
Member
 
Registered: May 2008
Posts: 50

Rep: Reputation: 59
rc.cups-browsed

Glad to have helped, kjhambrick :-)

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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to get HP Laserjet wireless Printer 100% functional trafficman Linux - Hardware 3 05-06-2012 07:08 PM
How to set up HP LaserJet 3052 printer/copier/scanner in RHEL 4 x86_64 saak.stepi Linux - Hardware 1 07-21-2009 07:06 AM
setting up HP LaserJet 4 printer with cups and no parallel port option? JockVSJock Slackware 15 07-02-2006 02:17 PM
Help printer from a samba shared printer from linux (using cups) epod69 Linux - Networking 3 12-04-2005 10:44 PM
CUPS and Shared Printer cthomas Linux - Networking 1 09-17-2005 05:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration