Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Cups remote printer access
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
h2sammo
Veteran
Veteran


Joined: 11 Mar 2009
Posts: 1019
Location: Davie, FL

PostPosted: Sat May 01, 2010 10:31 pm    Post subject: Cups remote printer access Reply with quote

I have an
Code:
Bus 001 Device 004: ID 04b8:0803 Seiko Epson Corp. Printer (Composite Device)
working fine with gutenberg on my gentoo box at home.
Code:

main bobby # cat /etc/cups/cupsd.conf                                       
#                                                                           
# "$Id: cupsd.conf.in 7199 2008-01-08 00:16:30Z mike $"                     
#                                                                           
#   Sample configuration file for the Common UNIX Printing System (CUPS)   
#   scheduler.  See "man cupsd.conf" for a complete description of this     
#   file.                                                                   
#                                                                           

# Log general information in error_log - change "info" to "debug" for
# troubleshooting...                                                 
LogLevel info                                                       

# Administrator user group...
SystemGroup lpadmin         


# Only listen for connections from the local machine.
Listen localhost:631                                 
Listen /var/run/cups/cups.sock                       

# Show shared printers on the local network.
Browsing On                                 
BrowseOrder allow,deny                     
BrowseAllow all                             
BrowseAddress 192.168.0.*:631               
Listen *:631                               
#Listen localhost:631                       

# Default authentication type, when authentication is required...
DefaultAuthType Basic                                           

# Restrict access to the server...
<Location />                     
  Order allow,deny               
  Allow localhost                 
  Allow from 192.168.0.*         
</Location>                       

# Restrict access to the admin pages...
<Location /admin>                     
  Encryption Required                 
  Order allow,deny                     
</Location>

# Restrict access to configuration files...
<Location /admin/conf>
  AuthType Default
  Require user @SYSTEM
  Order allow,deny
</Location>

# Set the default printer/job policies...
<Policy default>
  # Job-related operations must be done by the owner or an administrator...
  <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job CUPS-Move-Job>
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>

  # All administration operations require an administrator to authenticate...
  <Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>

  # All printer operations require a printer operator to authenticate...
  <Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After CUPS-Accept-Jobs CUPS-Reject-Jobs>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>

  # Only the owner or an administrator can cancel or authenticate a job...
  <Limit Cancel-Job CUPS-Authenticate-Job>
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>

  <Limit All>
    Order deny,allow
  </Limit>
</Policy>

#
# End of "$Id: cupsd.conf.in 7199 2008-01-08 00:16:30Z mike $".
#



i am trying to print on my homenetwork from my wife's macbook air. i added the printer there with the 192.168.0.11 IP address and with gutenberg driver from a drop down menu for my exact printer model available on network. everytime i try to print something the message on the macbook is "trying to access 192.168.0.11 port 631...retry in 10 seconds" or similar.

how can i troubleshoot this?
Code:
main bobby # emerge -pv cups

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] net-print/cups-1.3.11-r1  USE="X acl dbus java jpeg ldap pam perl png ppds python slp ssl tiff -avahi -gnutls -kerberos -php -samba -static -xinetd -zeroconf" LINGUAS="en -de -es -et -fr -he -id -it -ja -pl -sv -zh_TW" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB

_________________
www.claudiubucur.com
Back to top
View user's profile Send private message
chithanh
Developer
Developer


Joined: 05 Aug 2006
Posts: 1668
Location: Berlin, Germany

PostPosted: Sun May 02, 2010 9:09 am    Post subject: Reply with quote

To print to a remote cups server, you have two options:

  • in the cups web interface, create printer as ipp, selecting "raw queue" as the driver.
  • edit /etc/cups/client.conf and set ServerName to the remote cups server.


EDIT: ah I forgot, you also need to make cups listen on more than the loopback interface in its configuration file.
Back to top
View user's profile Send private message
h2sammo
Veteran
Veteran


Joined: 11 Mar 2009
Posts: 1019
Location: Davie, FL

PostPosted: Sun May 02, 2010 1:24 pm    Post subject: Reply with quote

just to clarify.

gentoo machine with cups on it has printer attached locally by usb. i want to share that printer over my local network to my wife's macbook air.

do i still do the ipp thing?
this printer is NOT remotely attached to my gentoo box.
_________________
www.claudiubucur.com
Back to top
View user's profile Send private message
Spidey
Apprentice
Apprentice


Joined: 07 Sep 2006
Posts: 264

PostPosted: Sun May 02, 2010 1:28 pm    Post subject: Reply with quote

I guess chithanh considered you'd have cups at Mac OS X. Maybe you should share the remote printer, in your Gentoo box, as a windows printer?
Back to top
View user's profile Send private message
h2sammo
Veteran
Veteran


Joined: 11 Mar 2009
Posts: 1019
Location: Davie, FL

PostPosted: Sun May 02, 2010 2:27 pm    Post subject: Reply with quote

oh... CUPS is apple trademark. i have cups on my mac as well.
i added the printer as ipp - raw i cant print tst page from it.
how do i troubleshoot?

EDIT

to be more specific: this is the problem:
Quote:
Printer State: stopped, accepting jobs, not published.

and
Quote:
Destination printer does not exist!


as soon as i print a test page from cups interface printer stops

i made sure host printer is listening to
Quote:
Listen *:631


my cupsd.conf

http://dpaste.com/190069/
_________________
www.claudiubucur.com
Back to top
View user's profile Send private message
chithanh
Developer
Developer


Joined: 05 Aug 2006
Posts: 1668
Location: Berlin, Germany

PostPosted: Sun May 02, 2010 10:13 pm    Post subject: Reply with quote

Server-side you have to allow remote access to your cups printer. Verify that it works by visiting http://cupsservername:631/printers/yourprintername from any other host on the network.

Client-side you have to do one of the two steps I outlined above.
Back to top
View user's profile Send private message
albright
Advocate
Advocate


Joined: 16 Nov 2003
Posts: 2094
Location: Near Toronto

PostPosted: Sun May 02, 2010 11:19 pm    Post subject: Reply with quote

a very basic question: port 631 is open on your local
network?
_________________
.... there is nothing - absolutely nothing - half so much worth
doing as simply messing about with Linux ...
(apologies to Kenneth Graeme)
Back to top
View user's profile Send private message
h2sammo
Veteran
Veteran


Joined: 11 Mar 2009
Posts: 1019
Location: Davie, FL

PostPosted: Mon May 03, 2010 2:27 am    Post subject: Reply with quote

i did not have a port forward set for port 631 but i have done it now.
i can access the server side with http://clientIP:631 from the client side. the client side is enabled as ipp://clientIP with raw driver
every time i try a test page from client side printer shows as "Disabled" on cups interface on client side.
i can print fine from server-side computer but not from client side. error message complains about printer not found.
_________________
www.claudiubucur.com
Back to top
View user's profile Send private message
alienjon
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1533

PostPosted: Sun Feb 10, 2013 8:06 am    Post subject: Reply with quote

Was a solution ever found to this? I've recently tried networking an HP 1200 Laserjet attached to my desktop (dual boots VIsta and Gentoo) with other computer's in the house, including my wife's Macbook Pro w/ Snow Leopard. I can get the Mac to print from Vista by setting the URL (on the Macbook) to smb://{local address}/{printer name}. I did find a way to get the Mac to talk with Gentoo, but I basically have to statically set the Mac to print to Linux (at that point I can't print to Vista or with any other printers). I was having the device not found error, but after tweaking the URL I'm now getting the connection timeouts (ie: wait 30 seconds to retry). I think the problem is that I'm not sure what the actual URL for the printer is. In CUPS it mentions the Connection to be: hp:/usb/HP_LaserJet_1200?serial=00CNCQ441104 (this is what is set when I use the default settings - the ones for CUPS automatically reading what's plugged into the computer. I have NO idea what he 'hp' protocol is, other than it likely refers to the HP brand.
_________________
He who laughs last, laughs hardest
He who laughs hardest has milk come out of his nose
He who has milk come out of his nose gets laughed at
Can you see the catch 22 here?
Back to top
View user's profile Send private message
cwr
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1686

PostPosted: Sun Feb 10, 2013 9:37 am    Post subject: Reply with quote

This is the printers.conf I use for a couple of printers; a locally-attatched
DeskJet and a network-attatched Samsung. (Both of them need the
appropriate PPDs, of course.)

Both printers are available across the network, with Cups running on
the machine hosting the DeskJet. You may need to update to:
Code:

Browsing On
BrowseOrder  allow, deny
BrowseAllow all

in cupsd.conf, and restart cups. The permissions are excessively
generous - when stuff is working, tighten them.

Will
Code:

# Printer configuration file for CUPS v1.3.10
# Written by cupsd on 2009-05-11 19:41
<Printer Deskjet310>
Info HP Deskjet 310 on parallel port
Location Local printer
DeviceURI parallel:/dev/lp0
State Idle
StateTime 1219914194
Accepting Yes
Shared Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy stop-printer
</Printer>
<DefaultPrinter Samsung2251N>
Info Samsung ML-2251N mono laser
Location Network printer
DeviceURI socket://ML-2251N
State Idle
StateTime 1219911753
Accepting Yes
Shared No
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy stop-printer
</Printer>
Back to top
View user's profile Send private message
alienjon
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1533

PostPosted: Tue Feb 12, 2013 1:56 am    Post subject: Reply with quote

cwr: Thanks for the reply. Seems that the install was lacking some USE flags. Adding 'avahi' and following the wiki page seems to have resolved the problem.
_________________
He who laughs last, laughs hardest
He who laughs hardest has milk come out of his nose
He who has milk come out of his nose gets laughed at
Can you see the catch 22 here?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security 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