Just another WordPress weblog

How I got my Lexmark X6170 Working on Ubuntu 8.04

Here’s the script I ended up writing once I got everything finally working. Since I was missing a few packages I ended up finding out each step the hard way but I continued to tweak the script just in case I ever have to do it again.

I take very very little if any credit for getting any of this to actually work, everything I learned came from the following:

http://ubuntuforums.org/showthread.php?t=49714
http://real.lithium.com/real/board/message?board.id=realplayer&thread.id=1152&view=by_date_ascending&page=2

First and foremost you need the files.

For the Z55 driver: CJLZ55LE-CUPS-1.0-1.TAR.GZ

I highly urge you to make a new folder and move the file there along with the script. If all goes well you can jsut sit back and coast.

# lexmark_z55_install.sh
# last modified 04-25-08

# get the two missing packages
sudo apt-get install alien
sudo apt-get install libstdc++5

# extract the driver.
tar -xvzf CJLZ55LE-CUPS-1.0-1.TAR.GZ

# fix the sh script, the sh script is broken for newer systems.
tail -n +143 lexmarkz55-CUPS-1.0-1.gz.sh > install.tar.gz

# extract the contents produced by tail
tar -xvzf install.tar.gz

# convert rpm packages to tgz. (ignore the warnings)
sudo alien -t lexmarkz55-CUPS-1.0-1.i386.rpm
sudo alien -t z55llpddk-2.0-2.i386.rpm

# extract the tgz's to / putting the files in their right place
sudo tar -xvzf z55llpddk-2.0.tgz -C /
sudo tar -xvzf lexmarkz55-CUPS-1.0.tgz -C /

# refresh ubuntu to see the new libraries
sudo ldconfig

# change to the folder for the drivers
cd /usr/share/cups/model

# unzip the ppd, which should _not_ be gzipped
sudo gunzip Lexmark-Z55-lxz55cj-cups.ppd.gz

#The driver is now installed. Restart the cups daemon.
sudo /etc/rc2.d/S19cupsys restart

# Now run and get the driver up and running
/usr/lib/cups/backend/z55

That *should* be everything I ended up having to do to print. Not hard, just a pain because the support from manufacturers sucks when it comes to linux. Hopefully as more people switch everything gets easier.

