You are not logged in.

#1 2009-05-22 14:10:08

schuay
Package Maintainer (PM)
From: Austria
Registered: 2008-08-19
Posts: 564

[solved]capt / automatically execute program when printer is turned on

Today I finally got around to setting up my parents' printer, a Canon LBP 1120.
I used the capt package from AUR which worked well after following the how-to.txt instructions (maybe this should be put in a capt.install file?).

Now, I'm still having the same problem from back when the printer was installed on Ubuntu.. The ccpd daemon needs to be restarted every time the printer is turned on/off. For example:

* booting with printer turned on -> works
* booting with printer turned on, then turning printer off and back on ->  doesn't work until i run /etc/rc.d/ccpd restart
* booting with printer turned off and then turning it on -> doesn't work until i run /etc/rc.d/ccpd restart

Until now I had a bash script on their desktop that they need to click before being able to use the printer.
I'd prefer having ccpd restarted automatically each time the printer is turned on. Is this possible? Hal? Udev? Any tips?

Thanks! schuay

Last edited by schuay (2009-05-22 15:08:54)

Offline

#2 2009-05-22 14:51:40

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: [solved]capt / automatically execute program when printer is turned on

udev would be my bet, assuming it's a usb printer.


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#3 2009-05-22 15:08:26

schuay
Package Maintainer (PM)
From: Austria
Registered: 2008-08-19
Posts: 564

Re: [solved]capt / automatically execute program when printer is turned on

thanks, found this link ( http://reactivated.net/writing_udev_rules.html#syntax ) which explains what i want to do pretty well smile

Offline

#4 2009-05-26 18:15:33

schuay
Package Maintainer (PM)
From: Austria
Registered: 2008-08-19
Posts: 564

Re: [solved]capt / automatically execute program when printer is turned on

for reference, I solved it with the following rule:

SUBSYSTEM=="usb", KERNEL=="lp0", RUN+="/etc/rc.d/ccpd restart"

edit: for more efficiency i should've probably added ACTION=="add" to that line

Last edited by schuay (2009-05-26 18:21:10)

Offline

Board footer

Powered by FluxBB