I'm french and i would like to know if it was possible to sender a buffer of characters or a string to the lpr command or lp.
Thanks for the response !!
If you are wanting to send control codes to the printer, then you will probably want to edit the printer interface script directly. The directly to cd to is:
/usr/spool/lp/admins/lp/interfaces
you will then edit the interface script (usually the name of your printer) and add a line similar to the following towards the beginning of the file:
echo "\033\033\c"
NOTE: The codes that you input MUST be in octal to work and you MUST ALSO end the echo statement with a \c. If not, it won't work.
You should NOT edit the files in the /usr/spool/lp/interfaces directory. Instead edit the source files in the /usr/spool/lp/model directory.
Why? Because if you make any changes to the port/baud rate/turn on/off banners etc using scoadmin, the copy in the interface directory is overwritten by the source files in the model directory.
It is also good practice to copy the original model source file to another name and hack that (IE copy /usr/spool/lp/model/epson to /usr/spool/lp/model/epson.mod, hack that and use it as the model in scoadmin). That's so upgrades don't blow your changes away.
You will only edit the interface files in the model directory if the printer(s) is/are network printer(s). If they are line printers.... they will be in the /usr/spool/lp/admins/lp/interfaces directory.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.