The time now is Wed 25 Apr 2018, 01:38
All times are UTC - 4 |
Author |
Message |
disciple
Joined: 20 May 2006 Posts: 6781 Location: Auckland, New Zealand
|
Posted: Fri 28 Aug 2009, 20:47 Post subject:
CUPS "stops" a printer if it is turned off when you print Subject description: Need to automatically restart printers; Here's a workaround |
|
I know this is an ecomoney style "bug", but it is a real weakness for a lot of users:
If you print something when your printer is turned off (or perhaps when it is out of paper if it is a printer without an OK/Resume button), the stupid CUPS scheduler "stops" the printer. A lot of people think it is too complicated to have to "start" the printer again, so CUPS should be able to automatically restart printers.
Workaround:
A script like this can check for any stopped printers and restart them.
Code: | #!/bin/sh
cut -d "|" -s -f1 /etc/printcap |while read line
do lpstat -p ${line} 2 |grep -E 'not|disabled' && /usr/sbin/lpadmin -p ${line} -E
done |
You can make a cron job to run it automatically, using pschedule. I don't know if you can make a cron job run more often than once a minute though. I guess otherwise you'd need to write an nasty script with an infinite loop in it, to run at startup.
Or perhaps it would be possible to automatically start a printer when it is turned on / plugged in...
_________________ If you have or know of a good gtkdialog application, please post a link here
Classic Puppy quotes
ROOT FOREVER
|
Back to top
|
|
 |
disciple
Joined: 20 May 2006 Posts: 6781 Location: Auckland, New Zealand
|
Posted: Sun 06 May 2012, 04:14 Post subject:
|
|
There is a more "proper" solution to this: http://murga-linux.com/puppy/viewtopic.php?t=75584
_________________ If you have or know of a good gtkdialog application, please post a link here
Classic Puppy quotes
ROOT FOREVER
|
Back to top
|
|
 |
rcrsn51

Joined: 05 Sep 2006 Posts: 11889 Location: Stratford, Ontario
|
Posted: Sun 06 May 2012, 09:47 Post subject:
|
|
disciple wrote: | N.B. I have not tested in Puppy, and don't know if it would require any other changes to Puppy's udev system.
|
Are you confirming that this works in Puppy? If so, could you give more details?
If not, the method here does work.
|
Back to top
|
|
 |
disciple
Joined: 20 May 2006 Posts: 6781 Location: Auckland, New Zealand
|
Posted: Sun 06 May 2012, 11:24 Post subject:
|
|
No, I haven't tested in Puppy, but I think in theory it should work - Puppy does use udev these days, after all.
Your solution does not address the problem I described - you talked about starting the printer on boot (is that even a problem? I've never encountered it), but it is necessary to start it when the printer is turned on/plugged in, or comes back on line after running out of paper, or when you send it a print job.
_________________ If you have or know of a good gtkdialog application, please post a link here
Classic Puppy quotes
ROOT FOREVER
|
Back to top
|
|
 |
wadmalaw
Joined: 16 May 2017 Posts: 4
|
Posted: Mon 23 Apr 2018, 15:08 Post subject:
|
|
re: disciple's suggested script from post dated Fri 28 Aug 2009, 20:47
re: HP laserjet 1320 with PeeBee's LxPupSc64 18.04
Usually have to stand on my ear to get this to print but it worked OTB with LxPupSc64 18.04... except for the issue with printing one page perfectly then unable to print subsequent till reboot.
"Workaround script" worked perfectly.
I don't print much, happy to have a solution. Thanks to all.
addendum: May have spoken too soon... didn't work second subsequent attempt same session... most likely user error.
|
Back to top
|
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|