scanbd for scanner buttons

I found an opensuse RPM download but only found an old closed thread on this. A couple of observations that may or may not be useful…

I think the RPM(s) offered here is missing a couple of files that may be needed:

“/etc/dbus-1/system.d/scandb_dbus.conf”,
“/usr/share/dbus-1/system-services/de.kmux.scanbd.server.service”
“/etc/xinet/sane-port”

Also, unless I did something wrong on download (and I guess it would also depend on how far the OpenSuse RPM wanted to go in setting things up), Leap 15.0 and 42.3 seem to give the same files.

Leap 42.3 and earlier use xinet and sane-port for sane. Leap 15.0 has removed xinet from the default installation and is instead using systemd.

It took me ages but I have had this working on 42.3 (until btrfs-transi messed my hard disk and I upgraded with the reinstall) and 15.0 for a Canoscan 900F MK scanner. One “gotcha” is that it is best to have the scanner on before starting scandb. It may not detect the scanner correctly otherwise.

Hope I don’t create or add to confusion but these are the steps I think (it’s quite hard after a lot of trial and error with 2 different systems to remember exactly) I think are needed for Leap 16

Make sure scanner is on before starting. I’d also suggest checking it does work on network before proceeding.

Install OpenSuse RPM.

Edit usr/lib/systemd/system/scanbm@service and change user and group to root.

From: https://sourceforge.net/projects/scanbd/ obtain:scandb_dbus.conf. Place in /etc/dbus-1/system.d/ - ensure user is root.
de.kmux.scanbd.server.service. Place in /usr/share/dbus-1/system-services

Disable saneport - #systemctl disable saned.socket

In “/etc/sane.d”:edit dll.conf. Ensure only net is uncommented
edit net.conf to enable localhost (or other hosts)

In “/etc/scandb”:copy net.conf from “/etc/sane.d”. Edit to enable the scanners you require, eg. pixma
copy saned.conf from “/etc/sane.d”
copy any other relevant config files, eg. pixma.conf from “/etc/sane.d”

You should now be ready to start the services.# systemctl enable scanbd.service
# systemctl start scanbd.service
# systemctl start scanbm.socket

I’d suggest a reboot at this point.
With luck, you should now be ready to experiment with the buttons
I have put my own relevant files from “/etc/sane/d” and “/etc/scanbd” folders at http://jonbanjo.com/temp/scanbd.zip. This set up is fractionally different as 2 scanners are accessible over the network.

On Mon 27 Aug 2018 12:36:03 PM CDT, Jon Freeman wrote:

Hope I don’t create or add to confusion but these are the steps I think
(it’s quite hard after a lot of trial and error with 2 different systems
to remember exactly) I think are needed for Leap 16

Make sure scanner is on before starting. I’d also suggest checking it
does work on network before proceeding.

Install OpenSuse RPM.

Edit usr/lib/systemd/system/scanbm@service and change user and group to
root.

From: scanbd download | SourceForge.net
obtain:
scandb_dbus.conf. Place in /etc/dbus-1/system.d/ -
ensure user is root.
de.kmux.scanbd.server.service. Place in
/usr/share/dbus-1/system-services

Disable saneport - #systemctl disable saned.socket

In “/etc/sane.d”:
edit dll.conf. Ensure only net is
uncommented
edit net.conf to enable localhost (or other hosts)

In “/etc/scandb”:
copy net.conf from “/etc/sane.d”. Edit
to enable the scanners you require, eg. pixma
copy saned.conf from “/etc/sane.d”
copy any other relevant config files, eg. pixma.conf from
“/etc/sane.d”

You should now be ready to start the services.

systemctl enable

scanbd.service

systemctl start scanbd.service

systemctl start scanbm.socket

I’d suggest a reboot at this point.
With luck, you should now be ready to experiment with the buttons
I have put my own relevant files from “/etc/sane/d” and
“/etc/scanbd” folders at http://jonbanjo.com/temp/scanbd.zip. This
set up is fractionally different as 2 scanners are accessible over the
network.

Hi
I’m guessing your talking about my build… First off I only plan to
use systemd, it’s been around long enough for adaptation to take
place… :wink:

The systemd service aliases de.kmux.scanbd.server.service, plus this
file does nothing… hence it’s not installed by default along with
associated files?

Can you try with only the dbus file and see how that goes, it also
needs tweaking for openSUSE since allow receive_ is default.


Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
SLES 15 | GNOME Shell 3.26.2 | 4.12.14-25.13-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

Yep, that’s the one.

OK. I have removed de.kmux.scanbd.server.service and rebooted. I can see no ill effects from doing this, ie. the buttons still work and I can still access the scanner. However, the "system integration read me does say.

Dbus setup for systemd

de.kmux.scanbd.server.service tells dbus that it does not need to start a
process when a message for scanbd is received on the message bus, but that
that responsibility is delegated to systemd.

So I don’t know if something might be happening behind the scenes that shouldn’t/needn’t be?

I must admit I’m not 100% clear on exactly what is needed as I went back to read me’s and added this file before finally getting things working. My last “blocker” was the owner/group in usr/lib/systemd/system/scanbm@service

I’ve just gone back to confirm that one. User/Group as they were will cause this when you try to scan:

worthy systemd[2840]: scanbm@0-172.23.41.12:6566-172.23.41.12:50270.service: Failed to determine group credentials: No such process

Hi
An updated package should be in the repository soon, give this a whirl and see how it goes.

OK. I’ve started with a clean install with Leap 15 on a different box this time so hopefully there would be nothing I might have changed getting in the way.

As far as I can see, there are just 2 permissions problems now:

1 . The owner/group in usr/lib/systemd/system/scanbm@service. I’ve tried an alternative solution which also works this time. That is to add “scanner” as a system group rather than editing the service file.

  1. I’d not mentioned it before but the /etc/dbus-1/system.d/scanbd_dbus.conf file has a policy user of “saned”. This needs to be changed to root (or perhaps some other fix). (without that, journalctl will show up: Failed to activate service ‘de.kmux.scanbd.server’).

Beyond that, I think that with those altered, all that would be needed are the /etc/saned.d, etc/scanbd files editing and enabling system services - all of which I guess would be the users tasks.

Hi
Updated rpm with ownership changes building now :wink:

Yep, seems fine to me now. Cheers.

Hi
Excellent, thanks for the help in getting the package all sorted :slight_smile: