Linux sane network scanner

Блог «Познай Linux!»

SANE это API, обеспечивающий стандартизированный доступ к сканерам различных производителей в Linux. Если ваш сканер поддерживается SANE, то можно организовать доступ к сканеру по сети. Не буду описывать процедуру установки сканера, опишу какие надо сделать изменения в конфигурационных файлах, чтобы получить доступ к установленному сканеру по сети.

На машине, с подключенным сканером (назовем его «сервер»), надо установить SANE выполнив в командной строке:

Для доступа к сканеру по сети надо внести пользователя saned в группу scanner и lp (для некоторых МФУ):

Вывод команды покажет наименование сканера и порт к которому он подключен. SANE не может работать как демон(сервис) самостоятельно, поэтому необходимо установить сервер openbsd-inetd , который будет обрабатывать входящие tcp соединения на определенном порту и запускать SANE.

В файле /etc/inetd.conf надо прописать как будут обрабатываться соединения, на прописанном ранее порту:

В файле /etc/sane.d/saned.conf прописываем IP сеть, в которую будет раздаваться сканер, например:
В файле /etc/sane.d/net.conf указать IP адрес компьютера с подключенным сканером, например:

Чтобы изменения вступили в силу надо пользователю выйти и войти в систему. После этого проверить доступ к сканеру выполнив от имени пользователя в командной строке:

Если вы получили вывод, то теперь можно воспользоваться программой xsane , в Ubuntu она расположена в меню «Приложения->Графика->Программа для сканирования изображения».
К сканеру можно обращаться и с Windows машин, для этого можно воспользоваться windows версией xsane или интерфейсом SaneTwain.

При написании статьи использованы материалы с Linux.com.

Также можно почитать:

9 коммент.:

Кстати, я довольно долго sanetwain юзал через вайн=) привычка, всё в одном окне. Если бы ещё кто-нибудь подсказал, как его к фотошопу (тоже из-под вайна) привязать.

Большое спасибо за мануал! Все заработало без каких-либо проблем.

