# hplip and C4385 printer -- no PPD...yikes...

## papapenguin

so it seems that I have installed my HP Photosmart C4385 correctly...

...when I run hp-setup, it finds the printer, allows me to connect via wireless, says I'm connected, then after it's set up and I click next, it says no PPD file is found...

 *Quote:*   

> papapenguin ~ # hp-setup
> 
> HP Linux Imaging and Printing System (ver. 3.10.9)
> 
> Printer/Fax Setup Utility ver. 9.0
> ...

 

...so where would I find the correct PPD file?...

 *Quote:*   

> papapenguin ~ # hp-check -t
> 
> HP Linux Imaging and Printing System (ver. 3.10.9)
> 
> Dependency/Version Check Utility ver. 14.3
> ...

 

...I must be missing something simple...I hope...

----------

## papapenguin

ok, so I found that the latest hplip-3.11.1 does indeed have the correct ppd file...

I have downloaded the tar.gz file and just need to extract it to portage (creating an ebuild)...

...does this seem correct?

----------

## papapenguin

ok, so here's the latest...

I simply copied the newer ppd folder from hplip-3.11.1 folder to the /usr/share/ppd/HP folder...

then I selected the proper ppd file, and when all looked well...crash...

I received

 *Quote:*   

> error:  Printer queue setup failed.  Please add user to "lpadmin" group(s)

 

I then added myself to the lpadmin group, and ran hp-setup again, but got the same message...when I check to see if I'm actually part of the group:

 *Quote:*   

> papapenguin ~ # id donald
> 
> uid=1000(donald) gid=1000(donald) groups=1000(donald),6(disk),7(lp),10(wheel),18(audio),19(cdrom),80(cdrw),85(usb),100(users),250(portage),1001(messagebus),106(lpadmin),1004(haldaemon),1005(plugdev),1006(scanner)

 

I see that I am added to the group, but I keep getting the same error message...

----------

## Etal

Try bumping HPLIP version yourself, and see if it helps. Maybe the new ppd is incompatible with the old HPLIP.

```
# cd /usr/portage/net-print/hplip/

# cp hplip-3.10.9-r1.ebuild hplip-3.11.1.ebuild

# ebuild hplip-3.11.1.ebuild manifest

# emerge -avu hplip
```

Then, if it works, put the new ebuild into the local overlay so that it doesn't get lost after a sync.

----------

## papapenguin

...so close, thanks Etal...it seems that a patch failed...any other ideas?

 *Quote:*   

> >>> Unpacking source...
> 
> >>> Unpacking hplip-3.11.1.tar.gz to /var/tmp/portage/net-print/hplip-3.11.1/work
> 
> >>> Source unpacked in /var/tmp/portage/net-print/hplip-3.11.1/work
> ...

 

----------

## NeddySeagoon

papapenguin,

Read your new ebuild, in the section starting 

```
src_prepare() {
```

 there is a list of patches that are applied to hplip-3.10.9.

Its likely they are already in 3.11.1, so your new ebuild should not be trying to apply them again.

Comment out all the lines starting epatch in the src_prepare section of the ebuild.

It builds for me then.  I can't test as I don't have a printer that uses that driver.

Test it, then as Etal says, put your new ebuild in your own overlay, so emerge --sync does not wipe it out and emerge world -uDN downgrade it again.

----------

## papapenguin

thanks NeddySeagoon, makes sense, so I did comment out the epatch lines...

 *Quote:*   

> src_prepare() {
> 
> 	python_convert_shebangs -q -r 2 .
> 
> 	# Test for Gentoo bug #345725
> ...

 

...but dang, because of the changes I made (using nano), I get...

 *Quote:*   

> papapenguin ~ # emerge -avu hplip
> 
> These are the packages that would be merged, in order:
> 
> Calculating dependencies \ * Digest verification failed:
> ...

 

...I do feel like I'm getting closer, though, if I can resolve the matching filesizes...

----------

## aCOSwt

 *papapenguin wrote:*   

> ...I do feel like I'm getting closer, though, if I can resolve the matching filesizes...

 

Enter the following under console :

```
$ cd /usr/portage/net-print/hplip

$ ebuild hplip-3.11.1.ebuild manifest
```

And refire your emerge.

----------

## papapenguin

thanks aCOSwt, it did compile...

seems that I have some more problems with the build...

when I run hp-setup under root as the ebuild message suggests, I get a loop...that is after setting up wireless (step 4), connecting (step 5), and clicking finish...it bumps me back to the beginning (step 1), instead of asking me to select printer...

 *Quote:*   

> papapenguin ~ # hp-setup
> 
> HP Linux Imaging and Printing System (ver. 3.11.1)
> 
> Printer/Fax Setup Utility ver. 9.0
> ...

 

but running hp-setup under user gets me the same 'add user to lpadmin' error message...

 *Quote:*   

> donald@papapenguin ~ $ hp-setup
> 
> HP Linux Imaging and Printing System (ver. 3.11.1)
> 
> Printer/Fax Setup Utility ver. 9.0
> ...

 

again, I checked groups...

 *Quote:*   

> papapenguin ~ # id donald
> 
> uid=1000(donald) gid=1000(donald) groups=1000(donald),6(disk),7(lp),10(wheel),18(audio),19(cdrom),80(cdrw),85(usb),100(users),250(portage),1001(messagebus),106(lpadmin),1004(haldaemon),1005(plugdev),1006(scanner)
> 
> papapenguin ~ #

 

...and I'm there...still a mystery...

----------

## aCOSwt

Well, this being said... If you are still dealing with the absence of a PPD file,

What about emerging 3.10.9-r1 +static-ppds ?

That way, you should get the entire library available locally.

=> You can then configure manually under CUPS.

----------

## NeddySeagoon

papapenguin,

Its off topic but being in the disk group is a very bad idea.

Users in the disk group can do whatever they like to your filesystems as they have permission to use raw device access.

Thats a major security risk as such users can bypass all the file system permissions you have in place. 

Back to your topic

```
# Test for Gentoo bug #345725

#sed -i -e "s|/etc/udev/rules.d|/$(get_libdir)/udev/rules.d|" \

# $(find ./ -type f -exec grep -l '/etc/udev/rules.d' '{}' '+') \

# || die "sed udev rules" 
```

 may still be needed as this fixes a Gentoo bug.  The other patches fix bugs in hplip itself.

----------

## Etal

FYI, hplip was bumped today, with some patches, so you can try installing from the from the official ebuild ("emerge -av hplip::gentoo" would work in Portage 2.2, not sure about 2.1)

```
------- Comment #1 from billie gentoo org  2011-01-24 21:00 0000 -------

+*hplip-3.11.1 (24 Jan 2011)

+

+  24 Jan 2011; Daniel Pielmeier <...@gentoo.org> -hplip-3.9.12-r1.ebuild,

+  -hplip-3.10.6.ebuild, -hplip-3.10.9.ebuild, +hplip-3.11.1.ebuild,

+  +files/hplip-3.11.1-desktop.patch, +files/hplip-3.11.1-htmldir.patch,

+  +files/hplip-3.11.1-udev-attrs.patch:

+  Version bump. Fixes bug #352449. Thanks to Ben Sagal for reporting. Remove

+  potential vulnerable versions.

Bumped. Normally I do regular checks for updates. So I recommend you to wait at

least one week before filing a bump request, unless you have a working ebuild

with updated patches, etc :)

Please reopen if there are issues regarding the bump.
```

----------

## dE_logics

 *NeddySeagoon wrote:*   

> papapenguin,
> 
> Its off topic but being in the disk group is a very bad idea.
> 
> Users in the disk group can do whatever they like to your filesystems as they have permission to use raw device access.
> ...

 

Thanks for clarifying that ned.

OP - 

I think a few concepts are a bit messed up at your end.

If you're connecting to a printer via wireless (i.e over a network), the printer is providing a generic networking protocol to connect. You should not require hplip... all you need is CUPS and configure it to use the network printer.

----------

## papapenguin

hplip-3.11.1-r1 made it to portage, so I updated, but was still having the same 'lpadmin' problems...

...so I started over using the gentoo printing guide http://www.gentoo.org/doc/en/printing-howto.xml, which rebuilt cupsd and hplip...

ran hp-setup as root, and still got

 *Quote:*   

> papapenguin ~ # hp-setup
> 
> HP Linux Imaging and Printing System (ver. 3.11.1)
> 
> Printer/Fax Setup Utility ver. 9.0
> ...

 

but then

 *Quote:*   

> papapenguin ~ # /etc/init.d/cupsd restart
> 
>  * Caching service dependencies ...                                                                            [ ok ]
> 
>  * Starting cupsd ...

 

ran hp-setup again, selecting the wireless mode, and it failed...but when I then ran it selecting usb mode, it worked...

I then ran hp-setup as user, selecting wirelss mode, which failed...then usb mode, which also worked...

so...now the problem is only wireless, which gives me

 *Quote:*   

> donald@papapenguin ~ $ hp-setup
> 
> HP Linux Imaging and Printing System (ver. 3.11.1)
> 
> Printer/Fax Setup Utility ver. 9.0
> ...

 

I did type in the key, but for some reason it didn't work with the printer...

----------

## timhoppen

 *dE_logics wrote:*   

> 
> 
> OP - 
> 
> I think a few concepts are a bit messed up at your end.
> ...

 

Actually, with a lot of current wireless HP printers, hplip is required to get the printer to behave properly my C4780 is this way. Also, it allows for more convenient control and status messages just as if it were plugged in (plus the ability to scan and fax wirelessly on some models).

----------

## pinion

Any luck getting this working?  I am experiencing a similar problem with hplip since updating my system.  I have re-emerged hplip and cups, as well as upgraded both of them.

I am getting:

```
Backend returned status -11 (crashed)
```

in the cups/error_log

which results in:

```
Paused - "/usr/libexec/cups/backend/hp failed"
```

within the cups administration page.

I am able to sucessfully find and install the printer, just unable to print.

Everything emerges fine for me..

I am using the following use variables:

```
net-print/cups-1.4.6  USE="X acl dbus gnutls java jpeg kerberos pam perl png python samba ssl threads tiff usb -debug -ldap -php -slp -static-libs -xinetd" LINGUAS="-da -de -es -eu -fi -fr -id -it -ja -ko -nl -no -pl -pt -pt_BR -ru -sv -zh -zh_TW" 0 kB

net-print/hplip-3.11.1-r2  USE="X hpcups hpijs libnotify qt4 scanner snmp -doc -fax -kde -minimal -parport -policykit -static-ppds -udev-acl" 0 kB

```

----------

