Printer..... is not printing :P

I have hp-deskjet 5940. Configured fine. My system see my printer. Cups see it, hp-systray too.
But on hp-systray, Print Test Page do... nothing :p
Running hp-systray from terminal I get this:
Code:
error: Fax address book disabled - Python 2.3+ required.
lpr: Deskjet_5900: unknown printer
error: Print command failed with exit code 256!
What is wrong?
 
The error says that /etc/printcap doesn't have an entry for Deskjet_5900, so look there first. But also realize that there's the real lpr(1), and the CUPS lpr (probably in /usr/local/bin/lpr), and you have to run the CUPS one if you're, well, using CUPS.
 
My /etc/printcap
Code:
#	@(#)printcap	5.3 (Berkeley) 6/30/90
# $FreeBSD: src/etc/printcap,v 1.14.30.1.4.1 2010/06/14 02:09:06 kensmith Exp $

#
# This enables a simple local "raw" printer, hooked up to the first
# parallel port.  No kind of filtering is done, so everything you pass
# to the "lpr" command will be printed unmodified.
#
# Remember, for further print queues you're going to add, you have
# to choose different spool directories (the "sd" capability below),
# otherwise you will greatly confuse lpd.
#
# For some advanced printing, have a look at the "apsfilter" package.
# It plugs into the lpd system, allowing you to print a variety of
# different file types by converting everything to PostScript(tm)
# format.  For more information about apsfilter visit
#
#	     http://www.apsfilter.org/
#
# If you don't have a PostScript(tm) printer, don't panic, but do
# also install the latest "ghostscript" package for best printer support.
#
# Do also refer to the "printing" section of the handbook.
#
#	http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/printing.html
#
# A local copy can be found under
#
#	/usr/share/doc/handbook/handbook.{html,latin1}.
#
# Banner pages are now suppressed by default.  Remove the :sh: capability
# to turn them back on.
#
#lp|local line printer:\
#	:sh:\
#	:lp=/dev/lpt0:sd=/var/spool/output/lpd:lf=/var/log/lpd-errs:
#
# Sample remote printer.  The physical printer is on machine "lphost".
# You can perform any kind of local filtering directly.  If you need
# local filters (e.g. LF -> CR-LF conversion for HP printers), create
# a filter script that sends the proper escape sequence to the printer
# and then concatenates stdin to stdout.
#
#remote|sample remote printer:\
#	:sh:\
#	:rm=lphost:sd=/var/spool/output/lphost:lf=/var/log/lpd-errs:\
#	:if=/usr/local/libexec/if-script:
#
# Simple Russian printer with hardware CP866 character set, output filter
# used for KOI8-R -> CP866 conversion
#
#lp|Russian local line printer:\
#	:sh:of=/usr/libexec/lpr/ru/koi2alt:\
#	:lp=/dev/lpt0:sd=/var/spool/output/lpd:lf=/var/log/lpd-errs:
There is none entry about my printer.
Also I tried with cups to do printing test.
Well. Printer take the paper but is not eject it.
And I take this error on cups:
Code:
stopped 
"/usr/local/libexec/cups/filter/foomatic-rip-hplip failed"
Also I have problem because to cancel a job, I need a username and a password.
Here is all that we tried and didn't work. (Post 10 to 19)
PS: I have none idea about printers. This is my first printer in my life. I have never setup a printer even on Windows!
 
sk8harddiefast said:
And I take this error on cups:
Code:
stopped 
"/usr/local/libexec/cups/filter/foomatic-rip-hplip failed"

Have you tried editing the file /usr/local/etc/foomatic/filter.conf ?

There is a section in that file that requires you to uncomment the path for the foomatic CUPS filters. The section looks like this....

Code:
# Set the directories in which foomatic-rip should search for CUPS filters:
#cupsfilterpath: /usr/local/lib/cups/filter:/usr/local/lib/cups/filter:/usr/local/libexec/cups/filter:/opt/cups/filter:/usr/lib/cups/filter

By default that path in the filter config file is commented out. Uncomment it and then restart CUPS....

Code:
# Set the directories in which foomatic-rip should search for CUPS filters:
cupsfilterpath: /usr/local/lib/cups/filter:/usr/local/lib/cups/filter:/usr/local/libexec/cups/filter:/opt/cups/filter:/usr/lib/cups/filter