11,10 работает но виснет после определенного количества сканирований(

Проверить доступность сканера можно выполнив команду:

проверять с какой машины? С клиента или с сервера?

Проверить доступность сканера можно выполнив команду:

проверять с какой машины? с клиентской или с сервера?

Читайте также:  Arch linux bluetooth headphones

Проверять видимо с сервера, а потом, после настройки клиента можно и на клиентской стороне.

И пакет sane на серверной машине не нужен, я подозреваю. Проверю, скажу точно.

Все понятно Как раз то что нужно!

адениумы где купить свежие семена
адениум обесум семена и саженцы

Источник

Introduction

SANE (Scanner Access Now Easy) is the linux way of scanning. sane supports a great many scanners, and the community around SANE adds support for more scanners all the time. By and large, most supported scanners are plug and play simple (plug them in and your ready to scan). However, some scanners will require manual installation (see the sane Troubleshooting guide for help with manual installation).

About this tutorial

This tutorial will walk you through the basic set up of sane with plug and play scanners.

Assumptions

  • This set up assumes that we are on a small home or office network and are behind a firewall.
  • Our LAN is an IP4 network on subnet 192.168.0.0/24 (192.168.0.0 — 192.168.0.255)
  • Our Ubuntu box is 192.168.0.23
  • Our USB scanner is located at libusb:001:003
  • Our SCSI scanner is at /dev/sg1
  • Our network scanner is at 192.168.0.15
  • Our scanner uses the example backend (example-backend)

Setting up SANE

Step 1: Installing sane

Sane should be installed as a base package in Ubuntu 11.04 and later. You can run the following command to install it (if it’s already installed, it will do nothing):

apt-get install sane sane-utils libsane-extras xsane

This will also install the xsane front end. Note that some scanners will require other packages to be installed. Those are covered in the sane Troubleshooting guide.

Step 2: Test your scanner

Run following command to test your scanner:

Applications > Graphics > XSane

You should see a dialog for scanning from your scanner. If SANE says that it can’t find the scanner, you will need to do a manual installation.

Manual Scanner Installation

Most of the time, the back-end for your scanner will be enabled by default. For some scanners, you will need to enable it manually. This usually involves enabling the back-end, and then adding your scanner to it.

For detailed instructions on manual installation, see the Ubuntu SANE Troubleshooting guide.

Installing Network Scanners

Many network scanners work with sane in one of two ways. The scanner can have its own sane server, or it can be supported by a backend.

Читайте также:  Автозагрузка пользователя astra linux

Scanners with AirScan Support

Most modern scanners come with support for either Apple AirScan / AirPrint scanning (the official protocol name is «eSCL») OR Microsoft WSD, aka «Web Services for Devices».

These are both «driverless» scanning protocols and SANE supports both of these protocols with its sane-escl (eSCL only)and AirScan (eSCL and WSD) backends.

Both backends support network and USB scanners.

Scanners with their own SANE servers

Scanners with their own SANE server, as well as scanners connected to a computer running the saned service can be easily added to other computers on the network by enabling the NET backend and adding the servers IP address in the net.conf file.

1. To enable the net backend, edit the file /etc/sane.d/dll.conf by running the following command:

sudo gedit /etc/sane.d/dll.conf

Within that file, you need to uncomment the NET backend. In our case, change the line that reads

2. We need to add our server or servers to the /etc/sane.d/net.conf. You can edit that file as root using this command:

sudo gedit /etc/sane.d/net.conf

3. Add your SANED server address as an IP4, IP6, hosts or DNS resolvable name

192.168.0.15 ::1 localhost scan-server.office.lan

Scanners with SANE backends

SANE Backends are available for a number of network scanners. In general, all these need is to specify the protocol, address and port of your server.

1. Our example backend configuration file is /etc/sane.d/example.conf. You can edit that file as root using this command:

sudo gedit /etc/sane.d/example.conf

3. Find the line that reads:

and after it add the protocol, address and port of your network server. In our case, its

4. After you have added that line, save the file and close gedit.

Sharing your scanner with SANE

SANE allows you to easily share scanners across a network. To set up the sharing of your scanner using saned, see [https://help.ubuntu.com/community/sane.d%20tutorial]

Third Party Drivers

Many of the most popular scanners require the installation of third-party drivers.

Brother Scanners

Brother offers proprietary SANE drivers for its family of network scanners and multi-function devices.

Читайте также:  Значки в линукс минт

To install, visit [http://support.brother.com/g/s/id/linux/en/download_scn.html] and download the proper driver for your scanner (brscan, brscan2, brscan3 or brscan4) and your computer (32 or 64 bit) to your desktop. NOTE: You need the 64 bit .deb version!

Run the following command to install the driver you just downloaded (note: the example below is for the brscan2 package. You will have to change the file name to match what you downloaded)

dpkg -i --force-all brscan2-0.2.4-0.i386.deb

After you have installed the scanner driver, you need to run the Brother SANE Configuration tool. When you run that tool, you need to append the device name (what you want to call it), the model number and the ip address of the scanner. In the example below, we are using the «brsaneconfig2» tool, we calling the scanner «MyScanner», the model we are installing is the MFC-660CN and the IP address is 192.168.0.15.

brsaneconfig2 -a name=MyScanner model=MFC660CN ip=192.168.0.15

NOTE: One issue that confuses a lot of users is the difference between brscan, brscan2, brscan3, brscan4 and brscan5. Each of these tools supports a different set of scanners, and you need to download the appropriate package for your scanner. Because it is possible to install many different scanners, you need to run the proper version of the brsaneconfig tool. If your scanner is supported by the brscan3 tool, you will need to run the brsaneconfig3 tool to configure it.

NOTE: Many older Brother Scanners (brscan, brscan2, brscan3) will need some manual configuration. See the Ubuntu SANE Troubleshooting guide for specific instructions on troubleshooting these scanners using the symlink and udev rules.

HP Scanners

The majority of HP scanners are supported by the hplip project. Setting up an HP scanner can be done using the following command:

This wizard will set up your scanner for use with SANE.

Samsung Scanners

Samsung scanner users are advised to install drivers via the The Samsung Unified Linux Driver Repository. See [http://www.bchemnet.com/suldr/index.html] for information on the SULDR project.

sane (последним исправлял пользователь 5g3-steven-7tv 2020-10-28 17:20:13)

The material on this wiki is available under a free license, see Copyright / License for details
You can contribute to this wiki, see Wiki Guide for details

Источник

Оцените статью
Adblock
detector