32 Responses

  1. Troy

    I followed your guide and it worked great!! Thanks for the help! I can finally print in Ubuntu!

    May 15, 2008 at 10:37 pm

  2. Nice Site!
    http://google.com

    May 16, 2008 at 2:04 pm

  3. DonM

    Thank you for the guide, I’m using Kubuntu 7.10 on an AMD64 and this worked on my X5150 with no issues. (Printer only). Thanks again!

    May 17, 2008 at 10:13 pm

  4. P

    Awesome! This one worked for me too. Thank you for your script.

    May 28, 2008 at 11:41 pm

  5. hk

    Great work ! Thanks so much.

    August 7, 2008 at 10:44 am

  6. ossfm

    Worked good for me too. I noticed that an edit had to be made in the line starting with “tail -n…”.

    Replace “>” with “>”.

    August 22, 2008 at 9:28 pm

  7. I tryed it. And i ran into a problem.

    When i entered
    sudo /etc/rc2.d/S19cupsys restart

    I got back
    sudo: /etc/rc2.d/S19cupsys: command not found

    everything else worked. But not my X6170.

    September 7, 2008 at 4:21 am

  8. @ treecheetahdolo:

    try doing ls /etc/rc2.d/ and look for the entry that says s**cupsys; it's different on every machine and I don't know why. Currently mine says s20cupsys I hope that helps!

    September 7, 2008 at 11:02 am

  9. treecheetahdolo

    @k33bz

    Doh! I found my right cups now, ty :P

    I ran the script flawlessly :) , And it didnt work. Trail and Error time.
    I had to go to System>Administration>Printing and reselect my device URI.
    Printing Works fine now.

    As an option i set up VirtualBox with XP as guest OS for full X6170 functionality..
    If you have a compatible OS for your X6170 use VirtualBox (Not the OSE version) http://www.virtualbox.org/

    Dont forget to run it as root
    sudo VirtualBox
    If you dont youll have problems with your USB attachments. If thats your connection type.

    September 8, 2008 at 1:05 pm

  10. The script works perfectly, however you have to make one further modification (in Ubuntu 8.10)

    Open up the Printer Configuration, right click on the X6100 series icon , select properties, then click Change next to Make and Model: (It probably says Text Only), from the top list (Database) select Lexmark, then Next, then select Z55

    Apply the changes, then click Print Test Page – and be amazed!

    November 28, 2008 at 8:28 am

  11. Thomas W Fiechtl Jr

    sudo /etc/rc2.d/S19cupsys restart

    Did not work. (Here, command not found; /etc/rc2.d/s19cupsys. S19cupsys does not exist. Changed “S19cupsys to S20cups.)

    Just a note to anyone else that copies and pastes this script to enable Lexmark printers. Mine is a Z52. I now get a message that my printer may not be connected.

    December 18, 2008 at 5:52 am

  12. acjac

    Gracias. Funciona correctamente, aunque es una pena que no funcione el escaner, no obstante ya es un gran paso que al menos se pueda imprimir.
    He dado tu enlace en mi blog.
    Un s2.
    ac

    December 19, 2008 at 12:27 am

  13. Dr. Knuckles

    Are you kidding me? So many website are saying just to give up on my old Lexmark and just buy a different brand…

    Well, it work like a charm! Thank you so much!!!

    February 14, 2009 at 4:54 pm

  14. Johnycomelately

    Cool Deal. It works! Thanks folks!!! A++++

    March 4, 2009 at 12:42 am

  15. Steve C

    I tried the script on Mythbuntu 9.04 with a Lexmark X6170 it creates the driver in /usr/share/cups/model , the machine goes through the motions of printing but nothing comes out.

    Script ended with /etc/rc2.d/s19cupsys. S19cupsys does not exist

    ls /etc/rc2.d/ showed S50cups rebooted machine and still no printing ?

    May 25, 2009 at 3:00 pm

    • I was able to get the x6170 to work under 9.04 but I did an upgrade not a fresh install. You will probably want to take a look at the permissions, I am not sure what ones, but I did have to change them to make sure my user had access to cups. I hope that helps, again sorry I couldn’t be more specific as I really don’t remember what permissions I changed to get it to work.

      I am planning on doing a clean install on another computer and I will document the steps I took this time and I will make a new post once it’s working.

      August 23, 2009 at 10:53 am

      • rocker2344

        i did a fresh install of 9.04. it works but wont auto add the driver to pinter i(if it even did that) i made a click-able install of your script for the newer users of ubuntu. i am planing to test for 9.10 beta (when ever that comes out)
        the only thing is don’t let the printer RUN OUT OF PAPER DURING A PRINT. it might not print again afterward. even after restart, driver remove, and/or disconnect of printer >_<

        EDIT: I fixed the comment for you.

        September 16, 2009 at 4:38 pm

  16. rocker2344

    here are direct downloads
    warning the deb is my first ever deb. idk if it will work and it will only go on x86 computers the will work. it is gui based and ment for gnome computers. just extract here and run the install.sh file (click twice) i would like to read comments on the deb if it worked :)
    DEB:
    http://www.fileden.com/files/2006/11/12/374242/lexmark-x6170_20090917-1_i386.deb
    TAR.GZ:
    http://www.fileden.com/files/2006/11/12/374242/lexmark%20×6170.tar.gz

    September 17, 2009 at 11:07 pm

    • i havn’t done a clean install in a long time, mostly because I haven’t had the time – with the upggrade the printer worked without a hitch until a recent security patch and now its dead again.

      also it won’t work correctly in win7 x64 there are some issues so i think it is about time to dump it and get a good network all-in-one

      January 24, 2010 at 12:11 pm

  17. rocker2344

    Your an eagle scout living in flroida? damn. meat the eagle from Miami. hey if ur in the o.a., are u in tipasa? i am in o-shot-caw. if so see ya at section conference

    September 19, 2009 at 4:13 pm

  18. Did anyone get the scanner to work?

    October 18, 2009 at 6:56 pm

  19. Ubuntu 8.10 – Lexmark X6170

    Change the script where it says:

    sudo /etc/rc2.d/S19cupsys restart

    to

    sudo /etc/rc2.d/S20cups restart

    and execute it the script.

    Then open firefox and go to:
    localhost:631
    Modify printer (if it appears in the list, if not installed it through System->Preferences->Printers)

    Continue
    Continue
    Make: Lexmark, continue
    Driver: Lexmark z55 v1.0-1 (en)

    Put user and password for root or your user.
    And that´s it!
    Worked at first try ;) I´m getting better.

    November 22, 2009 at 6:47 am

  20. Jim Snyder-Grant

    In 9.10 (Karmic) libstdc5++ is no longer in the standard repositories. One place to get it is from Jaunty:
    http://packages.ubuntu.com/jaunty/i386/libstdc++5/download
    Get the .deb from a convenient repository & the standard package installer will take care of the rest.

    December 19, 2009 at 12:17 am

  21. Jim Snyder-Grant

    Another 9.10 tip: On my machine, the successful restart line was:
    sudo /etc/rc2.d/S50cups restart

    That’s cups instead of cupsys, and S50 instead of S19 or S20.

    December 19, 2009 at 12:18 am

  22. Lee Wilkerson

    Nice job, but the script failed in Mint 8 kernel 2.6.31-16 on the last line:

    error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory

    What file do I need to edit so it searches for 6 instead of 5?

    FYI, had to change the S19cupsys to S50cups.

    ~Lee

    December 30, 2009 at 9:14 pm

  23. rocker2344

    Ok i followed your comments as you guys have posted. now that i got it working on a clean install of ubuntu 9.10 32 bit i will work on a gui script that people can click and run. my skills in programming and scripting has been improving. funny part is that i run windows 7 x64 and ubuntu in a vbox. (and vies versa) now i can only print from the vbox >_>

    February 7, 2010 at 1:51 pm

  24. @HORSEpower

    I don’t believe the scanner will ever work in Linux as it uses Windows to scan.

    @Rocker

    Glad to know the clean install is working. For me, the 8 to 9 upgrade broke it and now I can’t get it to work 100%

    Also, for Windows 7, the driver requires me to cancel and turn off the printer between every print job. Do you have the same issues?

    I’ve tried it on both Win 7 Pro and Enterprise. I’ve decided that once I run out of ink it’s time to buy a new AIO.

    February 10, 2010 at 3:42 pm

  25. Gary Dale

    Use /etc/init.d/cups restart instead of the various /etc/rc2.d/Sxxcupsys restart variations. They just refer back to the /etc/init.d script.

    On Karmic Kaola (and on later variations), libstdc++5 doesn’t exist. You can install it from http://packages.ubuntu.com/jaunty/i386/libstdc++5/download.

    August 4, 2010 at 5:40 pm

  26. Davide

    It worked perfectly on Ubuntu 10.04, too. I only had to change

    ‘sudo /etc/rc2.d/S19cupsys restart’

    into

    ‘sudo /etc/rc2.d/S50cups restart’ as instructed, because in the directory cupsys was replaced by cups.
    Other webpages’ instructions didn’t work, probably ’cause the
    following was in another order
    # extract the driver.
    tar -xvzf CJLZ55LE-CUPS-1.0-1.TAR.GZ

    # fix the sh script, the sh script is broken for newer systems.
    tail -n +143 lexmarkz55-CUPS-1.0-1.gz.sh > install.tar.gz

    # extract the contents produced by tail
    tar -xvzf install.tar.gz

    I was wondering if by using alien to convert the .rpm files into .deb files would make it for other installations on other machines.Should I write:

    # extract the tgz’s to / putting the files in their right place
    sudo tar -xvzf z55llpddk-2.0.deb -C /
    sudo tar -xvzf lexmarkz55-CUPS-1.0.deb -C /

    too???

    Thanks a lot!!!

    August 23, 2010 at 12:32 pm

  27. Davide

    @ Lee Wilkerson

    I downloaded libstdc5++ from http://packages.debian.org/lenny/i386/libstdc++5/download

    August 23, 2010 at 12:34 pm

  28. Antti

    Thanks, now my x6170 works on kubuntu 10.10. At first it didn’t work but when I changed URI from usb://lexmark/something_6100series to z55:/dev/usb/lp0 then it worked. Btw, driver’s URL is incorrect. I found the same driver from http://www.filewatcher.com/m/CJLZ55LE-CUPS-1.0-1.TAR.GZ.6602118.0.0.html. Direct link: ftp://ftp.itu.edu.tr/Mirror/Pardus/pisi/source/contrib-2009/CJLZ55LE-CUPS-1.0-1.TAR.GZ

    uname -a
    2.6.35-22-generic #35-Ubuntu SMP Sat Oct 16 20:36:48 UTC 2010 i686 GNU/Linux

    April 2, 2011 at 11:50 am

  29. Boudy

    I am running ubuntu 10.10
    I used this script to run my Lexmark X6170 all was good until: sudo /etc/rc2.d/S19cupsys restart
    I search /etc/rc2.d/ and i did not find any script with S**cupsys or S**cups
    What should i do?

    April 12, 2011 at 2:25 am

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>