Tag Archives: ml-2015

Samsung ML-2015 with CUPS 1.4 on Arch Linux

As you might know (yeah, right), I am a proud owner of a Samsung ML-2015 laser printer, this paper-munching, smoke-exhausting hellish machine (which is, in fact, an ML-2010 re-branded for the russian and post-soviet states, so that Samsung can provide localised support).

Updating to CUPS 1.4 on Arch Linux kind of broke the printer. It’s still visible in the CUPS interface, but doesn’t print anything (the jobs are on hold, “waiting for the printer to become available”). The kernel is 2.6.31.4, usblp module disabled as per Arch newsfeed suggestion.

The solution was simple – getting to the “Printers” tab in the web interface and modifying the printer to use a different connection (the one without “usb://”).

Advertisements

Samsung ML-2015, Arch Linux

This is a lot easier than in FreeBSD. Just install cups and splix. They have all the files needed.

It does mean you’ll have installed files for printers you don’t need, and space is always a consideration.

Simple instructions on installing the Samsung ML-2015 printer in FreeBSD

I’ve written about this once <broken link> already. Now, that time the whole thing got a little hectic, which was somewhat related to the promille phenomenon. Anyway, this time it’s gonna be a little simpler.

The instructions presented here are on installing CUPS for Samsung ML-2015. ML-2015 is (basically) the same as ML-2010.

These instructions will also be useful with other Samsung printers, since the printing language (and drivers as a consequence) are disgustingly similar for Samsungs. (How do I know? I don’t. I’m a mockingbird.)

I assume you know how to use pkg_add, portupgrade (my case) or other port managing utility. If not, just ask.

1) Install cups-base. You probably have this. Add to /etc/rc.conf:

enable_cupsd="YES"

(Re)start CUPS. Check localhost:631 if it works. If you try installing a printer in CUPS now, Samsung won’t be listed yet.

2) Install splix.

ports% cat /usr/ports/print/splix/pkg-descr
SpliX is a set of CUPS printer drivers for SPL (Samsung Printer Language)
printers. Below is a non-exhaustive list of currently supported printers. Note
that only SPL2 and SPLc printers are currently supported!
...

At this point if you try installing a printer in CUPS, you will have Samsung listed.

3) Install cups-pstoraster.

ports% cat /usr/ports/print/cups-pstoraster/pkg-descr
...
This distribution is based on GNU Ghostscript and provides the "driver" for
CUPS that supports non-PostScript printer drivers within CUPS.
...

Samsung printers don’t support PostScript, at least to my severely limited knowledge they don’t.

Restart CUPS.

4) Modify ulpt0 permissions.

cd /dev
/dev% ll ulpt0
crw-r--r-- 1 root operator 0, 121 Jun 13 22:00 ulpt0
/dev% sudo chown root:cups ulpt0
/dev% sudo chmod g+w ulpt0

Now for some elaboration. You might wonder why not just add user cups to group operator. The answer is simple: security.

Fact is, cups only needs access to the printer, and that’s it. The operator group, on the other hand, has access to a lot more: other USB devices, hard disk devices, and hell knows what other system files in whichever depths of /usr or /var or /etc.

Now, you just do what you think is better. If you want to add cups to operator – then do it. After all, root is thy lord. I’m just telling what I did.

EDIT: if you don’t take measures, settings to /dev will be reset on restart.

5) Start the printer if not already done (from CUPS’ administrative interface). Print a test page.

6) If you smoke, have a smoke. If you drink beer, have a beer. If you drink coffee, have another coffee. If you lapdance, have a lapdance. If you fuck children for breakfast – go kill yourself.

Credit:

Wouldn’t have figured this all out without this BSD forums thread and this blog post.

Samsung ML-2015 printer in FreeBSD: use CUPS, not LPD

Short: see this post.

Long:

Was installing the printer yesterday. Read the FreeBSD handbook to get the basic hang of it, then proceeded according to instructions. Guess what? Exactly.

The printer was recognized straight after sticking the USB plug in, powered up, but didn’t print anything when sent

lptest > /dev/ulpt0

It didn’t put anything in the printing spool either. Only if I took the USB wire out of the port it would. But then after sticking it back in, the job would magically disappear.

The printer itself was working fine, that I checked by printing the default test page by pushing down the Cancel button for 2 seconds (as said in the manual). By the way, the manual had more technical information on setting up in UNIX than you would typically expect to get from a gnarly corporate consumer manufacturer.

Anyway, after some research I found out that Samsung ML-2015 doesn’t really support PostScript. I don’t have the links to back it up, though, since I was sleep-deprived and didn’t take any notes.

I installed a ton of ports, like foomatic-filters, foomatic-db, I don’t remember, – trying to find a PPD (PostScript Printer Description) for my printer. My actions were beginning to get more and more chaotic (or should I say: stochastic?).

Long story short, I dropped FreeBSD’s LPD and switched to CUPS. The link I put at the top of this post was most helpful. It solved my worries.

I had to check the CUPS log file a few times. For example, /dev/ulpt0 was inaccessible to CUPS. Or pstoraster didn’t work for some reason, so I had to compile it from ports manually.

(Yes, you got it. That last sentence was a joke.)