DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 15th December 2018
brudan brudan is offline
Fdisk Soldier
 
Join Date: Dec 2018
Posts: 82
Default cannot scan with cupsd+saned

I have OpenBSD 6.4 installed on my T400 Thinkpad. I also own an HP Photosmart 7520 all-in-one printer/scanner/copier that is connected to my home wireless network. I can print over the network, but scanning applications (both simple-scan and xsane) crash with the following error as soon as scanning begins:

Code:
bruno@thinkpad:~$ simple-scan
dbus[3472]: arguments to dbus_connection_send() were incorrect, assertion "connection != NULL" failed in file dbus-connection.c line 3307.
This is normally a bug in some application using the D-Bus library.

  D-Bus not compiled with backtrace support so unable to print a backtrace
Abort trap
Maybe I missed a step when I set things up? Here is what I did:

1.
Code:
# pkg_add pkg_add -iv hplip hplip-common hpcups hpaio system-config-printer sane-backends xsane simple-scan
2. Launch system-config-printer and added my printer, using proper HPLIP driver.

3.
Code:
# vi /etc/rc.conf.local 
pkg_scripts="cupsd cups_browsed saned"
dbus_enable=YES
cupsd_flags=""
cups_browsed_flags=""
saned_flags=""
4. Reboot

5.
Code:
$ simple-scan
I also tried running the scanning applications as root, but same crash with same error message. I tried turning off the firewall (# pfctl -d) but that made no difference either. dbus is required by my desktop environment (MATE) and I can confirm that dbus is running:

Code:
bruno@thinkpad:~$ pgrep -fl dbus
47121 /usr/local/bin/dbus-daemon --syslog-only --fork --print-pid 5 --print-address 7 --session
79834 dbus-launch --autolaunch=bcdecefff7e7bef5828bb3715c08518a --binary-syntax --close-stderr
28903 /usr/local/libexec/cups/notifier/dbus dbus:// 
47181 /usr/local/bin/dbus-daemon --config-file=/usr/local/share/defaults/at-spi2/accessibility.conf --nofork --print-address 3
23497 /usr/local/bin/dbus-daemon --syslog --fork --print-pid 6 --print-address 8 --session
40727 dbus-launch --exit-with-session mate-session
I don't know where to go from here. Any ideas? I'd like to be able to scan over wifi. I know the printer/scanner is not the problem because it works when I'm booted into my Devuan partition. I think I missed a step in configuring OpenBSD for scanning over the network.
Reply With Quote
  #2   (View Single Post)  
Old 15th December 2018
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 6,707
Default

Hello and welcome!

While I don't do any scanning, I do have applications that require a running D-bus. You do, too. Unfortunately, your "dbus_enable" in your rc.conf.local script has no effect, and must have come from a third party "howto" which is multiple years out-of-date. You should remove it.

D-bus has two types of bus: the system-wide message bus, and a "session" bus. The system-wide bus is started via the "messagebus" rc.d(8) daemon. The session bus, which you apparently have running, is the one started by your .xsession script.

To enable the system-wide bus for your next boot, use # rcctl enable messagebus.
Reply With Quote
  #3   (View Single Post)  
Old 15th December 2018
brudan brudan is offline
Fdisk Soldier
 
Join Date: Dec 2018
Posts: 82
Default

Thank you, jggimi. Removing the pointless entry from rc.conf.local and enabling dbus with the rcctl command (which creates 'pkg_scripts=messagebus' in rc.conf.local) did the trick.

I would have never figured this out on my own. I'm glad I found this forum! Thanks again for the help.
Reply With Quote
  #4   (View Single Post)  
Old 15th December 2018
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 6,707
Default

Glad to be of some help!

The general consensus among OpenBSD Project members (and astute users) is to be very wary of third party guides. You can read them, but always verify their guidance, as it may be out-of-date, incorrect, or misleading.

In this case, the guidance you followed was 4 years out-of-date.
  • The rc.conf(5) provisioning subsystem changed from sourced to parsed in 2014, and that is the year that the *_enable flags went away.
  • The system-wide D-bus changed its name to messagebus in 2015.

Last edited by jggimi; 15th December 2018 at 04:37 PM. Reason: typo
Reply With Quote
  #5   (View Single Post)  
Old 16th December 2018
brudan brudan is offline
Fdisk Soldier
 
Join Date: Dec 2018
Posts: 82
Default

I will be wary in the future, thank you. Despite being a long-time GNU/Linux user, I'm a one-week noob on OpenBSD still reading through "Absolute OpenBSD" and needed a third party guide to get me started.

In case any folks read this post down the line with similar issue as me, I wanted to point out two things:

1. I found that running saned is not actually required for scanning. So having "pkg_scripts=cupsd cups_browsed messagebus" in /etc/rc.conf.local is enough.

2. It is not possible to add new printers through system-config-printer while messagebus is running (the "Add" button is grayed out). Before adding printers, run "# rcctl stop messagebus", then add the printer, then before scanning run "# rcctl start messagebus".

I hope this helps someone.
Reply With Quote
Reply

Tags
cups, network, sane, scanning

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Wireless scan output Mircho FreeBSD General 2 27th September 2013 12:15 PM
Bock Norton security scan! xmorg Other OS 8 15th February 2011 03:12 PM
Please scan softly - your router could crash J65nko News 2 5th July 2010 11:36 PM
cupsd and sshd slow mururoa FreeBSD General 3 27th August 2008 08:36 PM
scan to pdf PatrickBaer Other OS 4 22nd July 2008 12:14 AM


All times are GMT. The time now is 04:38 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick