Printer Woes-HP LaserJet 1020

Hey all:

New to Opensuse, not to linux.

I’ve been banging my head for two days now trying to get my HP Laserjet 1020 to work. I’ve gotten the drivers working on the box itself (Opensuse 11.3 x64), but I couldn’t get it to print from my laptop (Ubuntu Lucid). Ideally, I’d like to end up with a functional printer which can be used either from the desktop machine (Opensuse) or from the laptop (Ubuntu) through NFS.

After so many attempts at fixing it, I’ve not made it such that I can’t print at all, from either system. I’m considering re-installing Opensuse (or just going back to Kubuntu, which recognizes the printer without a hitch). But before I do so, I figured I’d ask here.

Here are my issues, and attempts at solution:

  1. I tried adding the printer both through CUPS, through YAST and through hp-setup, using the hpijs driver. Each time the printer is recognized, but a test page won’t print.

  2. I tried building the foo2zjs driver, as outlined here: HowTo Install a HP LaserJet 1020 printer in Suse 10.x, 11.x It came up with dependency problems repeatedly on the last step (sudo make install-hotplug) . I gave up when it told me that it was conflicting with an installed package (system-config-printer-udev) which was not installed.

  3. Perhaps related problem: on the CUPS web interface, I get a “forbidden” message when I try to change the options on the CUPS server to allow remote access.

Note that:

a) I’ve already added myself to the lp group.

b) I changed the permissions (+rx) on the /dev/lp0 to allow myself access

c) I’m able to get to the CUPS page on the client machine, so the port 631 (I think) must be open. I say “I think,” because there’s no option to allow CUPS in YAST firewall settings, for some reason.

I’ve been following guides here and there, but I’m afraid that I’ve borked my cupsd.conf file through all the edits. Here it is:

#
# "$Id: cupsd.conf.in 8805 2009-08-31 16:34:06Z mike $"
#
# Sample configuration file for the CUPS scheduler.  See "man cupsd.conf" for a
# complete description of this file.
#
Listen *:631
Listen localhost:631


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

# Administrator user group...
SystemGroup sys root


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

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

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

# Restrict access to the server...
<Location />
Allow 127.0.0.1
Allow 192.168.1.101
Allow 192.168.1.102
Allow 192.168.1.2
Allow @LOCAL
Order allow,deny
Allow 127.0.0.2
</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 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 $".
#

# The policy below is added by openSUSE/Novell during build of our cups package.
# The policy 'allowallforanybody' is totally open and insecure and therefore
# it can only be used within an internal network where only trused users exist
# and where the cupsd is not accessible at all from any external host.
# Have in mind that any user who is allowed to do printer admin tasks
# can change the print queues as he likes (e.g. send copies of confidental
# print jobs from an internal network to any external destination).
# For documentation regarding 'Managing Operation Policies' see
# http://www.cups.org/documentation.php/doc-1.4/policies.html
<Policy allowallforanybody>
  <Limit All>
    Order deny,allow
    Allow from all
  </Limit>
</Policy>
# Explicitely set the CUPS 'default' policy to be used by default:
# DefaultPolicy default
DefaultPolicy allowallforanybody
# End of additions by openSUSE/Novell.

# 2010-09-12,19:41:16 modify_cupsd_conf Allow 127.0.0.1 192.168.1.*
# 2010-09-17,10:03:12 modify_cupsd_conf Listen localhost
# 2010-09-17,10:04:33 modify_cupsd_conf Allow 127.0.0.1 192.168.1.101 192.168.1.102 192.168.1.2 @LOCAL
# 2010-09-17,10:04:33 modify_cupsd_conf BrowseAddress none
# 2010-09-17,10:04:33 modify_cupsd_conf Listen all

It may help to know that dmesg spits out thirty instances of the following message:


