cups1.4b2-i486 pet (2.46MB) reworked for lpt & usb printers

Stuff that has yet to be sorted into a category.
Message
Author
User avatar
ttuuxxx
Posts: 11171
Joined: Sat 05 May 2007, 10:00
Location: Ontario Canada,Sydney Australia
Contact:

#16 Post by ttuuxxx »

Patriot wrote:Sure ttuuxxx, I'll quietly see how's the progress over there on the 4.2alpha and see what I can do ...

:)

I've also tested your cups1.4b2 pet ... It exhibits the same problem for lpt printing ... It'll work just fine and dandy on first boot LiveCD/frugal/full ... After a saved session, it'll also work on first lpt print or first lpt printer access ... Try adding it again ... the lpt port now no longer appears ... try print again and we'll get a /dev/lp0 permission denied ... A reboot will give lpt access also for the first time ... then it repeats again ...

(I do not have usb printer to test ... so usb printer tests will have to wait until sometime next week ...)

So, it is not a cups issue now, it's puppy's issue ... It's in 4.1.x & 4.2alpha ... They all have the same backbone structure, so I'll have to see what else need's changing ... All these pesky little things can annoy users and users don't like to be annoyed by stuffs that just works everywhere else ...

Rgds
Patriot ok then I have no way of testing cups because the only printer I have is on my wifes pc, my other 2 pc's don't have a printer, So I'll leave it in your hands, when you figure out the Permissions problem could you please post it in the 4.2 alpha2 section so we could add it to the next release, most of the time we split certain packages into 2 sections, The main release and Devx.sfs release I'm not sure if cups dev files get placed in the DevX of does it just get tossed aside. Dev files increase packages by a large amount sometimes and most of the time they aren't needed. Unless they are needed for other compiling needs, thats why I was wondering about cups dev files, Are they needed to compile gutenprint? We'll need probably the latest GutenPrint also to match up, This is where it gets tricky you have to enable a few options like the /usr/ as default directory and enable ppd, but it it creates locales, those should be made into another package, to keep the main release down in size.
Hope that helps :)
If its too much to ask just say so and I'll continue on with it, Just that I have so much already in the works, It makes it hard to focus on one task that I can't even fully test,lol
ttuuxxx

don't worry about gutenprint I already made it up, I'm not sure how Barry made his previous version work, they didn't have the ppd files included. so it was less than 2MB my version has 1429 ppd files and makes the package 13MB ouch!!
ttuuxxx
http://www.puppylinux.asia/tpp/ttuuxxx/ ... 3-i386.pet
http://www.puppylinux.asia/tpp/ttuuxxx/ ... le-Doc.pet
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#17 Post by BarryK »

ttuuxx,
the ppd files are all stored in a compressed format inside the executable 'cups-genppd.5.0'.
(that file may be named differently in later versions of CUPS)

See my script /usr/sbin/cups_shell that generates the ppd files.

cups_shell is in the rootfs-skeleton in Unleashed and has a menu entry.
[url]https://bkhome.org/news/[/url]

User avatar
ttuuxxx
Posts: 11171
Joined: Sat 05 May 2007, 10:00
Location: Ontario Canada,Sydney Australia
Contact:

#18 Post by ttuuxxx »

BarryK wrote:ttuuxx,
the ppd files are all stored in a compressed format inside the executable 'cups-genppd.5.0'.
(that file may be named differently in later versions of CUPS)

See my script /usr/sbin/cups_shell that generates the ppd files.

cups_shell is in the rootfs-skeleton in Unleashed and has a menu entry.
Thanks Barry, I deleted the ppd's and found that file in gutenprint now its 2.8MB pet big drop in size :)
ttuuxxx
http://www.puppylinux.asia/tpp/ttuuxxx/ ... no-ppd.pet
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)

User avatar
WhoDo
Posts: 4428
Joined: Wed 12 Jul 2006, 01:58
Location: Lake Macquarie NSW Australia

#19 Post by WhoDo »

BarryK wrote:See my script /usr/sbin/cups_shell that generates the ppd files.

cups_shell is in the rootfs-skeleton in Unleashed and has a menu entry.
Aha! I sense the potential solution to a problem for 4.1.2 and 4.2 ... cups_shell is NOT in the 0rootfs-skeleton of 4.1.2 anywhere that I can find but especially not /usr/sbin. Maybe that's why we've been having so much trouble getting CUPS to print?

While I'm on the subject, I get a couple of weird entries in my 4.2 build for Gtkprint manager and Gtkprint configuration? Neither of them works because they say no printer is attached when physically there is a printer attached. Is there any connection there?
[i]Actions speak louder than words ... and they usually work when words don't![/i]
SIP:whodo@proxy01.sipphone.com; whodo@realsip.com

