Sending a 2-byte file to my local USB printer

Hi, I work at home. One computer (Linux Mint Qiana), one printer (Lexmark E230), connected by USB cable. Ever since installing Mint, I've had to cold-cycle my printer between every print job. Otherwise, subsequent print outs are not the intended document, but rather a string of random characters and form-feeds, starting with "PJL ENTER LANGUAGE = PCLXL) HP-PCL XL;1;1" Have asked in the past for fixes here at LUV, on Mint & Ubuntu forums and on CUPS & Linux printer forums. Nothing effective as a response. So... I think that just shooting Esc E (27 69 in decimal, or 1b 45 in hex) at the printer between each job =might= kludge a fix. (Unfortunately, I can't make CUPS use a 2-byte binary file as the entirety of a header or footer banner. So that approach won't work.) Creating the 2-byte file would be easy enough: Some hex editor. And I vaguely recall how I'd do it in MSDOS: Create a batch file that contains the line... copy resetprn.txt lpt1: But I'm not sure how to ... 1. - identify my printer (as a target) within the Linux filesystem 2. - make a similar shell script into an executable icon on my desktop Any hints would be greatly appreciated. Thanks, Carl Bayswater, Vic

Carl Turney <carl@boms.com.au> writes:
And I vaguely recall how I'd do it in MSDOS: Create a batch file that contains the line... copy resetprn.txt lpt1:
But I'm not sure how to ... 1. - identify my printer (as a target) within the Linux filesystem 2. - make a similar shell script into an executable icon on my desktop
Good printers you address as hosts on the net, using LPD or IPP (i.e. they run LPD or cups inside themselves). Thus: "nc printer.example.net ipp < payload", except you probably need to hold an actual IPP conversation rather than just shoving bytes at it. Bad printers have USB or something. I don't know about them. Your problem is probably that the driver you're using is crap, because NOBODY understands PPD and the whole thing is cargo-culted. Try using the generic pxlmono driver.
participants (2)
-
Carl Turney
-
trentbuck@gmail.com