Code:
/usr/local/etc/rc.d/cupsd restart

See if that works for you.

Also, post a copy of your /usr/local/etc/cups/cupsd.conf file. You might need to make some very slight changes to get rid of some of the access and configuration problems you have been having with the CUPS setup.
 
I made all the above but still is not make printing test.
My cupsd.conf file
Code:
#
# "$Id: cupsd.conf.in 9310 2010-09-21 22:34:57Z mike $"
#
# Sample configuration file for the CUPS scheduler.  See "man cupsd.conf" for a
# complete description of this file.
#

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

# Administrator user group...
SystemGroup wheel


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

# Show shared printers on the local network.
Browsing On
BrowseOrder allow,deny
BrowseAllow all
BrowseLocalProtocols CUPS

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

# Restrict access to the server...
<Location />
  Order allow,deny
</Location>

# Restrict access to the admin pages...
<Location /admin>
  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 Create-Job Print-Job Print-URI Validate-Job>
    Order deny,allow
  </Limit>

  <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 CUPS-Get-Document>
    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 CUPS-Get-Devices>
    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>

# Set the authenticated printer/job policies...
<Policy authenticated>
  # Job-related operations must be done by the owner or an administrator...
  <Limit Create-Job Print-Job Print-URI Validate-Job>
    AuthType Default
    Order deny,allow
  </Limit>

  <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 CUPS-Get-Document>
    AuthType Default
    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>
    AuthType Default
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>

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

#
# End of "$Id: cupsd.conf.in 9310 2010-09-21 22:34:57Z mike $".
#
 
sk8harddiefast said:
I made all the above but still is not make printing test.

Print test in what?... CUPS?

I would suggest you try to get CUPS working first. I am unclear at this time exactly what you are trying to use to print and/or test print.

For now.... you need to edit your /usr/local/etc/cups/cupsd.conf file to make it easier for you to configure CUPS through the web interface and avoid some of the errors you have stated in some of your previous posts.

Make a backup copy of the current /usr/local/etc/cups/cupsd.conf file and change it to the following....

Code:
# Log general information in error_log - change "warn" to "debug"
# for troubleshooting...
LogLevel none

# Administrator user group...
SystemGroup wheel

Port 631
#Listen localhost:631
Listen /var/run/cups.sock

# Show shared printers on the local network.
Browsing On
BrowseOrder allow,deny
BrowseAllow all
BrowseRemoteProtocols CUPS
BrowseAddress @LOCAL
BrowseLocalProtocols CUPS
DefaultAuthType Basic
DefaultEncryption Never

# Restrict access to the server...
<Location />
  Order allow,deny
  Allow all
</Location>

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

# Restrict access to configuration files...
<Location /admin/conf>
  AuthType Default
  Require user @SYSTEM
  Order allow,deny
  Allow all
</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 CUPS-Get-Document>
    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 CUPS-Get-Devices>
    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>

# Set the authenticated printer/job policies...
<Policy authenticated>
  # Job-related operations must be done by the owner or an administrator...
  <Limit Create-Job Print-Job Print-URI>
    AuthType Default
    Order deny,allow
  </Limit>

  <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 CUPS-Get-Document>
    AuthType Default
    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>
    AuthType Default
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>

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

#
# End of "$Id: cupsd.conf.in 8805 2009-08-31 16:34:06Z mike $".

After you have done that.... restart CUPS...

Code:
/usr/local/etc/rc.d/cupsd restart

Then open up the CUPS web interface...

http://localhost:631

You should then be able to add and set up your printer. If it asks for a password, give it the root name and password.

See if that works.

Once you get CUPS working, you can then worry about security and hardening your CUPS configuration (cupsd.conf).
 
Ok. Let's forgot about hplip for now and focus on Cups. Cups just refusing to understand any password! Not user's, not root's!
 
sk8harddiefast said:
Cups just refusing to understand any password! Not user's, not root's!

Did you restart CUPS after editing the config file?

I'm at a bit of a loss as to why CUPS is giving you so many problems just allowing you to enter it's administrative mode. It's usually a very easy and straightforward thing. At most, a few edits to the config file as has been already discussed.

Are you doing this from the local machine that has the printer attached or another machine on the network? Is there a problem with your local hosts file? What browser are you using and have you tried using a different browser?
 
