The time now is Wed 19 Jun 2013, 00:21
All times are UTC - 4 |
| Author |
Message |
disciple
Joined: 20 May 2006 Posts: 6199 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 Sub_title: 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...
_________________ DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
|
|
Back to top
|
|
 |
disciple
Joined: 20 May 2006 Posts: 6199 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
_________________ DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
|
|
Back to top
|
|
 |
rcrsn51

Joined: 05 Sep 2006 Posts: 7833 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: 6199 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.
_________________ DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
|
|
Back to top
|
|
 |
|
|
|
Rules_post_cannot Rules_reply_cannot Rules_edit_cannot Rules_delete_cannot Rules_vote_cannot You cannot attach files in this forum You can download files in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|