# Lexmark Z23

## booxter

I have a Lexmark Z23 printer. I downloaded official binary drivers from lexmark.com, untared it, rpm2targzed and installed in the system.

All the new files are in /usr/local/lexmark/z33/

There is

hard z33 # ls

7b.ps        lexerrorz33*     lxaialgn.out  lxaikaln.out  userconf/

GPL          lexgui.conf      lxaicaln.out  lxgetconf*    z23-z33lsc*

helpfiles/   lexmarkz23-z33*  lxaicln.out   query*        z33*

httable.bin  LGPL             lxaigsparm*   rmlp*         z33.sh*

But when I try to

hard z33 # ./lexmarkz23-z33 

./lexmarkz23-z33: error while loading shared libraries: libstdc++-libc6.1-1.so.2: cannot open shared object file: No such file or directory

hard z33 # 

I have this warning message...and all.

If I try to execute it from Mandrake 10 or RedHat 9, it is a GUI for configuring the printer. How can I push this printer in my Gentoo system?

BTW:

I saw a lexmark-foomatic-kit.tar.gz on linuxprinting.org, but it doesn't work for me.

I use LPRNG. (because I know that provided drivers don't support CUPS or PDQ or anything else but lpr).

----------

## littlepr

Which driver did you download and how did you untar it? Was it the cjlz33le.tar.gz? I need to know how you got the lexmark-33.xxx.gz.sh file to unzip the rpm packages so that I can then rpm2targz themm in my system to see if I can get it to work.

----------

## booxter

I opened my lovely nano on the .sh selfrun file & saw that there is a script & a stdin with gzip format/ So I looked at the line number of the beginning of the gzip part. It is 156 in my file. Yours may vary. Then

# tail -n 156 lexmarkz33-1.0-3.sh | gzip -cd | tar xv

Then I started ./xz33install.

It may fail with the library warning. In Gentoo you should 

# emerge lib-compat

Then proceed with installation & ignore warnings about "no rpm found".

Before the installation you should

#emerge lprng

But it is blocked with CUPS. So you should uninstall CUPS

# emerge -C cups

Then

#revdep-rebuild

for a proper work of other packages that are linked with cups. You should also provide your USE with "-cups". And 

#emerge --newuse world

By default you can't print without root privileges. To make user printing possibility, you should

#chmod -R a+rx /etc/lprng

You should also have an "USB device filesystem support" in the kernel to properly install driver.

Then you should edit your /etc/printcap like that:

lexmarkz33:\

:sd=/var/spool/lpd/lexmarkz33:\

:mx#0:\

:mc#99:\

:sh:\

:rw:\

:lp=/dev/usb/lp0:\

:if=/usr/local/lexmark/z33/z33.sh:

##PRINTTOOL3## LOCAL

z33-outfiles:\

:sd=/var/spool/lpd/z33-outfiles:\

:mx#0:\

:mc#99:\

:sh:\

:rw:\

:lp=/dev/usb/lp0:

##PRINTTOOL3## LOCAL

lp:\

:sd=/var/spool/lpd/lp:\

:mx#0:\

:mc#99:\

:sh:\

:lp=/dev/usb/lp0:\

:rw:\

:if=/usr/local/lexmark/z33/z33.sh:

You could start Lexmark Solution Center with

# /usr/local/bin/z23-33lsc

You could also edit your /usr/local/lexmark/z33/z33.sh like that for proper work (like win driver):

#!/bin/sh

DEBUG=0

PDIR=/usr/local/lexmark/z33

LXTMPFILE=`mktemp /tmp/lexmark.XXXXXX`

export LXTMPFILE

# lxgps is a little utility used to setup the

# Ghostscript parameters.  It sets two parameters

# in particular: resolution and paper size.  It

# determines what to set these to by reading the

# configuration file that is passed in.

count=1;for i in `$PDIR/lxaigsparm z23-z33.conf | sed -e ":l;{s/x/\ /};t l;{s/-[rg]//};t l"`;do let ARG$count=$i;((count++));done

GSPARMS=-r$ARG1\x$ARG2\ -g$ARG3\x`echo "scale=0;0.565*$ARG2/1+$ARG4" | bc -l`

LXCOPIES=`$PDIR/lxgetconf z23-z33.conf "current settings" "copies_number"`

LXORIENT=`$PDIR/lxgetconf z23-z33.conf "current settings" "orientation"`

LXENSMEDIA=`$PDIR/lxgetconf z23-z33.conf "current settings" "media_size" | sed -e 's/ /_/g'`

if [ "$LXORIENT" = "Landscape" ]

then

        ENSORIENT="-r"

else

        ENSORIENT="-R"

fi

runz33 ()

{

        magic=$(file ${LXTMPFILE})

        magic=${magic#*: }

        case `echo $magic | tr 'A-Z' 'a-z'` in

            "pc bitmap data"* )

                bmptoppm <$LXTMPFILE | $PDIR/z33 --config z23-z33.conf --dotcounts;;

            "gif image data"* )

                giftopnm <$LXTMPFILE | $PDIR/z33 --config z23-z33.conf --dotcounts;;

            "jpeg image data"* )

                djpeg -pnm $LXTMPFILE | $PDIR/z33 --config z23-z33.conf --dotcounts;;

            "tiff image data"* )

                tiff2ps -a -2 $LXTMPFILE | gs -q -dNOPAUSE $GSPARMS -sDEVICE=ppmraw -sOutputFile=- - | $PDIR/z33 --config z23-z33.conf --dotcounts;;

            "pgm"*|"pbm"*|"ppm"* )

                pnmtops <$LXTMPFILE | gs -q -dNOPAUSE $GSPARMS -sDEVICE=ppmraw -sOutputFile=- - | $PDIR/z33 --config z23-z33.conf --dotcounts;;

            postscript* )

                gs -q -dNOPAUSE -sDEVICE=ppmraw -sOutputFile=- $GSPARMS $LXTMPFILE | $PDIR/z33 --config z23-z33.conf --dotcounts;;

            pdf* )

                gs -q -dNOPAUSE -sDEVICE=ppmraw -sOutputFile=- $GSPARMS $LXTMPFILE | $PDIR/z33 --config z23-z33.conf --dotcounts;;

            *ascii*|*text*|*english*|*script* )

                a2ps -B --borders=no -f 10 --media=$LXENSMEDIA $ENSORIENT -o - $LXTMPFILE | gs -q -dNOPAUSE $GSPARMS -sDEVICE=ppmraw -sOutputFile=- - | $PDIR/z33 --output blackonly --config z23-z33.conf --dotcounts;;

        esac

}