User avatar
edoc
Posts: 4729
Joined: Sun 07 Aug 2005, 20:16
Location: Southeast Georgia, USA
Contact:

#20 Post by edoc »

GOOD NEWS: The updated CUPS, following the step-by-step, worked to solve the problem with my Samsung ML-2251NP laser printer on the desktop - now working correctly again, including PDF.

ODDITY NOTE: It has the printer labeled as PARALLEL:/dev/lp0 even though it is a USB connection.

BAD NEWS: It will not recognize the second USB printer, a HP OfficeJet 4215, at all. I tried a couple of different USB ports and nada. Tried a reboot ... just in case ... no joy.

Suggestions, please?
[b]Thanks! David[/b]
[i]Home page: [/i][url]http://nevils-station.com[/url]
[i]Don't google[/i] [b]Search![/b] [url]http://duckduckgo.com[/url]
TahrPup64 & Lighthouse64-b602 & JL64-603

User avatar
edoc
Posts: 4729
Joined: Sun 07 Aug 2005, 20:16
Location: Southeast Georgia, USA
Contact:

#21 Post by edoc »

Moved over to my laptop, connected to the same Linksys router as the desktop just described, and loaded the new CUPS per instructions.

I am now able to see and print to the Samsung laser printer on the desktop PC.

Then I plugged the HP OJ 4215 printer into my laptop via USB. It is recognized in the hardware but not by CUPS.

NOTE: I did observe on both computers that there was no line called "service_init loop" in rc.services so I put it ahead of the last several lines which referred to "service" and hoped for the best.

WDYT?
[b]Thanks! David[/b]
[i]Home page: [/i][url]http://nevils-station.com[/url]
[i]Don't google[/i] [b]Search![/b] [url]http://duckduckgo.com[/url]
TahrPup64 & Lighthouse64-b602 & JL64-603

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#22 Post by MU »

edoc,
maybe you need to restart cups.
Type:
/etc/init.d/cups stop
/etc/init.d/cups start


Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

User avatar
edoc
Posts: 4729
Joined: Sun 07 Aug 2005, 20:16
Location: Southeast Georgia, USA
Contact:

#23 Post by edoc »

Just tried it ... nada.

I forgot to mention that CUPS does not open properly on my laptop when I call it from the Menu, I have to open a browser window and start it using localhost:631/

When I try to open from the Menu I get the CUPS Web Interface Help window telling me to expect CUPS to open in 3-30 seconds but nothing happens other than I observe CUPS grabbing some Personal Storage space then when I click okay in the window and wait a few seconds it gives that storage space back.

Not sure what is happening. This is a 4.12-Normal Frugal install.
[b]Thanks! David[/b]
[i]Home page: [/i][url]http://nevils-station.com[/url]
[i]Don't google[/i] [b]Search![/b] [url]http://duckduckgo.com[/url]
TahrPup64 & Lighthouse64-b602 & JL64-603

User avatar
ttuuxxx
Posts: 11171
Joined: Sat 05 May 2007, 10:00
Location: Ontario Canada,Sydney Australia
Contact:

#24 Post by ttuuxxx »

edoc try my version http://www.puppylinux.asia/tpp/ttuuxxx/ ... 386-v2.pet
start it by clicking menu/manage printing and see how you go.
ttuuxxx
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)

User avatar
edoc
Posts: 4729
Joined: Sun 07 Aug 2005, 20:16
Location: Southeast Georgia, USA
Contact:

#25 Post by edoc »

OH SO CLOSE! :roll:

I needed to reboot before it did the job ... but ... your version sees the printer and tries to load it then I get this:
Printer command job processing, "Unable to open device file "/dev/lp0": Permission denied"
Could it be that even though it is physically connected to a different computer it is trying to use the same "Connection" parallel:/dev/lp0 ?
Description: hp officejet 4200 series
Location: office
Driver: HP Officejet 4200 Series Foomatic/hpijs, hpijs 2.8.12 (color)
Connection: parallel:/dev/lp0
Defaults: job-sheets=none, none media=Letter
[b]Thanks! David[/b]
[i]Home page: [/i][url]http://nevils-station.com[/url]
[i]Don't google[/i] [b]Search![/b] [url]http://duckduckgo.com[/url]
TahrPup64 & Lighthouse64-b602 & JL64-603

User avatar
ttuuxxx
Posts: 11171
Joined: Sat 05 May 2007, 10:00
Location: Ontario Canada,Sydney Australia
Contact:

#26 Post by ttuuxxx »

try this in a command line
chmod 0666 /dev/lp0
ttuuxxx
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)

User avatar
edoc
Posts: 4729
Joined: Sun 07 Aug 2005, 20:16
Location: Southeast Georgia, USA
Contact:

#27 Post by edoc »

No impact so I reloaded hpijs-2.8.12.pet then stopped and started CUPS then ran the chmod again.

Then I rn a Print Test Page and it is stuck cycling "Printer Command Job Processing"

After I send this I will close everything and reboot and try again.
[b]Thanks! David[/b]
[i]Home page: [/i][url]http://nevils-station.com[/url]
[i]Don't google[/i] [b]Search![/b] [url]http://duckduckgo.com[/url]
TahrPup64 & Lighthouse64-b602 & JL64-603

User avatar
Patriot
Posts: 733
Joined: Thu 15 Jan 2009, 19:04

#28 Post by Patriot »

Hmmm .....

I've spent more time than I've planned to with cups ... Now, cups and puppy can play along nicely with either one or both of usb & lpt printers ...

1. I've added minor udev rules changes for standard cups package to work properly. No more /dev/lp# permission denied. This will mknod lp with 0666. The added udev rules also allows you to use usb and lpt printers simultaneously. Puppy was telling me to use either one, not both. Not anymore ...

2. All lpt printers will go to /dev/lp# and all usb printers should now go to /dev/usb/lp# ...

3. I've posted the cups 1.4b2 standard (full) pet reworked with the above fixes. This pet package will make some cleanups during installation and now have automatic "postinstall" install. I did not make any changes to the cups source. Full source is available from www.cups.org btw ...

4. I've also made a patched cups binary that runs as root. It was made for internal tests as it breaks web interface security plus several more security related stuffs. However, it works without having to fiddle with puppy. You may make a request if you want a copy as it is not meant for public release/use.

5. I've made a lame script to view list of printers available. This is a preliminary version that I plan to expand later on. So it's far from perfect, yet can be helpful to find out which printer is on what /dev ...

6. Please remember that cups does not always detect your printers ... try a reboot with the printer ON for lpts ... cups only knows /dev/lp ... so, cant help much with usb printers as from what I know the usb backend is somewhat broken with cups and with the various quirks with usb printer protocols, I can't fix what I can't see ...

Finally, I'm only one person, not a gazillion dollar org. My printers are old lpts and one broken usb. If cups works for you then great, if not please post a report with a proper spec.

Have a nice day !

Rgds
Attachments
listprinter.zip
script to list printers ... dont forget to chmod 0755 ...
(894 Bytes) Downloaded 343 times

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#29 Post by 8-bit »

I tried installing Cups 1.4b2 using the Pet and for some reason, I cannot find an option to delete a printer if one screws up.
Matter of fact, I don't even see the Modify Printer option anymore.
I reinstalled an older version of CUPS to get my printer working again.

But as far as the missing options I pointed out, am I missing the boat and just not seeing them?

User avatar
edoc
Posts: 4729
Joined: Sun 07 Aug 2005, 20:16
Location: Southeast Georgia, USA
Contact:

#30 Post by edoc »

You click on Printers then click on the printer that you want to modify or delete then you click on the right hand window (not Maintenance) under the printer name that says Administration and the drop-down gives you a variety of choices including MOdify and Delete.

There is a problem with permissions - it seems to constantly reset itself so that you get an error when trying to make certain changes.
403 Forbidden
I have done the chmod 0666 /dev/lp0 several times but no effect. Not sure what is happening.
[b]Thanks! David[/b]
[i]Home page: [/i][url]http://nevils-station.com[/url]
[i]Don't google[/i] [b]Search![/b] [url]http://duckduckgo.com[/url]
TahrPup64 & Lighthouse64-b602 & JL64-603

User avatar
Patriot
Posts: 733
Joined: Thu 15 Jan 2009, 19:04

#31 Post by Patriot »

Hmmm .....
I cannot find an option to delete a printer if one screws up.

If you're used to the previous web interface then the new web interface layout needs some time to getting used to ... from what i read, that's how all cups from 1.4 onwards will be ...

The option to delete is now placed 'deeper' into individual printer menu. As edoc mentioned, you'll have to click on the 'screwed up' printer name and proceed from there .....
Quote:
403 Forbidden
I have done the chmod 0666 /dev/lp0 several times but no effect. Not sure what is happening.
edoc, could you kindly elaborate a little more ? From what I can tell, if you're getting a 403 in the web-interface then it could be a browser cache issue ... cups will ask for login info if an administrative function is called ... I've also read somewhere that cups can sometimes timed-out due to the ssl key creation during logins ... I've not encounter a 403 as yet, so a little more detailed spec may help me pin point the issue ...

Perhaps you may need to flush (delete) the bareview cache before using cups web interface ... It's in /root/.TestGtkEmbed/TestGtkEmbed/Cache/ ... This is also done in the updated pet postinstall ... Alternatively, if you use the default browser then clear the cache before pointing to http://localhost:631

I'd like to briefly explain about the chmod 0666 /dev/lp0 ... this permission will give read & write access for /dev/lp0 to owner + group + world ... (puppy's "on-demand-mod-loading" default is 0660)

Without it, cups cannot access any printer assigned to /dev/lp0 as cups also no longer runs as root (attempting to run as root will make cups switch to user nobody) ... using any other userid won't make much difference either as puppy is root owned by default ...

This issue have been resolved in the newly updated cups_std pet ... I have added udev rules to ensure all /dev/lp# and /dev/usb/lp# are world accessible ... the /dev/lp# permission denied errors should no longer be an issue ...
Brief info on my tests so far ...
During my tests, I found that I'm unable to use both lpt and usb printers at the same time .... they both were pointing to /dev/lp# ..... so I'm placing usb printers back to /dev/usb/lp# ... this is done in accordance to what I understand from :

http://www.kernel.org/pub/linux/utils/k ... /udev.html
-and-
http://www.linuxjournal.com/article/7316

I've requested a friend of mine with multiple usb printers to test puppy + cups on his system and have just received a positive reply that multiple usb printers does work properly and cups can print to both usb printers simultaneously ... On my part, I'm able to print to one usb and one lpt printer simultaneuosly ...

At this point, my concern is to be able to print thru cups either using built-in ppd or raw. Next, I'll need to confirm samba -> cups printing is not broken ...

I've yet to start looking into gutenprint compatibility (as requested by ttuuxxx) as I have real world matters to deal with at the moment ... it may take a little while longer before I can resume ...

Rgds

User avatar
edoc
Posts: 4729
Joined: Sun 07 Aug 2005, 20:16
Location: Southeast Georgia, USA
Contact:

#32 Post by edoc »

OK, I think I have spotted the local problem here - CUPS on one computer is conflicting with CUPS on another.

When I made changes to the setup of the printer on the desktop printer from my laptop it got all confused. Perhaps a user needs to be warned when making a remote change that may cause problems?

I reset the printer connected to the desktop from CUPS on the desktop and it is working fine from both the desktop and my laptop now.

I have CUPS 1.4b2 on that desktop but it is not your version, yours is on my laptop - I will change that one to yours and see if that removes the conflict that is preventing the HP printer connected to my laptop from working.

A more prominent warning as to the interaction of CUPS on a network may be in order - my computers are in a very common configuration - a shared wired/wireless router.

WDYT?
[b]Thanks! David[/b]
[i]Home page: [/i][url]http://nevils-station.com[/url]
[i]Don't google[/i] [b]Search![/b] [url]http://duckduckgo.com[/url]
TahrPup64 & Lighthouse64-b602 & JL64-603

User avatar
edoc
Posts: 4729
Joined: Sun 07 Aug 2005, 20:16
Location: Southeast Georgia, USA
Contact:

#33 Post by edoc »

Just observed different behavior between Print Test Page and Print Self-Test Page,
Print Test Page fails with an error:
hp_officejet_4200_series-28 Test Page anonymous 1k Unknown stopped "/usr/lib/cups/filter/foomatic-rip-hplip failed"
Print Self-Test Page cycle for a while then produces the inaccurate message:
Print Self-Test Page On hp_officejet_4200_series
Printer command job completed
Print Self-Test Page prints nothing, the job and output just vanish.
[b]Thanks! David[/b]
[i]Home page: [/i][url]http://nevils-station.com[/url]
[i]Don't google[/i] [b]Search![/b] [url]http://duckduckgo.com[/url]
TahrPup64 & Lighthouse64-b602 & JL64-603

User avatar
Patriot
Posts: 733
Joined: Thu 15 Jan 2009, 19:04

#34 Post by Patriot »

Hmmm .....

I'm sorry edoc ... I wish I could help troubleshoot hplip/foomatic stuffs ... frankly, I'm not using it as yet and haven't a clue what's going on ... I'm willing to put it onto a list of stuff to do together with gutenprint tests ... that'll probably be sometime next week ...

I'm already under a ton of stuffs to clear right now ... I hope I can get back to messing with puppy soon ...

Rgds

User avatar
Patriot
Posts: 733
Joined: Thu 15 Jan 2009, 19:04

#35 Post by Patriot »

Hmmm .....

I was having some coffe, wrecking my brains figuring how to settle some real life issues ..... then out of nowhere, a flash came to mind on cups usb printer detection ...

I took a quick look at the cups backend sources and whipped up a usb printer backend based on the parallel sources ... I've only made some quick tests and found it working for me ... I need some testers to tell me how it goes ...

Look at my first post for the addon and place the module usblpp into /usr/lib/cups/backend ... No cups restart or reboot required ... If you need to remove it, just delete it and reconfigure your printer URI to parallel:/dev/usb/lp# again ...

This allows usb printers to be detected by model at usb# ... The URI upon detection will be usblpp:/dev/usb/lp# ... It is deemed to be an experimental addon ...

Please post some feedbacks ...

Rgds

Post Reply