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
Patriot
Posts: 733
Joined: Thu 15 Jan 2009, 19:04

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

#1 Post by Patriot »

Hmmm .....

I've been trying to figure out how to get latest CUPS working. I know that the default CUPS 1.1.23 works just fine. But as soon as I upgrade to CUPS 1.3.3, it broke something somewhere. I've also added Samba server 3.0.26 and the stuff won't play nice. Apart from that, paraport modules start to disappear on reboot. It's really odd to see paraport goes missing on next subsequent reboot, and yeah, all my printers are lpt ones ...

Finally made it to work by moving the samba spool folders to /tmp/spool. Gave sysinit a whack to load paraport if its gone. (Anyone who's having similar issue, just check if parport modules are loaded. If not, check my notes below ... or cups won't detect LPT ...) Now, all is working just fine on full hdd install ... Moving samba spools on /tmp allowed me to print ps and raw to lpt printers. Raw printer makes life easier for some of those windows98 machines that I have.

Then I thought, why not get cups-1.3.9 ?

Uh-oh ... there begins my journey ... Grabbed the stable release cups-1.3.9 and compiled it. Gosh, it was 12MB total ... Ok, need to slim it down a bit. So, away with the man pages and the locales ...

Installed it and ugh ... can't print now !? ... Kept getting permission denied, backend error, filter stops etc etc ... Hey, I'm setting the same permissions and spool samba folder as before, but, why doesn't it print ?

Finally traced it to /var/spool/cups folder permissions ... no matter what permissions I set, it just won't print ... ok, lets move it somewhere then ... and jackpot! All my troubles went away in a flash ...

:)

Hastily prep-up a cups pet package and made several tests with LiveCD, frugal and hybrid LiveCD boots ... seems to work fine each time ... Honestly though, I dreaded of having to go thru the cups source code. My programming is virtually rusty and looking at thousand lines of codes is not my idea of having fun at the moment. So, I have added some codes to cups init script to create the tmp spools folders.

Well, I hope someone else who's having a tough time with the latest cups to give this a shot and let me know how it goes. I do not have any usb printer at the moment, so I'm interested to know if this still works.


note: these are no longer required. kept for historical record.

Code: Select all

1. Open a terminal and stop existing cupsd: 'killall cupsd'

2. Install the cups-1.3.9-i486

3. Add these lines to your /etc/cups/cupsd.conf (after LogLevel is ok)

   RequestRoot /tmp/spool/cups
   TempDir /tmp/spool/cups/tmp
   
4. In a terminal, start new cupsd: '/etc/init.d/cups start'

5. You should get msg: "cups: started scheduler"

6. Add printer/configure and make a test print

Code: Select all

If you're using LPT printer and paraport module disappear on next reboot. You'll need to manually load these modules. It should be loaded before cups starts. 
 
Add these lines in rc.services before the the init.d services are called:

modprobe parport
modprobe parport_pc
modprobe lp
chmod 0666 /dev/lp0
Have Fun !

Rgds

p/s: A BIG thank you to ttuuxxx for the heads-up on cups-1.4b2. Please refer to my post below.


cups_std-1.4b2-i486.pet : reworked cups packages specific for puppy 4.x.x
No longer available. Pm me if you really want it.
The recommended CUPS package is here.

For installation procedure click here:
http://www.murga-linux.com/puppy/viewto ... 591#269591

experimental usb printer backend as addon is available below.


Rgds

Added:
Was tested with Puppy Linux 4.1.1 and 4.1.2
Just tested with Puppy Linux 4.2alpha. Preliminary result confirmed it is working.
-----
Compiled new Cups-1.4b2
Preliminary testing done on Puppy Linux 4.1.1 and 4.1.2. So far so good.
-----
Latest pet reworked for simultaneous usb & lpt printers
experimental usb backend addon

.
Attachments
cups-1.4b2-usblp-addon.tar.gz
usb printer backend addon : put into /usr/lib/cups/backend
(9.93 KiB) Downloaded 590 times
Last edited by Patriot on Tue 11 Aug 2009, 09:34, edited 7 times in total.

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

#2 Post by BarryK »

Finally traced it to /var/spool/cups folder permissions ... no matter what permissions I set, it just won't print ... ok, lets move it somewhere then ... and jackpot! All my troubles went away in a flash ...
Oh my yes, I also had lots of fun and games with CUPS. That's why I ended up putting a fairly old version into Puppy4, as I couldn't get later versions to work.

But, what do you mean by "let's move it somewhere"? Do you mean you just deleted the 'cups' folder?
[url]https://bkhome.org/news/[/url]

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

#3 Post by Patriot »

Hmmm .....

Hey there BarryK !
BarryK wrote: But, what do you mean by "let's move it somewhere"? Do you mean you just deleted the 'cups' folder?
:wink: ... err, no ... I moved /var/spool/cups to /tmp/spool/cups ... and set cupsd.conf to point over there ...

