Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Set up remote printer with cups and ipp
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
wpkzz
Tux's lil' helper
Tux's lil' helper


Joined: 28 Feb 2013
Posts: 80

PostPosted: Fri Oct 23, 2015 6:20 pm    Post subject: Set up remote printer with cups and ipp Reply with quote

Hello fellow kernel-compilers:

I have set up a nice powerfull machine with gentoo and it is supposed to work, among other things, as the print server of my laboratory. The printer is a somewhat old HP LaserJet 1300, and so far, it works nicelly on this gentoo machine. Moreover, it has been also trivial to set up the ubuntu machines to detect the printer and print remotely from there. But there is other gentoo machine and i have been going around in circles for ever and cannot get it to print or to detect properly the printer. I know that the server/printer is listening righ, the ubuntu machines have nice acces to it with ipp and the permisions are set up straight, as far as I can tel. But I cannot seem to understand or follow a simple example in the wiki
https://wiki.gentoo.org/wiki/Printing/en#Remotely_Attached_Printer_.28IPP.29

Could you give me some nice example ?
Back to top
View user's profile Send private message
russK
l33t
l33t


Joined: 27 Jun 2006
Posts: 665

PostPosted: Fri Oct 23, 2015 6:52 pm    Post subject: Reply with quote

Do you have zeroconf USE flag on both client and server?

Or, another suggestion, on the client can you go to the local cups admin page (https://localhost:631), and manually add the printer with an ipp URI, something like one of these from the documentation:

Code:
Internet Printing Protocol (IPP)
IPP is the only protocol that CUPS supports natively and is supported by most network printers and print servers. IPP printing normally happens over port 631 and uses the http (Windows), ipp, and ipps URI schemes:

http://ip-address-or-hostname:port-number/resource
http://ip-address-or-hostname:port-number/resource?option=value
http://ip-address-or-hostname:port-number/resource?option=value&option=value
ipp://ip-address-or-hostname/resource
ipp://ip-address-or-hostname/resource?option=value
ipp://ip-address-or-hostname/resource?option=value&option=value
ipp://ip-address-or-hostname:port-number/resource
ipp://ip-address-or-hostname:port-number/resource?option=value
ipp://ip-address-or-hostname:port-number/resource?option=value&option=value
ipps://ip-address-or-hostname/resource
ipps://ip-address-or-hostname/resource?option=value
ipps://ip-address-or-hostname/resource?option=value&option=value
ipps://ip-address-or-hostname:port-number/resource
ipps://ip-address-or-hostname:port-number/resource?option=value
ipps://ip-address-or-hostname:port-number/resource?option=value&option=value


I believe port-number would be 631, and resource would be the printer name.


HTH
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3664

PostPosted: Mon Oct 26, 2015 11:29 am    Post subject: Reply with quote

russK wrote:
Do you have zeroconf USE flag on both client and server?

Sorry for deviating from the topic. What exactly does the zeroconf do for printer detection?
For my wlan Brother printer, CUPS' printer detection works perfectly without zeroconf or dbus or the likes.
Back to top
View user's profile Send private message
cboldt
Veteran
Veteran


Joined: 24 Aug 2005
Posts: 1046

PostPosted: Mon Oct 26, 2015 1:32 pm    Post subject: Reply with quote

The wiki page you pointed to uses Samba to provide a path to the printer. My /etc/samba/smb.conf file has ONLY the following related to printing, and as far as I know, this is totally unrelated to printer sharing between the Gentoo machines on my local network.

Code:
printing = cups
printcap name = cups
load printers = yes


I'll try to describe everything that I have, to enable printer sharing between Gentoo machines. All of this is done by cups, using configuration files in the /etc/cups directory.

My print server goes by the name "hypoid" It is running cups (of course), and is located at a fixed (local) IP of 192.168.0.1

Code:
# /etc/cups/cupsd.conf @ printer server
...
Listen 192.168.0.1:631
Listen /run/cups/cups.sock

# Show shared printers on the local network.
Browsing On
BrowseLocalProtocols All
...


There is quite a bit more in that configuration file, most of it being access policy.

Client (Gentoo) machines are also running cups. In addition to /etc/cups/cupsd.conf, they have an /etc/cups/client.conf file. This tells the remote/client machines where to print, and this happens without any browsing going on. The printer location is in effect hardcoded. Note that the server (hypoid) does not have an /etc/cups/client.conf file.

Code:
# /etc/cups/client.conf @ client machines
ServerName hypoid


Finally, a section of /etc/cups/cupsd.conf for the client/remote machines ...

Code:
# /etc/cups/cupsd.conf @ client/remote machine
...
Listen localhost:631
Listen /run/cups/cups.sock
 
# Show shared printers on the local network.
Browsing On
BrowseLocalProtocols All
...


Notice that the client machines' instances of cupsd are only listening locally, while the host/server machine (hypoid) is listening on a network address (192.168.0.1). The client machines look at their /etc/cups/client.conf files for the assignment of hypoid as the print server.

I think all of this connection is essentially hard-coded, there is no browsing involved. The local WIN machines are also hard-coded to a printer at hypoid (or 192.168.0.1, but the name "hypoid" does properly resolve to that IP address across this local network)

Edited to add comment "/etc/cups/cupsd.conf @ client/remote machine"
Back to top
View user's profile Send private message
russK
l33t
l33t


Joined: 27 Jun 2006
Posts: 665

PostPosted: Mon Oct 26, 2015 8:31 pm    Post subject: Reply with quote

charles17 wrote:
russK wrote:
Do you have zeroconf USE flag on both client and server?

Sorry for deviating from the topic. What exactly does the zeroconf do for printer detection?
For my wlan Brother printer, CUPS' printer detection works perfectly without zeroconf or dbus or the likes.


That's a great question, one that I don't know any detailed answer other than what I read about zeroconf / avahi on the wiki and other docs. I noticed that my 2 HP printers are detected by cups, but I honestly don't know if that is because I have zeroconf, or I have hplip installed and some combination of that and cups-filters finds them for me.

I also noticed the wiki page you pointed to for the networked Brother printer makes use of either an overlay or a foreign rpm for the Brother drivers and/or a cupswrapper, so perhaps that is helping with the detection.


Regards
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum