Me and my Lexmark printer

I recently brought a new laser printer with double-side feature.

I was really happy, because friends just tell me “It work out-of-the-box with FreeBSD”.

I fact, it don’t. I had to make some hacks to make it working.

The printer

The Printer is a MB2236 (MB2200 series), double-sided and scanner.

It’s connected to my local network, with a fixed IPv4 address.

The drivers

Which Driver?

As excepted there is no FreeBSD drivers, only windows and Linux .deb and .rpm based distribution and a curious file Drivers files for CUPS-base systems. Let’s take it from this page.

I downloaded a Lexmark-AEY-PPD-Files.tar.Z.

Uncompress the file

Using the old school uncompress Unix utility, I obtain a .tar file which it’s easy to untar. The result is a folder named ppd_files.

Inside ppd_files folder

As you can guess, there is a lot of ppd files and a shell script This script won’t run on FreeBSD without modifications. I need to change some path to be conform to the FreeBSD hierarchy.

Modifying the script

In fact it was easy, just add /local on most path. In order to change /usr/share/footmatic into /usr/local/share/footmatic. And so on.

Run the script.

Once modified, the script run well \o/. That’s a first victory.

Modify some path

The file /usr/local/libexec/cups/filter/rerouteprintoption is a perl script with a Linux way shebang. Once again changing /usr/bin/perl by /usr/local/bin/perl solve a big trouble.

The PPD file

The script make a big part, but not all.

In /usr/local/share/ppd create a Lexmark folder and copy, from ppd_files/GlobalPPD_1.4/Lexmark_MB2200_Series.ppd into it.

Launch cupsd

Before launching cupsd we need to install the linux-c7 emulation packages:

 sudo pkg install linux-c7

And make something really bad on FreeBSD, make a change in the system filesystem by creating a symlink into /usr/lib:

 sudo ln -s /usr/local/libexec/cups /usr/lib

Make cups launch at boot time

 sysrc cupsd_enable="YES"

Start cupsd

 servie cupsd start

Create the printer

With your browser go to http://localhost:631 in order to create your printer.

  Create and admin the printer is not the goal of this blog post. You can find help directly on the cups page.


  This method does not use the system lpr print-system. I really try to find how to make it work but I can’t. All my files seems ok (/etc/printcap), I can ping the printer and send via netcat a file on it, but the lpr system does not allow me to print.

To conclude

It take me a long long time to find a way to make this printer print… Hope this can be help you.


Thanks to the FreeBSD-Questions mailing list members, who help me to find a solution.