I couldn't go through the entire cups sources to find out where and why exactly ... From what I've read, a bunch of stuffs was changed between 1.1.23 and 1.3.3 (& 1.3.9 too) ... It was too much for me to go through the whole thing ...

Latest cups refuse to use root a/c at all and I figured that it definitely must be something to do with folder/file related permissions ... I've tried daemon/lp/bin users, all no go with original spool folder ... so, moving to /tmp seems logical to test a hunch I had, based on the cups err log ...

Yeah, I know all this is just a quick hack, but, it gets the job done (my lan users are happy too!) ... so far it works everytime I added it to a fresh puppy ... it's best to really spend some time getting cozy with cups and get cups to play nicely on puppy ... perhaps when I have more time, I'll do a proper patch ...

BTW, Barry, I'm swaying off topic here but is it possible for me to get the freememapplet sources please ? I'd be much obliged ...

Rgds

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

#4 Post by ttuuxxx »

Hi Guys I also have the latest Beta Cups cups-1.4b2 going, I got it running a few days before this release came out and was posted in the 4.2 section, I did it for the next release of puppy, I didn't have to move anything around at all, but I did have to use/alter Barry's Scripts, but it works, plus Its the full version, nothing really removed and I added Barrys Scripts. You can install it overtop your current version also.
here's a link
http://www.puppylinux.asia/tpp/ttuuxxx/ ... 386-v2.pet
ttuuxxx

Ps Patriot I'll have a look for the freememory source code, I had it like a year ago, so it might take some time to find it, Keep up the great work :)
Last edited by ttuuxxx on Fri 30 Jan 2009, 09:51, edited 1 time in total.
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)

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

CUPS-1.4b2 pet update

#5 Post by Patriot »

Hmmm .....

Hey ttuuxxx !

Thanks for the heads up ... I was wondering if 1.4b2 will still give me a headache ... Apparently NOT ! :)

I've just grabbed the source and made a quick compile ... Also made a pet package too ... Slightly smaller package here ... I noticed dir2pet made duplicated man-html files ... I've double checked the files and removed the duplication ...

Well, so far tested on 2 different systems plus some QA tests on several fresh QEMU puppys ... Wooaaa ... First thing that strikes me is the "cleaner" web interface ...

The best thing is yet to come it seems ... No more fiddling with spool settings ... no more permission errors ... no more manually loading the parport modules ! Yeah, if parport/lp modules disappear, cups will load 'em automatically ... now, that really made my day ...

Every first time install on a fresh puppy goes smoothly... next, add/configure printers and away I print ... :)

Great! Tomorrow I'll update all those systems that already have cups139 ... :D

So, that makes two of us who did a binary cups14b2 package that works on puppy ...

Great work to you too ttuuxxx !

Rgds

ps. I'd really appreciate if there's a source for puppy released freememapplet ... I did read on BarryK's blog about the changes he made but the actual source would be much better ... I wanted to stop the messages that inotifywait keeps sending out to the logs ... it really helps when I need to look for something in the logs ...

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

cups_std-1.4b2-i486 install procedure

#6 Post by Patriot »

Hmmm .....

This post was getting very messy ... I've edited this post to keep it short & simple ...

New step-by-step installation procedure :

1. One-click-to-install cups 1.4b2

2. Reboot

3. Start CUPS and add printer, login IS required. Default user: root; password: woofwoof.

4a. LPT printer setup: select LPT# as normal, parallel:/dev/lp[0-2]

4b. USB printer setup: select SCSI/BEH and change to parallel:/dev/usb/lp[0-7]

5. Test print

6. Done



Rgds
Last edited by Patriot on Tue 03 Feb 2009, 03:33, edited 3 times in total.

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

#7 Post by BarryK »

I'll have a look for the freememory source code, I had it like a year ago, so it might take some time to find it, Keep up the great work
'freememapplet_xlib-411' is the one used in 4.1.2 I think. The source should be at puptrix.org/sources
[url]https://bkhome.org/news/[/url]

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

#8 Post by Patriot »

Hmmm .....
BarryK wrote: 'freememapplet_xlib-411' is the one used in 4.1.2 I think. The source should be at puptrix.org/sources
Ok ... I'll go and get a copy. Much appreciated. Must get some shut-eye now ...

Errr ... whoops ... getting a 403 at puptrix ... hmmm ....

Rgds

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

#9 Post by ttuuxxx »

Updated the cups package, now all you do is click
Menus/System/Manage Printing
to start the new Cups packag

Hey Patriot
This is the FreeMemory source that I compiled/altered the version that comes with my icewm packages, Its very stable on icewm, never disapears from the taskbar, unlike when other versions have been compiled on JWM.
ttuuxxx

just type ./compile, it gives a few errors but works anyways, if you improve the source, please release it, also if you right click on the FMA taskbar icon it gives you a few options that are outdated -Kp,-partview, They need to be changed to Pprocess and Top View.
Attachments
freememory.tar.gz
(15.67 KiB) Downloaded 584 times
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)

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