DISPLAY=:0; export DISPLAY; $PDIR/lexerrorz33 &

cat > $LXTMPFILE

COPY_COUNT=0

while [ $COPY_COUNT -lt $LXCOPIES ];

do

        runz33 2> /dev/null

        let COPY_COUNT=`expr $COPY_COUNT + 1`

done

/bin/rm -f $LXTMPFILE

EOF

Happy Lexmark Linux Printing!

BTW, as you can see, I don't have a lot of English XPrience. So, if you can, write a Wiki HOWTO on gentoo-wiki.com about Lexmark Z23 on Gentoo.

----------

## littlepr

So, you finally got it to work for you by following these steps or are you still having problems?

Quote 

You should also have an "USB device filesystem support" in the kernel to properly install driver. 

USB device filesystem such as ? I need more info

By the way Booxter. What other language do you speak? If it's Spanish I speak it too.

----------

## littlepr

Booxter,

I keep getting this error:

ash-2.05b# tail -n 156 lexmarkz33-1.0-4.sh | gzip -cd | tar xv

gzip: stdin: not in gzip format

Could this be true? My stdin is not in gzip format?

----------

## booxter

Finally it works well for me.

Not, I'm not Spannish. I'm Belarusian, from the country of the last european dictator. So I know Belarusian & Russian.

For 2.6:

Device Drivers Support > USB Support > USB device filesystem (it provides a /proc/bus/usb dir).

----------

## booxter

 *littlepr wrote:*   

> Booxter,
> 
> I keep getting this error:
> 
> ash-2.05b# tail -n 156 lexmarkz33-1.0-4.sh | gzip -cd | tar xv
> ...

 

It means that your file has a gzip-formatted stdin not from the 156 line, but from other. Tj know what's the number, open .sh file with 

#nano -w file.sh

and look:

fi

if [ $MD5 != \"00000000000000000000000000000000\" ]; then

# space separated list of directories

  [ x$GUESS_MD5_PATH = x ] && GUESS_MD5_PATH=\"/usr/local/ssl/bin\"

  MD5_PATH=\"\"

  for a in $GUESS_MD5_PATH; do

    if which $a/md5 >/dev/null 2>&1 ; then

       MD5_PATH=$a;

    fi

  done

  if [ -x $MD5_PATH/md5 ]; then

    md5sum=`tail +6 $0 | $MD5_PATH/md5`;

    [ $md5sum != $MD5 ] && {

      $echo Error in md5 sums $md5sum $MD5

      eval $finish; exit 2;

    }

  fi

fi

UnTAR() { tar xvf - || { echo Extraction failed. > /dev/tty; kill -15 $$; } ; }

$echo -n "Uncompressing $label"

cd $tmpdir ; res=3

[ "$keep" = y ] || trap 'echo Signal caught, cleaning up > /dev/tty; cd $TMPROOT; /bin/rm -rf $tmpdir; eval $finish; exit 15' 1 2 15

if (cd "$location"; tail +$skip $0; ) | gzip -cd | UnTAR |  (while read a; do $echo -n .; done; echo; ); then

        chown -Rf `id -u`.`id -g` .

    res=0; if [ x"$script" != x ]; then

                if [ x"$verbose" = xy ]; then

                        $echo "OK to execute: $script $scriptargs $* ? [Y/n] "

                        read yn

                        [ x"$yn" = x -o x"$yn" = xy -o x"$yn" = xY ] && { $script $scriptargs $*; res=$?; }

                else

                        $script $scriptargs $*; res=$?

                fi

                [ $res != 0 ] && echo "The program returned an error code ($res)"

        fi

    [ "$keep" = y ] || { cd $TMPROOT; /bin/rm -rf $tmpdir; }

else

  echo "Cannot decompress $0"; eval $finish; exit 1

fi

eval $finish; exit $res

END_OF_STUB

^_^^^@=;^B^C^ilcu^(^(^B^TwJ\$^"^TII$RD\MBj^^gL&k^S^5^ʠ^Kڢ^^H[^!A~HK@^E~     ^ʴ9>r4^k^M&h^[^]a{                                                                         $

^"B?k^Dd^^=<^^^NIg}Da^U)>xiT*^J^H^^ִAG?ٳLlN$cA51Sp^ZMb^]^E^Nox^Z<^=[^^^ңD^^^ic]VdO                                                                                      $

^^er^^^^^1 ^ WW\^k^^\^|eWʪ_+g^+HIE^i_+?r^<N^T0^S^Z.)e]^\z^<v9PL J^[y^o                                                                                                 $

^uhM^M^^MM`-m^^]^`]`=}}"^^^```pp^HL"^Y^^^^^^^Y^Y^E^Jcc2^L^@STZh^^S^S:^N0^X^^^^SS&<3cX6}t\n...^^յ                                                                       $

%e%C^^^^*9^LpyU^^^SoW^^A^@^N^ʧ^B]Vx&Û*Y^yYë

tP<|^^@^^^^^Ҩ^^-^N^

YU*

^^L6S.^^NyD"Hy^V)Z.,^\^Aa^M^,¬^STS^P{ (R^m^^^^T_^Q"  ~^L^D^2MUQ^^@-^^H^K^[^T^E|S+^^H^Ds^GV<^                                                                           $

5&^^^H^*j^F$^

hA ^B^C^^%fE^@^^Lѩklh [l}]^PȬ^Zh^^T^Mu^^^ac^^ D^G^P,^X\-^Uw"^P~5!^ʿlEΤ=Uz;[^[kUդaO^G

<j(B^_^ME^^^@^[bY^SZ

As you can see, you should give through the pipe all what goes after END_OF_STUB frase. So move your cursor after that and hit Ctrl-C to find the line number. Tis is what you should insert in tail -n xxx option. If it doesn't work try to 

#tail -n (xxx-1) |...

or

#tail -n (xxx+1) |...

One of these commands should work.

Happy ungzipping!

----------

## booxter

One of the bugs I found in drivers is that

1) when I lpr something, it begins printing after a pair of seconds.

2) in the GUI it is printed "Cannont Communicate", but finally printer works. And it's the main thing.

----------

## littlepr

Thanks Booxter. 

I have been off of Linux for a while but I will try your suggestion once I get a chance. I hope this works for me. If I can get the gzip to work and I succeed in installing the driver I will post my results.

----------

## burzmali

did you take a look here?

http://gentoo-wiki.com/HOWTO_Lexmark_Printers

----------