I tried with Opera 11 too. No. I am doing it from my local machine and my printer is attached on this machine via usb. I don't use printing via network.
My /etc/hosts
Code:
<<<<<<< current version
::1                     localhost localhost.bsdserver
127.0.0.1               localhost localhost.bsdserver
192.169.1.2             area51.bsdserver area51
192.169.1.2             area51.bsdserver.
=======
# $FreeBSD: src/etc/hosts,v 1.16.34.1.4.1 2010/06/14 02:09:06 kensmith Exp $
#
# Host Database
#
# This file should contain the addresses and aliases for local hosts that
# share this file.  Replace 'my.domain' below with the domainname of your
# machine.
#
# In the presence of the domain name service or NIS, this file may
# not be consulted at all; see /etc/nsswitch.conf for the resolution order.
#
#
::1                     localhost localhost.my.domain
127.0.0.1               localhost localhost.my.domain
#
# Imaginary network.
#10.0.0.2               myname.my.domain myname
#10.0.0.3               myfriend.my.domain myfriend
#
# According to RFC 1918, you can use the following IP networks for
# private nets which will never be connected to the Internet:
#
#       10.0.0.0        -   10.255.255.255
#       172.16.0.0      -   172.31.255.255
#       192.168.0.0     -   192.168.255.255
#
# In case you want to be able to connect to the Internet, you need
# real official assigned numbers.  Do not try to invent your own network
# numbers but instead get one from your network provider (if any) or
# from your regional registry (ARIN, APNIC, LACNIC, RIPE NCC, or AfriNIC.)
#
>>>>>>> 8.1-RC2

Also I comment:
Code:
::1                     localhost localhost.my.domain
127.0.0.1               localhost localhost.my.domain
Restart cups and Insist! What the .... (I will not say the word :p)
 
sk8harddiefast said:
Restart cups and Insist! What the .... (I will not say the word :p)

It looks like you need to fix your hosts file (multiple and different statements for the localhost).... restart CUPS again.... then from the browser address bar, try the IP address of your machine when bringing up CUPS. E.g...

Code:
http://XXX.XXX.XXX.XXX:631

Replace the X's with your local IP address. Give that a try.
 
sk8harddiefast said:
Here I cannot understand how to do it


For now.... comment out this line....then restart CUPS and follow the other instructions...

Code:
127.0.0.1               localhost localhost.bsdserver

change to...


Code:
#127.0.0.1               localhost localhost.bsdserver
 
I commented them. I ever reboot my system. I tried with: 192.168.1.2:631. I pray to God! But Cups have his own opinion about authorization!
Conclusion: To setup a printer you must be a hacker!!! :p
 
sk8harddiefast said:
I commented them. I ever reboot my system. I tried with: 192.168.1.2:631. I pray to God! But Cups have his own opinion about authorization!
Conclusion: To setup a printer you must be a hacker!!! :p

Or just use lpd(8).
 
The local IP address of your machine is 192.169.1.2? Then why do you have the following entries also in your hosts file?....

Code:
192.169.1.2             area51.bsdserver area51
192.169.1.2             area51.bsdserver.

Comment them out... reboot and start the CUPS configuration all over again. Try a different browser if you have one.
 
Comment them out... reboot and start the CUPS configuration all over again. Try a different browser if you have one.
I tried them all! Still don't give me access!
Ok. Let's take it from another side.
What are all the possible config files that could cause this problem! From Cups, hosts, hplip etc. I will post them all! I have none other idea!
I give:
Username: root
Password: mypassword
or
Username: emberdaemon
Password: mypassword
Is not letting me on chrome even on Opera!

Now I saw it. On hosts file is 192.169.1.2.
But:
Code:
re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=389b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_UCAST,WOL_MCAST,WOL_MAGIC>
	ether 00:1b:fc:9e:fb:ea
	inet [B]192.168.1.2 [/B]netmask 0xffffff00 broadcast 192.168.1.255
	media: Ethernet autoselect (100baseTX <full-duplex>)
	status: active

PS: Even this didn't work :(
 
sk8harddiefast said:
I tried them all! Still don't give me access!
Ok. Let's take it from another side.
What are all the possible config files that could cause this problem!

We've already covered the most obvious things.