#10 Post by Patriot »

Hmmm .....

Thank you for the freemem source ... Much obliged ... Will take a look at it soon ...

Well, actually I've already figured out why the JWM freememapplet tray disappears ... happens only on full hdd installs, doesn't happen on LiveCD/Frugal tests ... the bug occurs in pup_event_frontend_d ... that pup_event was supposed to put the free "whatever memory" amount in /tmp/pup_event_freesizemem to be picked up by freememapplet ... if that ram amount is not sent to /tmp then freememapplet never appears ...

Anyway, I've already made some fixes & adjustments to pup_event_frontend_d to show available free ram for only hdd installs ... Dunno if anyone is interested with this fix ...

Now, if I could only get the actual JWM freememapplet source then perhaps I can shoot 3-4 birds with one stone ...


Rgds

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

#11 Post by ttuuxxx »

Patriot wrote:Hmmm .....

Thank you for the freemem source ... Much obliged ... Will take a look at it soon ...

Well, actually I've already figured out why the JWM freememapplet tray disappears ... happens only on full hdd installs, doesn't happen on LiveCD/Frugal tests ... the bug occurs in pup_event_frontend_d ... that pup_event was supposed to put the free "whatever memory" amount in /tmp/pup_event_freesizemem to be picked up by freememapplet ... if that ram amount is not sent to /tmp then freememapplet never appears ...

Anyway, I've already made some fixes & adjustments to pup_event_frontend_d to show available free ram for only hdd installs ... Dunno if anyone is interested with this fix ...

Now, if I could only get the actual JWM freememapplet source then perhaps I can shoot 3-4 birds with one stone ...


Rgds
Patriot

Freememory does do the disappearing trick from the taskbar on the live cd as well, I ran puppy/compiled live for over 1yr and must left a few hundred times, guaranteed. :)
not to set you back, but there might be more to it yet.
ttuuxxx
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)

big_bass
Posts: 1740
Joined: Mon 13 Aug 2007, 12:21

#12 Post by big_bass »

Freememory does do the disappearing trick from the taskbar on the live cd as well, I ran puppy/compiled live for over 1yr and must left a few hundred times, guaranteed. Smile
not to set you back, but there might be more to it yet.
ttuuxxx
Hey Jeff , Barry k, Patriot

I found out while ago doing a lot of experimental builds
that the free memory app

chokes because of something else
so I made a quick code fix

I called it quick_init
then make it a+x (Make executable/searchable)

and click it whenever things go buggy
once is enough to fix it until you reboot

Code: Select all

#!/bin/sh
#big_bass  quick fix for multiple start up problems
mount /proc
mount /sys
mount /dev/pts

big_bass
[/code][/quote]

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

#13 Post by Patriot »

Hmmm .....
ttuuxxx:

Freememory does do the disappearing trick from the taskbar on the live cd as well, I ran puppy/compiled live for over 1yr and must left a few hundred times, guaranteed......
Right, I've taken a look again at my pup_event_frontend_d routines ... Spent a bit more time at the codes and I've just realized an oversight on my part ... I overlooked one line that shouldn't be used without proper processing ... If you look at lines ~512 in the orig pup_event_fontend_d, ask yourself if that ps | grep will do what you want ...

Try this patched pup_event_frontend_d on your LiveCD/frugal/full installs ... I'm sure I got it right unless there's some other dark forces preventing me from seeing the code right ... :)
big_bass:

..... I called it quick_init .....
Wowzer ... coz that suddenly gives me another hunch .... Right, I did some checking and I've just figured out why cups 1.4b2 is having problems with lpt ports .... wooaaa ... it's so simple and yet elusive ... and it's not even cups 1.4b2 fault ....

It seems that if parport+_pc+lp modules are not loaded and later loaded manually, active /dev/lp* will get reset to 0660 permissions ... while cups needs 0666 permissions ... hmmm .... sometimes I wonder ....

I guess a reworked cups pet needs to be done ... I'll try to get a usb printer next week and make a full cups tests with lpt/usb before making an updated pet ...

Rgds
Attachments
pup_event_frontend_d.tar.gz
Patched pup_event_frontend. Freememapplet disappearing trick fix :)
(6.93 KiB) Downloaded 592 times
Last edited by Patriot on Sat 31 Jan 2009, 01:12, edited 3 times in total.

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

#14 Post by ttuuxxx »

Patriot wrote:Hmmm .....

I guess a reworked cups pet needs to be done ... I'll try to get a usb printer next week and make a full cups tests with lpt/usb before making an updated pet ...

Rgds
Patriot ummmm just try my latest version above on a clean live cd, it works out of the box, Its doesn't have any issues that I can see. Why not look at the puppy 4.2 development section and gives us a hand there?
ttuuxxx
http://www.murga-linux.com/puppy/viewto ... 155#270155
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)

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

#15 Post by Patriot »

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

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

Post Reply