[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

How to reset a local printer from the Debian box?



Hi All,
One of my debian boxes works additionally as a print server for a few 
Win98 and Linux machines. The problem is however, that sometimes users
send something in the wrong format, or Windows programs crashes in the middle
of the print job, producing the corrupted output. I would like to provide 
my users with the possibility of cleaning up the print queue, and resetting
the printer. It can be done with a small perl setuid'ed script, but there is
a problem with my printer (HP-DJ670C) - There is no way to clean up it's 
buffer and reinitialize it in other way, than by switching off and on the power
:-(.
Does anybody know how to reinitialize the printer in software way?
Please keep in mind, that the trasmission may be stopped in the middle of
binary data, so sending of any initialization codes in data stream may not
give reasonable results. The toggling of INIT line in the LPT port probably
could give good results, but I couldn't find any IOCTL to perform it
with the standard lpt driver...
It is possible to rmmod the lpt driver, run the program which takes over the
lpt ports, sets the INIT line low for a second, and then insmod the lpt
driver again, but it seems to be a very dirty trick :-(.

-- 
			Thanks for any suggestions
			Wojciech Zabolotny
			http://www.ise.pw.edu.pl/~wzab

http://www.freedos.org  Free DOS for free people!


Reply to: