Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
CUPS: how to auto-cancel failed jobs and resume the printer?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
tassilo80
Guru
Guru


Joined: 26 Mar 2003
Posts: 346
Location: Koblenz, Germany

PostPosted: Fri Oct 11, 2013 7:14 pm    Post subject: CUPS: how to auto-cancel failed jobs and resume the printer? Reply with quote

Hi all,

I've installed Gentoo GNU/Linux on my father's box. Basically, that's all fine, except that he frequently tries to print something, the job fails for whatever reason, and then it blocks the printer queue and I have to ssh to his machine to cancel all pending jobs and resume the printer.

Is there a way to configure CUPS in such a way that it automatically cancels failed jobs and instantly resumes the printer instead of going into maintenance mode?

Thanks,
Tassilo
Back to top
View user's profile Send private message
eyoung100
Veteran
Veteran


Joined: 23 Jan 2004
Posts: 1428

PostPosted: Fri Oct 11, 2013 7:31 pm    Post subject: Reply with quote

Code:
useradd -G wheel <father's username>
emerge sudo
visudo <--Uncomment Wheel with Password line
emerge gksudo(or kdesudo, depending on DE)
gksudo firefox localhost:631
Password: ****** <-- Father's Password
Empty stalled jobs, restart queue

_________________
The Birth and Growth of Science is the Death and Atrophy of Art -- Unknown
Registerd Linux User #363735
Adopt a Post | Strip Comments| Emerge Wrapper
Back to top
View user's profile Send private message
tassilo80
Guru
Guru


Joined: 26 Mar 2003
Posts: 346
Location: Koblenz, Germany

PostPosted: Fri Oct 11, 2013 7:51 pm    Post subject: Reply with quote

eyoung100 wrote:
Code:
useradd -G wheel <father's username>
emerge sudo
visudo <--Uncomment Wheel with Password line
emerge gksudo(or kdesudo, depending on DE)
gksudo firefox localhost:631
Password: ****** <-- Father's Password
Empty stalled jobs, restart queue


Well, I already bookmarked the printer config page in his browser, and the cups admin password is known by the browser anyway. But still if he hasn't done that for a week, he doesn't get it anymore. It certainly doesn't help that he doesn't understand English, so the cups browser interface is just incomprehensible for him.
Back to top
View user's profile Send private message
eyoung100
Veteran
Veteran


Joined: 23 Jan 2004
Posts: 1428

PostPosted: Fri Oct 11, 2013 8:14 pm    Post subject: Reply with quote

Then do it without the Browser:
Code:
sudo /etc/init.d/cupsd restart

_________________
The Birth and Growth of Science is the Death and Atrophy of Art -- Unknown
Registerd Linux User #363735
Adopt a Post | Strip Comments| Emerge Wrapper
Back to top
View user's profile Send private message
tassilo80
Guru
Guru


Joined: 26 Mar 2003
Posts: 346
Location: Koblenz, Germany

PostPosted: Fri Oct 11, 2013 8:47 pm    Post subject: Reply with quote

eyoung100 wrote:
Then do it without the Browser:
Code:
sudo /etc/init.d/cupsd restart


Restarting the cups daemon clears the printer queue? I don't think so. At least I can remember clearing pending jobs after he has shut off and later restarted the machine.
Back to top
View user's profile Send private message
Fitzcarraldo
Advocate
Advocate


Joined: 30 Aug 2008
Posts: 2034
Location: United Kingdom

PostPosted: Sat Oct 12, 2013 11:17 am    Post subject: Reply with quote

tassilo80 wrote:
Is there a way to configure CUPS in such a way that it automatically cancels failed jobs and instantly resumes the printer instead of going into maintenance mode?

Interesting question. I haven't tried it myself, but I think changing ErrorPolicy in printers.conf might do it. See near the end of the article: cups — fixing cups printer problem: lpd failed.
_________________
Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC udev elogind & KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
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