[sane-devel] [Solved] Remote scanners stopped working after upgrade to Ubuntu 16.04

Jörn-Ingo Weigert jiweigert at gmail.com
Sun May 1 16:59:01 UTC 2016


Info for all who are affected that saned stopped working after upgrade to
Ubuntu 16.04 with using systemd (which is default in Ubuntu 16.04)

The problem is that saned stopped working after upgrade, cause the
saned.service is indicated as "marked" when you try to start it via:

`sudo service saned start´ or `systemctl start saned.service´.

The solution was to modify the related systemd files as the
delivered/generated files in the sane-utils package did not the job right.

1. Check that the RUN option in file /etc/default/saned is set to RUN=no
(As we dont use systemd AND NOT SysV Init!!)

2. I deleted the file /lib/systemd/system/saned.service as it was linked to
/dev/null (why?)

3. The file /lib/systemd/system/saned.socket should have this (unmodified)
content:

[Unit]
Description=saned incoming socket

[Socket]
ListenStream=6566
Accept=yes
MaxConnections=1

[Install]
WantedBy=sockets.target

4. The content of the file /lib/systemd/system/saned at .service should be
changed to:

[Unit]
Description=Scanner Service
Requires=saned.socket

[Service]
ExecStart=/usr/sbin/saned
User=saned
Group=saned
StandardInput=null
StandardOutput=syslog
StandardError=syslog
Environment=SANE_CONFIG_DIR=/etc/sane.d
# Environment=SANE_CONFIG_DIR=/etc/sane.d SANE_DEBUG_DLL=255

[Install]
Also=saned.socket

Where "StandardInput" should be set to "StandardInput=null"

5. To start saned on bootup use the command:

`systemctl enable saned at .service´

6. Check in /etc/sane.d/net.conf if "connect_timeout=60" is not commented
out and localhost / your servers ipadress is listed to check via
[simple-scan | xsane | scanimage -L] on the server, that the scanner is
available after a REBOOT.

7. Check if your client-ipadresses / -FQDN are listed in
/etc/sane.d/saned.conf otherwise they are not allowed to connect!

8. Check if the appropriate backend is enabled in /etc/sane.d/dll.conf for
your scanner-model

9. Follow the hints about the permissions you may have to set to the
usb-device / inside the udev-file: /lib/*udev*/rules.d/40-libsane.rules .

10. If you can scan successfully local on your server / pc  with one of the
scanner frontends then press your thumbs and reboot your server / pc

11. After reboot, `scanimage -L´ should list the USB-device
(usb:usbport:xxx) and the provided network device
(net:<ip>:<device_serial_number>) for your scanner

Check with `systemctl status saned.socket´ and `systemctl status
saned at .service´
if both are active/ready.


Now you should be able to scan remotly again

Hope this little advises help someone.

Ingo Weigert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20160501/b397d1d8/attachment.html>


More information about the sane-devel mailing list