Samsung ML-1520 printer with Debian

This is how I got my Samsung ML-1520 laser printer working on Linux (Debian unstable), but the same basic formula should also work for some other Samsung models. It's based on a forum post by slackhack, but I had to make one small change described below.

First install the necessary Debian packages:

cupsys
Includes the CUPS server
cupsys-bsd
Various programs to control CUPS, including the classic lpr which you'll need to print from certain programs (including acroread)
cupsys-client
I haven't needed this yet, but it looks like it includes some useful programs
cupsys-driver-gutenprint
The printer drivers, although now that I think about it this is probably unnecessary too, since it doesn't actually contain the driver I'm using

You'll then need to download the Samsung driver package. Go to the Samsung support page and search for your printer model, and get the Linux driver. It'll be a tarball with a long filename (I'm using one called 20050422162219968_lpp-1.1.7-27-i386.tar.gz).

I didn't use the Samsung package's install system, since it seems only to be necessary to install a few of the files. You'll need the PPD files, or at least the one for your printer model. I just installed them all. Also, at least one program from the image/bin/Linux/x86/filters directory is required. Slackhack's forum post suggested copying pscms and ppmtosplc, although my version of CUPS with my model's driver seemed to require ppmtospl2 instead of the latter. I installed all three just in case.

So to do all that, the following commands should be sufficient, assuming you're using sudo to get root and are currently in the directory where you unpacked the Samsung driver tarball:

sudo mkdir /usr/local/samsung
sudo cp -R image/ppd /usr/local/samsung/
sudo mkdir /usr/local/samsung/filters
cd image/bin/Linux/x86/filters
sudo cp ppmtospl2 ppmtosplc pscms /usr/local/samsung/filters/

CUPS will look for ppmtospl2 in a different place, so put a symlink there for it as follows:

cd /usr/lib/cups/filter
sudo ln -s /usr/local/samsung/filters/ppmtospl2
sudo ln -s /usr/local/samsung/filters/ppmtosplc
sudo ln -s /usr/local/samsung/filters/pscms

(which steps on Debian's toes a little, but it won't notice.)

To make ppmtospl2 (or ppmtosplc) actually work you'll need to create a special XML configuration file called /etc/linuxprint.cfg with contents like this:

<?xml version="1.0"?>
<linux root="/usr/local/samsung" system="cups">
  <option name="ghostscript" value="/usr/bin/gs"/>
  <printer ppd="ppd/C/ML-1520spl2.ppd" queue="laser">
    <option name="Resolution" value="600"/>
    <option name="Duplex" value="None"/>
    <option name="PageSize" value="A4"/>
  </printer>
</linux>

You might need to change the paper size and resolution, but those values work for me. The name of the queue (laser in my case) appears to be the name of the printer in CUPS.

Ok, now you just need to configure CUPS through its web interface a http://localhost:631/. Add the printer, setting the queue name you used in the XML file. If, as in my case, it's a USB printer, then its model should be listed when CUPS asks you what port the printer is plugged in to. Well, providing it is turned on and plugged in of course. When CUPS asks you for a driver, choose to provide your own PPD file, and select the appropriate one from the Samsung tar.

When the printer is added, press the Set As Default button if it's your only printer.

You should now be able to print a test page. If it doesn't work you can check the error log by tailing /var/log/cups/error_log, but important messages might not get logged unless you ask for extra information. For example, there was no log message for me when the printing didn't work due to /etc/linuxprint.cfg being missing, until I cranked it up to debug level. You can do that by changing the LogLevel directive in /etc/cups/cupsd.conf and restarting the cupsys service. Normally it should probably be logging at warn.

< Utah Teapot spotting? | Subversion talk >

Miniblog

(nuggets of inanity)

Tuesday Apr 24th 2007, 16:54 »
Just took the annual web design survey that AListApart do. I don't realy consider myself to be a web designer, but I have been doing a lot of HTML and CSS lately.
Monday Apr 23rd 2007, 18:23 »
Strange, there appears to be a bare-knuckle boxing match going on in the field outside my flat. Wish they wouldn't make so much noise about it.
Thursday Mar 1st 2007, 18:47 »
“In its written form, Hebrew has no vowels, making it the ideal language for texting.”
—Said in jest on some Radio 4 programme just now.

Archive: 2007 · 2006 · 2005 · 2004
Feed