# Cups remote printer access

## h2sammo

I have an 

```
Bus 001 Device 004: ID 04b8:0803 Seiko Epson Corp. Printer (Composite Device)
```

 working fine with gutenberg on my gentoo box at home.

```

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?

```
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
```

----------

## chithanh

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.

----------

## h2sammo

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.

----------

## Spidey

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?

----------

## h2sammo

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/

----------

## chithanh

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.

----------

## albright

a very basic question: port 631 is open on your local

network?

----------

## h2sammo

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.

----------

## alienjon

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.

----------

## cwr

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:

```

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

```

# 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>

```

----------

## alienjon

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.

----------

