FreeBSD + CUPS + Epson NX130 (SX130)

Hello there!

I decided to buy a printer. Actually my choice was Epson Stylus S22, but the salesman said all ones had been sold and recommended me just the same model but with scanner (Epson NX130). The model has the same cartridge type and printing head.
So, I bought Epson NX130 and CISS system for it as well. Also I asked to fill CISS with a pigment inks.
As you may know, pigment inks dry faster then dye-based inks and you need print at least every other day in full color.
Let’s start.

What I have:
You will need to install cups (my choice is to install it from ports)
# cd /usr/ports/print/cups-base && make install clean
Please take a look into config (you will need to make sure that you have unchecked LIBUSB). It’s really important!
After installation you have to make some configuration actions.
First of all you have to find linux driver for your printer.
Fortunately Epson provides at least drivers for new models. Just go to the Epson’s website and select necessary driver (
Next you need to install linux_base (this is necessary to make ppd_filter operational, because it has been written for linux)
# cd /usr/ports/emulators/linux_base-f10/ && make install clean
And now you’re ready to install driver (rpm package) into linux base enviroment

# cd /compat/linux
# rpm2cpio -q < /path/to/epson-inkjet-printer-201101w-1.0.0-1lsb3.2.i486.rpm | cpio -id

Let’s check which libs we need to install into linux enviroment
# ldd /compat/linux/opt/epson-inkjet-printer-201101w/cups/lib/filter/epson_inkjet_printer_filter

You’ll get something like this:

# /compat/linux/opt/epson-inkjet-printer-201101w/cups/lib/filter/epson_inkjet_printer_filter: => /lib/ (0x28072000) => /usr/lib/ (0x28078000) => /usr/lib/ (0x28168000) => /usr/lib/ (0x28181000) => /usr/lib/ (0x281bb000) => /lib/ (0x281de000) => /lib/ (0x281f8000) => /lib/ (0x28222000)
        /lib/ (0x2804e000) => /lib/ (0x2839a000) => /usr/lib/ (0x283a8000) => /usr/lib/ (0x28401000) => /lib/ (0x28429000) => /lib/ (0x2843d000) => /usr/lib/ (0x28471000) => /usr/lib/ (0x28515000) => /usr/lib/ (0x28543000) => /usr/lib/ (0x285e2000) => /lib/ (0x28607000) => /usr/lib/ (0x2860b000) => /lib/ (0x2861c000) => /lib/ (0x28697000) => /usr/lib/ (0x2869b000) => /lib/ (0x286a5000) => /lib/ (0x286a9000) => /lib/ (0x286c0000)

To check which lib you have to install, please run
# /compat/linux/opt/epson-inkjet-printer-201101w/cups/lib/filter/epson_inkjet_printer_filter
You’ll get an error (missed library or something like this)
Please be patient, next you will need to install missed packages into your linux enviroment.

Go to" and find Package that you have to download and install (e.g.
Please be careful, now you need to download only Packages (not updates!) and only for FC10 (Fedora Core 10).

Try doing that until you run it without library error.

Some preparation configuration:
1. Add in /etc/rc.conf:


2. Create /etc/devfs.rules and put strings:
add path 'unlpt*' mode 0660 group cups
add path 'ulpt*' mode 0660 group cups
add path 'lpt*' mode 0660 group cups
add path 'usb*' mode 0770 group cups
add path 'ugen*' mode 0660 group cups
add path 'da*' mode 0660 group wheel
add path 'cd*' mode 0666 group wheel
add path 'xpt*' mode 0660 group wheel

3. Make sure that you have added root into cups group. Check it in /etc/group
And now, you are ready to configure CUPS.

# cd /usr/local/etc/cups/
# cp cupsd.conf.default cupsd.conf

To make cups accessible not only from localhost, you’ll need to change <Location /> vaule
<Location />
  Order allow,deny
  Allow all

Connect your printer, make sure that you have it in

# usbconfig | grep -i epson
ugen4.5: <EPSON Epson Stylus SX130 Series EPSON> at usbus4, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE

Than open browser and go to http://server_ip:631
Add printer (Administration->Add Printer->USB Printer)
When you’re prompted to add ppd file into configuration, just put necessary .ppd file from RPM linux driver.
Take a look into .ppd file, you may have to change *cupsFilter: parameter with correct filter path.
The last step is to name your printer friendly (like epson)

Wait a bit, we are almost finished 🙂

So you are ready ready to configure clients (in my case it was Windows 7)
You need to install driver into system, add printer and chose remote connection (mine was http://server_ip:631/epson)

Yahoo! Try to print test page.


As I said above I’ve filled pigment inks in my CISS, if you have pigment inks too, you need to print full color page at least every other day. It is necessary if you don’t want your printing head get dried.

Goodies and automations:
My lazy essence doesn’t want to keep in mind the schedule of printing, so I wrote a cron script that goes to , takes photo-of-the-day and sends it directly to the printer.

PHP Code:

$pattern = '/(<img src=\")(?P<img>.+)(\"  width=\"990\" height=\"742\")/';
preg_match($pattern, $data, $matches);
@print ($matches[img]);

Sheell script:


/usr/local/bin/wget -q `/usr/local/bin/php /usr/home/virtual-hosts/` -O - | /usr/local/bin/lpr -P epson

Install cron rule

# crontab -u zeon -e
22      13      */2     *       *       /home/zeon/bin/

As result, the cron will run this script every other day at 13:22 (1:22 pm).

4 thoughts on “FreeBSD + CUPS + Epson NX130 (SX130)

  1. What I mean is if I would be able to scan a document from scanner to my computer???

Leave a Reply

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