WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Cups Help  (Read 17719 times)

Offline Madcamper

  • Newbie
  • *
  • Posts: 33
Cups Help
« on: October 27, 2009, 10:46:03 PM »
Hello,
I have installed the cups.tczl, i start the daemon, but when i goto http://localhost:631 it doesnt work.
If someone could get back to me on a solution or something that'd be great!
Thanks

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: Cups Help
« Reply #1 on: October 27, 2009, 11:13:36 PM »
What doesn't work?

Have you created a root password for starters?  That is of course necessary to do any admin with cups.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14819
Re: Cups Help
« Reply #2 on: October 27, 2009, 11:25:45 PM »
I have installed the cups.tczl, i start the daemon

Which cups extension are you using? With cups, the daemon should start when you load the extension, with cups1311 you need to start it manually.

Offline Madcamper

  • Newbie
  • *
  • Posts: 33
Re: Cups Help
« Reply #3 on: October 27, 2009, 11:31:46 PM »
What doesn't work?

Have you created a root password for starters?  That is of course necessary to do any admin with cups.
As in root password you mean root password for the system? or a seperate root password for cups? if for cups then no. I had installed cups1311.tczl before cups.tczl
http://distro.ibiblio.org/pub/linux/distributions/tinycorelinux/2.x/tcz/cups.tczl
That is the cups I have installed.
And when i goto http://localhost:631 it doesnt bring up any administrator page of adding printers or anything.
I have attached a Espon nx100 printer through USB to the server.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14819
Re: Cups Help
« Reply #4 on: October 27, 2009, 11:41:46 PM »
Due to a bug when using usb printers with the usb backend, the "cups" extension might not work.

It would probably be better to use the "cups1311" extension with usb printers - this version of the extension does not need the root password to be set..

Offline Madcamper

  • Newbie
  • *
  • Posts: 33
Re: Cups Help
« Reply #5 on: October 27, 2009, 11:46:08 PM »
ok, but even when i had cups1311 installed, when i went to http://localhost:631 it didnt load anything except page can not be displayed.
I even opend the 631 port on my router just to see if it made a difference

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14819
Re: Cups Help
« Reply #6 on: October 28, 2009, 12:02:28 AM »
The browser interface is not required to add a printer, you can use an obscure command like:
Code: [Select]
$ sudo lpadmin -p OfficeJetG85 -E -v ipp://192.168.1.100/printers/OfficeJetG85..which adds a network shared printer

..but of course it's much better when the browser interface works.

It sounds like there's a problem with the first few lines of cupsd.conf - could you paste the first few lines to have a look at? What browser are you using?

Offline Madcamper

  • Newbie
  • *
  • Posts: 33
Re: Cups Help
« Reply #7 on: October 28, 2009, 12:32:35 AM »
ya the Cups file looks like:
#Log General information in error_log - change "warn" to "debug"
#for troubleshooting...
LogLevel warn

#Administrator user group...
SystemGroup root

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

along with some other stuff about browsing and restrict access to the server, admin pages

Also this printer is connected to the server itself, so doing the lpadmin command, will it do any good in setting up that printer that is directly connected? or is it just for adding another network printer to the TC system?
« Last Edit: October 28, 2009, 12:35:57 AM by Madcamper »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14819
Re: Cups Help
« Reply #8 on: October 28, 2009, 12:58:43 AM »
# Only listen for connections from the local machine.
Listen localhost:631
Listen /var/run/cups/cups.sock
looks correct - I would expect the browser interface to work with this...
You could try setting the log level to "debug", restarting cups and checking /var/log/cups/error_log for clues.

Quote
Also this printer is connected to the server itself, so doing the lpadmin command, will it do any good in setting up that printer that is directly connected? or is it just for adding another network printer to the TC system?

I just gave an example I had handy - the lpadmin command can also be used to add a local printer. In place of "ipp://192.168.1.100/printers/OfficeJetG85", you would have something starting with "usb://...", the following might give a clue as to what exactly:
Code: [Select]
$ sudo /usr/local/lib/cups/backend/usb
..and the man page for lpadmin could also help

Offline Madcamper

  • Newbie
  • *
  • Posts: 33
Re: Cups Help
« Reply #9 on: October 28, 2009, 01:10:02 AM »
ok i just looked up some help online as well.
i made a cupsd1.conf and specified cups to load with that config file, and in the contained file I put.
# Default authentication type, when authentication is required…
DefaultAuthType Basic
DefaultEncryption IfRequested

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

# Show shared printers on the local network.
Browsing On
BrowseOrder allow,deny
BrowseAllow @LOCAL

