summaryrefslogtreecommitdiff
path: root/INSTALL.linux
blob: a8518522cff540dbf8258473e120b6d69b84c6ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
Installation Instructions
*************************

1. Quick install:
=================

$ ./autogen.sh          # only if you just cloned the git repository
$ ./configure
$ make
$ make install


2. Step by step install on Linux >=2.6, with udev:
==================================================

2.1. Install with your preferred package manager:
     (a) the development environment for your Linux distibution
         - mandatory: gcc, make, kernel header files, autoconf, autoconf-archive
         - optional:  git
     (b) missing development packages
         - libusb-dev or libusb-devel or libusb-compat-devel
         - libjpeg-dev or libjpeg8-dev or libjpeg-turbo-devel or turbojpeg-devel
         - libpng-dev or similar

2.2. Get the latest SANE backend from git:
      You can download "daily git snapshot" from here:

      http://www.sane-project.org/snapshots/

      If you prefer to use git, you can fetch a read-only copy of the git tree
      with this command:

      $ git clone https://gitlab.com/sane-project/backends.git

      If you already are using a self compiled SANE backend and just fetched a
      new copy of the git tree or if you patched some source files, there is no
      need to follow the installation procedure again. You only need to make and
      install libsane:

      $ make && sudo make install

2.3. Configure, make and install latest SANE backend:
      We install a new SANE dynamically linked shared object library in
      /usr/local/lib beside your system's SANE library.

      $ ./autogen.sh          # only if you just cloned the git repository
      $ ./configure
      $ make && sudo make install

      If you want to change some settings for your SANE installation, please
      read the documentation on the website, the man pages and:

      $ ./configure --help

      Maybe you don't want to compile all scanners on your system, then you can
      select the backends you need, e.g. epson2 and fujitsu:

      $ ./configure BACKENDS="epson2 fujitsu"

      You can search for your scanners backend names here:

      http://sane-project.org/lists/sane-backends-cvs.html

2.3.1. SANE library:
      Register new installed SANE dynamically linked shared object library.

      $ sudo ldconfig -v | grep libsane
        libsane.so.1 -> libsane.so.1.0.25
        libsane.so.1 -> libsane.so.1.0.23

      This example shows that the system first find version 1.0.25 and then
      1.0.23. This is the correct order.

      If your system first find the old version and then the new installed one,
      then you must change the order for library paths in /etc/ld.so.conf or you
      must create the new configuration file /etc/ld.so.conf.d/1-sane.conf.

      $ echo "/usr/local/lib" | sudo tee -a /etc/ld.so.conf.d/1-sane.conf

      Then you must repeat this step.

2.3.2. Localization file:

      $ cd /usr/share/locale/<language>/LC_MESSAGES
      $ sudo ln -sf /usr/local/share/locale/<language>/LC_MESSAGES/sane-backends.mo .
      $ cd -

2.3.3. udev rules file:

      $ sudo cp tools/udev/libsane.rules /etc/udev/rules.d

      Reconnect your scanner to the USB bus to activate the new rules file.

2.3.4. Use the scanner with normal user rights:

      Your user must be a member of the group scanner.

      $ cat /etc/group | grep scanner
      scanner:x:107:<user>

      Create a new group scanner, if it doesn't exist.

      $ sudo addgroup scanner

      Add an existing user to group scanner.

      $ sudo adduser <username> scanner

      After this you must logoff and login again.

2.4. Test your scanner:

2.4.1. Check the used backend version:

      The programs must use the installed SANE backend version, e.g. 1.0.25.

      $ scanimage -V
      scanimage (sane-backends) 1.0.25git; backend version 1.0.25

      This example shows that backend and scanimage are version 1.0.25.

      $ /usr/bin/scanimage -V
      scanimage (sane-backends) 1.0.23; backend version 1.0.25

      This example shows that an old scanimage (1.0.23) uses the backend 1.0.25.

      If you want to use xsane, start xsane and check the used version with
      CTRL - i.

2.4.2. Access scanner with normal user rights:

      $ scanimage -L

      If your scanner isn't recognised here, try this:

      $ sudo scanimage -L

      If this works, your user doesn't have the rights to access the scanner.

      However, please check and redo the installation described above.
      If this doesn't help, you can ask the mailing list
      <sane-devel@alioth-lists.debian.net> for further support.

2.4.3. Testscan:

      $ cd ~
      $ scanimage > test.pnm


3. Advanced Installation Information
====================================

      Please read the documents INSTALL, README and README.linux.