This document descibes step by step how to install primaxscan and make it work.


Step 1 - compile environment

Of course you need a compiler in order to compile primaxscan. Normally it should be already installed on every Linux and Unix. You can check this by on the command line like this:
> cc -v
gcc version 2.95.4 20011002 (Debian prerelease)
> make -v
GNU Make 3.80
Something simmilar like this should be the output. If you get something like command not found then the program is missing. In this case you have to install it. All Linux distributions have packages for this. Install them with the setup tool.

Windows comes without a C compiler. You can try the Visual C compiler or the gcc for Windows. You will at least need the Cygwin library, so best is to use the complete Cygwin environment.

Step 2 - installation of libieee1284

The libieee1284 is a library that provides parallel port access on various operation systems like Linux, Solaris, Windows etc. It is therefore used by the scanner driver. You have to install the library and the header files. First you should look if your distribution alreay provides libieee1284. If so you can simply install the packages. Sometimes there are two. One with the binary files and one with the header. You must install both.

If you cannot get some precompiled packages you have to compile and install it yourself. At first get the latest version of the source package. Put it into some working directory and use the command line for the following steps:
> tar xjf libieee1284-*.tar.bz2
> cd libieee1284*/
> ./configure
> make
> su
Password: <enter root password>
# make install
# exit
After this the libieee1284 should be installed into /usr/local/. It also contains the program libieee1284_test. You can start it to check if all was successfull.

Step 3 - installation of SANE

Primaxscan provides two ways of accessing the scanner - a command line tool and a SANE driver. You can call the command line tool primaxscan and it will produce a tiff image. The sane driver is another -- more comfortable -- way of scanning. It allows to use the scanner with various nice SANE comaptible programs like XSane, GIMP, Staroffice and many more.

So you have to install the sane header for primaxscan in order to compile the sane driver. You should firdt look if your distribution provides a package. If so you should use it. If not, you have to compile it yourself. At first get the source package and put it into some working directory.

Follow this steps:
> tar xzf sane-backends*.tar.gz
> cd sane-backends*
> ./configure
> make
> su
Password: <enter root password>
# make install
# exit

Do the same for the sane-frontend package.

Step 4 - installation of primaxscan

Finally, after after having all needed libraries installed, you can compile primaxscan. Maybe you can get a binary package. If not you should compile it. Get the source code and do the same as you did with the other packages. There should be no problem if you have done all needed steps.

Step 5 - test of the driver

After having installed it you should test if it works. Type te following in the command line.

> su
Password: <enter root password>
# primax_scan -l on
Looks like a Primax Colorado Direct

Normally no error should be reported and the lamp of the scanner should be on. You can turn it off with primax_scan -l off.

So if it works, you can use the command line tool for scanning. If this is enough for you, you can stop reading here and life happy. But you can go on and use the sane driver with all it's advantages.

Step 6 - configuration of the sane driver

At first you have to activate the primax driver. Therefore you have to edit the file /etc/sane.d/dll.conf. Simply add a line containing primax.

Content of /etc/sane.d/dll.conf

This allows you to use the sane driver. But there are some disadvantages. The driver requires root privilegs. So you can us it by running the frontends like XSane as root. This should work but of course you don't run normal programs as root. So what is to do?

One possible way for Linux with kernel 2.4.x or higher is to change the permissons of /dev/parport0. If you don't know how to do this - read the manpage of chmod.

If you don't have Linux running you can use the sane network interface. This uses a program called saned. It allows to access the scanner via the network interface. You don't need a real network but you can connect always connect to your computer. So you start the saned that uses the primax driver. The frontend does not load the primax driver but the sane net driver that connects through the local network to the saned. Confused? Have a look at the picture below.

You have to set up a connection to localhost. I will not explain how to install and configure the saned. Please read the saned manpage and the sane-net manpage.

  ordinary user     root permissions  
XSane   net backend via TCP/IP saned   primax driver
  port 6566

If you still don't know how to do this or there are some problems, feel free to contact me. You can also send me a mail if you only want to say that it worked.