In the other thread you opened on this problem, you closed it as being solved. What changed, or what was changed between that point in time and when you created this thread?
 
Because the first thread in fact was about to see my printer. Hplip saw it. Cups too. My system recognize it.
Here is the thread.... Troubleshooting with Cups :p Here is not my printer the problem. Is cups that they don't give me access! If cups not recognize me, printer will never work right! Even with hplip because depends on Cups. So I supposed that should be a separate thread and the other was solved. If I am wrong, please Moderators merge this 2 threads and I will change the statement from Solved to Open.
I found this: http://webcache.googleusercontent.c...+adduser+shadow+cups&cd=2&hl=el&ct=clnk&gl=gr
Could be this the solution?
 
sk8harddiefast said:

That article is for setting up CUPS on an Ubuntu box.

You shouldn't need to be adding such a user on FreeBSD just to get CUPS going. I just set up a CUPS server last week on a FreeBSD box with an attached HP inkjet printer to be a server for Ubuntu and Windows workstations. I didn't have to do any of that stuff. I configured the FBSD box and a few config files for CUPS printing and then did the CUPS web administration from a browser on an Ubuntu workstation.

CUPS is normally a very easy and straightforward operation. It shouldn't be complicated at all. Your only real problem should be a driver or lack of a PPD file for some printers (your printer is supported I believe). But... you haven't even gotten that far yet which shouldn't happen at all on a properly working box.

You most likely have other problems with your system. Is your group file corrupted? Is there permissioning problems with some of your system directories? It could be any number of things. Has there been any entries in /var/log/messages relating to any of this trying to get your printer setup?

Who owns the directory /usr/local/etc/cups on your box? It should be root/cups and set to 755.

You may need to check a lot of simple things like that.

It might help to also turn the logging level to debug2 in your cupsd.conf file. That will give you a lot of output in the error log the next time CUPS is restarted, but will also maybe help you narrow down your problem a little more.

Normally CUPS should be working fine and allow you to enter the admin setup. The cupsd.conf I gave you has it wide open.

I'm out of ideas at the moment. I'll have to purchase some more bourbon to make my thinking a bit clearer. :)
 
That article is for setting up CUPS on an Ubuntu box.
Ubuntu sucks but is still a Linux. BSD is not Linux but have some things same.
I found an error_log file on /var/log/cups: http://pastie.org/1397699
Probably the file have and things that I tried and return them back because didn't work.
Is your group file corrupted?
I guess not but how to confirm that?
I have none error with permissions. My box work fine almost on everything.
Who owns the directory /usr/local/etc/cups on your box?
I guess on root. Without sudo I cannot write on files.
It might help to also turn the logging level to debug2 in your cupsd.conf file. That will give you a lot of output in the error log the next time CUPS is restarted
I change this line: LogLevel None to LogLevel debug2
I restarted cups but he didn't return me any error. I checked /var/log too. pff :(

PS: Sorry for all this :(
 
sk8harddiefast said:
I read the link but still I cannot understand what exactly does lpd. It's a daemon and I can load it on boot. Lpd is part on Cups? What is his job exactly?

In the beginning, there was lpd(8). Not a lot of features, mainly concerned with getting files to the printer.

Later on, CUPS was created as an alternate printing system. It offers lots of features.

In theory, CUPS should be easier to set up and use. In practice, sometimes it is. But there is a lot of hidden complexity in trying to make things easy, and it can be difficult to diagnose.

Since your printer supports ASCII text and PCL, I'd use lpd(8): lpd Printing With FreeBSD.
 
Yes but lpd have no gui. Right? And how I will print a page of a site that I open on my browser for example? It should be harder. Well lpd sound a good solution. Just I never used a printer in my life. I have completely none idea. I guess a Gui could help me understand how thinks work. But if cups don't recognize me, then I want to try lpd too. Maybe will be harder to understand how works but's ok :)
 
sk8harddiefast said:
Yes but lpd have no gui. Right?

Mostly it's just editing /etc/printcap.

And how I will print a page of a site that I open on my browser for example? It should be harder.

In Firefox, I just select File/Print. It brings up a window that lets me choose "Print to LPR". This may have to be set up in your desktop environment. In xfce4, I just have Settings/Printing System Selection set to BSD-LPR.
 
Back
Top