# Restrict access to the server…
<Location/>
Order allow,deny
Allow localhost
Allow 192.168.1.100
</Location>

# Restrict access to configuration files…
<Location /admin/conf>
AuthType Basic
Require user @SYSTEM
Order allow,deny
Allow localhost
Allow 192.168.1.100
</Location>

This time when i goto http://192.168.1.101:631
it recognizes theres a page there or something, but it says 403 Forbidden

also with teh /usr/local/lib/cups/backend/usb command, i get the output of
DEBUG: list_devices
DEBUG: usb_find_busses=5
DEBUG: usb_find_devices=6

but not sure exactly where to go from there
« Last Edit: October 28, 2009, 01:12:57 AM by Madcamper »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14819
Re: Cups Help
« Reply #10 on: October 28, 2009, 01:15:32 AM »
This should allow to connect both a local printer and to a printer shared by a remote server.

Code: [Select]
LogLevel info
Port 631
Listen localhost:631
Listen /var/run/cups/cups.sock
  
   ### Which print servers to use
   BrowseAddress @LOCAL
   BrowseOrder deny,allow
   BrowseDeny from All
   BrowseAllow from @LOCAL
   BrowseAllow from 192.168.1.*
  
   <Location />
   AuthType None
   Order Deny,Allow
   Deny From All
   Allow From @LOCAL
   </Location>
  
   <Location /jobs>
   AuthType None
   Order Deny,Allow
   Deny From All
   Allow From @LOCAL
   </Location>
  
   <Location /printers>
   AuthType None
   Order Deny,Allow
   Deny From All
   Allow From @LOCAL
   </Location>
  
   <Location /admin>
   AuthType None
   Order Deny,Allow
   Deny From All
   Allow From @LOCAL
   </Location>

Offline Madcamper

  • Newbie
  • *
  • Posts: 33
Re: Cups Help
« Reply #11 on: October 28, 2009, 01:22:30 AM »
Awesome, that allowed me to get into the page. I'll let you know how the setup goes!
Thanks!

Am having trouble, when I go to add the printer, i think it finds it but when it comes to enter the description of the printer, and name, and clicking the Share Network Printer checkbox. It keeps me on an infinite loop after clicking the add printer button. It keeps asking me to enter the printer description
« Last Edit: October 28, 2009, 01:34:00 AM by Madcamper »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14819
Re: Cups Help
« Reply #12 on: October 28, 2009, 01:37:08 AM »
Did you set and use the root password (sudo passwd)?

Offline Madcamper

  • Newbie
  • *
  • Posts: 33
Re: Cups Help
« Reply #13 on: October 28, 2009, 01:39:36 AM »
ya, it asked for username and password at one point, so i entered "root" for username and the password was the root password

Offline Madcamper

  • Newbie
  • *
  • Posts: 33
Re: Cups Help
« Reply #14 on: October 28, 2009, 01:43:10 AM »
I [28/Oct/2009:01:41:56 +0000] Started "/usr/local/lib/cups/cgi-bin/admin.cgi" (pid=7711)
I [28/Oct/2009:01:41:56 +0000] Started "/usr/local/lib/cups/daemon/cups-deviced" (pid=7712)
I [28/Oct/2009:01:41:59 +0000] Started "/usr/local/lib/cups/cgi-bin/admin.cgi" (pid=7722)
I [28/Oct/2009:01:42:03 +0000] Started "/usr/local/lib/cups/cgi-bin/admin.cgi" (pid=7723)
I [28/Oct/2009:01:42:10 +0000] Started "/usr/local/lib/cups/cgi-bin/admin.cgi" (pid=7724)
I [28/Oct/2009:01:42:11 +0000] Started "/usr/local/lib/cups/cgi-bin/printers.cgi" (pid=7725)
I [28/Oct/2009:01:42:13 +0000] Started "/usr/local/lib/cups/cgi-bin/help.cgi" (pid=7726)
I [28/Oct/2009:01:42:17 +0000] Started "/usr/local/lib/cups/cgi-bin/admin.cgi" (pid=7727)
E [28/Oct/2009:01:42:17 +0000] [CGI] smbclient not found!
E [28/Oct/2009:01:42:17 +0000] [CGI] rpcclient not found!

after trying to add printer, this is what the error log says from http://192.168.1.101:631/admin/log/error_log

I also did a lsusb
and it listed the devices and the epson is listed as:
Bus 003 Device 002: ID 04b8 Seiko Epson Corp.

I'm sure it's of some help to know that, but dont know how to implement if need be.
« Last Edit: October 28, 2009, 02:01:17 AM by Madcamper »