[347043.957999] usb 1-4: usbfs: process 3926 (hp) did not claim interface 0 before use
[347043.958517] usb 1-4: usbfs: process 3927 (hp) did not claim interface 0 before use
[347043.958651] usb 1-4: usbfs: process 3928 (hp) did not claim interface 0 before use
[347043.958789] usb 1-4: usbfs: process 3929 (hp) did not claim interface 0 before use
etc . . .

Thanks in advance!

Maybe not a solution to your problem but I noticed two problems in your notes: Note b) shouldn’t permissions be +rwx so you can write to it? Note c) Add the port 631 to the firewall by Yast2 > Firewall > Allowed Services > Advanced Settings and enter 631 in TCP.

Tom

This may not be all that is wrong with your server config, but I note your cups server cupsd.conf seems to have a lot commented out. It should be listening on the LAN as well as localhost. For example, if its IP address is 192.168.1.2, then there should be an entry like

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

These references may help:

SDB:CUPS in a Nutshell - openSUSE

https://help.ubuntu.com/6.06/ubuntu/serverguide/C/cups.html

Thanks, both.

Tommy: I changed the permissions as you recommend. Still no luck.

P.S. I had my bittorrent settings (TCP: 6881, UDP: 4444) in that “Advanced” space on YAST Firewall settings. Can I include more than one port in that dialogue?

Deano: I re-placed my cupsd.conf with the saved version from before I began editing. Sadly, still I’m still unable to print!

  1. Upload the contents of cupsd.conf for the server again to Pastebin.com - #1 paste tool since 2002! (or similar). Then post link to it here.

  2. Both machines can see each other on the network right? (eg ping command, file shares etc). Can you verify the IP addresses of cups server? Does it use static IP address, or is it connected to router with dhcp server?

  3. If you want to exclude the firewall as being part of the problem, disable it on both machines temporarily while testing.

Swerdna’s excellent guide specifically explains how to share a LaserJet 1020 like you’re trying to do. Maybe it will shed some light on what you’re still missing…

@brommage:

I see in your first post that you couldn’t install the foo2zjs driver, you got an error message relating to the RPM udev-configure-printer. I fixed that now on that page.

And the hpijs-hplip driver that presumably you are now using should be fine in openSUSE 11.3.

Regardless of the driver, you should be able to share it using the IPP protocol. So let’s have a look at that cupsd.conf as suggested by deano_ferrari. And incidentally you should also be able to share it using the standard windows SMB protocol (AKA Samba) if you can’t get IPP working.

On 2010-09-17 17:06, brommage wrote:

> After so many attempts at fixing it, I’ve not made it such that I can’t
> print at all, from either system. I’m considering re-installing
> Opensuse (or just going back to Kubuntu, which recognizes the printer
> without a hitch). But before I do so, I figured I’d ask here.

There is a published procedure on how to completely uninstall cups, in order to reinstall it fresh
and try again. But I don’t have the link in this computer.

> c) I’m able to get to the CUPS page on the client machine, so the port
> 631 (I think) must be open. I say “I think,” because there’s no option
> to allow CUPS in YAST firewall settings, for some reason.

It has been intentionally removed from YaST. :frowning:


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” GM (Elessar))

I had the same problem - despite all attempts to print nothing worked including a host of various reinstallations.

But then I finally figured it out. I am using a WiFi network to get to the printer so these first may not apply if the printer is directly connected:

  • These need to be added to the firewall:
    the Printer’s IP address
    TCP Port 9100
    ICMP (both)
    PING
    DNS

  • And add your user to the lp group.

  • Test it with
    ping (fill in the IP address, e.g., 192.168.5.5)

  • Check HPLIP > Printer Control

This shows the status but the buttons are inoperative. If it shows the printer stopped and you cannot restart it then (and this was the real fix):

  • Open YaST > Hardware > Printer.

  • Edit the printer and ensure Enable Printing is checked in the line at the bottom of the window.

  • At present you have to do this each time you reboot!

Good luck! :slight_smile:

Andy
alavarre@gmail.com