#!/bin/sh # # Sends control sequences to Lexmark 5xxx, 7xxx printers # With an ancestral debt to changecartridge, by Henryk Paluch # $Id: lx.control,v 1.3 2000-03-11 13:15:34+10 pbw Exp $ # $Name: Release_6!0-2 $ # # This file must be linked to each of the names you will find in the # case statement at the end of the file. It must be invoked by one # of these links. PRINTER=lx.control LPC=/usr/sbin/lpc if ! rpm -q ghostscript >/dev/null 2>&1 then echo Ghostscript RPM not installed >&2 exit 1 fi if ! SHOW=`rpm -ql ghostscript | grep showcart\.out 2>/dev/null` then echo Can\'t find printer data files >&2 exit 1 fi if ! HIDE=`rpm -ql ghostscript | grep hidecart\.out 2>/dev/null` then echo Can\'t find printer data files >&2 exit 1 fi if ! ALIGN=`rpm -ql ghostscript | grep blckalgn\.out 2>/dev/null` then echo Can\'t find printer data files >&2 exit 1 fi if ! CLEAN=`rpm -ql ghostscript | grep blckhcln\.out 2>/dev/null` then echo Can\'t find printer data files >&2 exit 1 fi if [ ! -r "$SHOW" ] then echo Can\'t read $SHOW >&2 exit 1 fi if [ ! -r "$HIDE" ] then echo Can\'t read $HIDE >&2 exit 1 fi if [ ! -r "$ALIGN" ] then echo Can\'t read $ALIGN >&2 exit 1 fi if [ ! -r "$CLEAN" ] then echo Can\'t read $CLEAN >&2 exit 1 fi if $LPC status $PRINTER | grep unknown >/dev/null then echo Unknown printer $PRINTER >&2 exit 1 fi # How are we known? (1 Corinthians 13:12) case "$0" in *headclean) lpr -P$PRINTER $CLEAN ;; *headalign) lpr -P$PRINTER $ALIGN ;; *hidecartridges) lpr -P$PRINTER $HIDE ;; *showcartridges) lpr -P$PRINTER $SHOW ;; *) echo Unknown command $0 >&2 exit 1 ;; esac exit =head1 NAME B, B, B, B - Lexmark printer management commands =head1 SYNOPSIS showcartridges hidecartridges headalign headclean =head1 DESCRIPTION =over 4 =item B Expose the print cartridges by moving the print carriage to the left. This enables the cartridges to be installed or changed. Application: 5xxx and 7xxx. =item B Hide the print cartridges by docking the print carriage. This should be called after issuing I and changing a cartridge. Application: 5xxx and 7xxx. =item B Print the head alignment pattern. This should be run whenever a cartridge is changed. Four patterns are printed. =over 4 =item B This pattern displays the relative horizontal alignment of the black and colour heads. Use the best aligned number as the value for the I argument to Ghostscript for the Lexmark 5000. =item B This pattern displays the relative vertical alignment of the black and color heads. Use the best aligned number as the value for the I argument to Ghostscript for the Lexmark 5000. =item B This pattern displays the bi-directional alignment characteristics of the black cartridge. Not used by the Ghostscript driver. =item B This pattern displays the bi-directional alignment characteristics of the colour cartridge. Not used by the Ghostscript driver. =back Application: 5000. Possibly others. =item B Prints ink-intensive patterns designed to clear clogged nozzles. Application: 5000. Possibly others. =back =head1 REQUIREMENTS These scripts require a version of ghostscript which includes the datat files listed in the B section. They also require that the raw queue lx.control be set up on the system. =head1 FILES Base script lx.control Data files:- F/lib/printers/lexmark/showcart.out> F/lib/printers/lexmark/hidecart.out> F/lib/printers/lexmark/blckalgn.out> F/lib/printers/lexmark/blckhcln.out> /etc/printcap =head1 AUTHOR Peter B. West http://www.powerup.com.au/~pbwest/