[cups.general] Timeout Problems!
Patrick DUBAU
patrick.dubau at alsace.iufm.fr
Thu Nov 10 05:53:30 PST 2005
Hi Léo,
here's a shell script i did :
while read ligne
do
# on cherche toutes les lignes qui commencent par '<' et dont le 2 ème
caractère n'est pas '/'
# dans ce cas on aura toutes les lignes qui définissent les imprimantes
configurées dans CUPS
if [ "${ligne:0:1}" = "<" ] && [ "${ligne:1:1}" != "/" ]
then
# on enlève ce qui est à gauche de l'espace (\ ) => on garde
"imprimante>"
reste=${ligne#*\ }
# Remarque : enable est une commande interne du shell BASH. Si on
tape simplement enable on obtient un message d'erreur
# car c'est la version interne de BASH qui sera utilisée en
standard. Pour effectivement utiliser la commande enable de
# CUPS il faut prendre le chemin d'accès complet : /usr/bin/enable
(cde installée par le paquet cupsys-client)
# on enlève tout ce qui est à droite de '<' => il ne reste plus que
le nom de l'imprimante
/usr/bin/enable ${reste%>*}
fi
done < /etc/cups/printers.conf
you also have to add in /etc/cron.d a file which contains is :
0,10,20,30,40,50 * * * * root
/home/script/bin/enable-imp.sh
=> every 10 min it looks for all the printers defined in cups and enable
them
Hope that helps
Léo Dutra a écrit :
>Hey, I've got a little problem here...
>
>If I try to print something while my printer (in this case, a HP LaserJet 2300dn) is powered off, CUPS automatically "stop's" the printer and waits untill I turn it on and then I have to manually "start" the printer at cups interface... I'd like to know if there is a way to periodicaly check printer stats and automatically start it.
>
>I'd be glad to receive any info about this, via e-mail or here at forum.
>
>Thanks again,
>Léo S. Dutra
>leosdutra at gmail.com
>_______________________________________________
>cups mailing list
>cups at easysw.com
>http://lists.easysw.com/mailman/listinfo/cups
>
>
More information about the cups
mailing list