DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 1st May 2019
brudan brudan is offline
Fdisk Soldier
 
Join Date: Dec 2018
Posts: 82
Default what is starting dbus at boot?

I'm on OpenBSD 6.5. I formerly used MATE then LXQt, but decided to go minimal and am using fluxbox now. I have only 45 manually-installed packages.

Much to my surprise, after booting and starting nothing but xenodm and fluxbox, I find that dbus is running on my system, with a PPID of 1 no less:

Code:
$ ps axj | grep dbus
bruno    86912     1 38482                0    0 S     ??    0:00.01 dbus-launch --autolaunch 2299bb7b1f0caa71f2fcc6bd5cc87ad3 --binary-syntax --close-stderr
bruno    87638     1 87638                0    0 Ss    ??    0:00.04 /usr/local/bin/dbus-daemon --syslog-only --fork --print-pid 5 --print-address 7 --session
bruno    26426  9491 87638                0    0 S     ??    0:00.10 /usr/local/bin/dbus-daemon --config-file=/usr/local/share/defaults/at-spi2/accessibility.conf --nofork --print-address 3
This is my /etc/rc.conf.local:
Code:
sshd_flags=NO
pf=NO
apmd_flags=-A
xenodm_flags=
I'm blindsided by the fact that dbus is started at boot, and that its PPID is 1 (i.e., it is being started by init). I have no idea why but would like to find out. Can you please help me figure it out?
Reply With Quote
  #2   (View Single Post)  
Old 1st May 2019
Head_on_a_Stick's Avatar
Head_on_a_Stick Head_on_a_Stick is offline
Real Name: Matthew
Bloaty McBloatFace
 
Join Date: Dec 2015
Location: London
Posts: 136
Default

How are you starting fluxbox? Post the content of ~/.xsession

I'm using dwm:
Code:
Puffy:~$ ps axj | grep dbus
empty    29042 34050 71644                0    2 S+p   p0    0:00.01 grep dbus
Puffy:~$
No dbus for me
__________________
Linux is for people who hate Windows. BSD is for people who love UNIX.
Reply With Quote
  #3   (View Single Post)  
Old 1st May 2019
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 6,681
Default

Daemons started by rc(8) are announced on the console and in /var/log/messages.
Reply With Quote
  #4   (View Single Post)  
Old 1st May 2019
Prevet Prevet is offline
Shell Scout
 
Join Date: Oct 2017
Posts: 110
Default

Tor browser does it for me.
Reply With Quote
  #5   (View Single Post)  
Old 1st May 2019
brudan brudan is offline
Fdisk Soldier
 
Join Date: Dec 2018
Posts: 82
Default

Quote:
Originally Posted by Head_on_a_Stick View Post
How are you starting fluxbox? Post the content of ~/.xsession
Right on! If I start *just* fluxbox in .xsession, no dbus.

However, my .xsession also starts three little shell scripts I wrote that use x11/yad to put some icons (network monitor, vpn monitor, battery monitor) on my systemtray. yad is the culprit!

Is there a way for a shell script to put icons in the systemtray that does not involve dbus? One of the reasons I ditched MATE and LXQt in favor of fluxbox is to avoid dbus.
Reply With Quote
  #6   (View Single Post)  
Old 1st May 2019
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 6,681
Default

If the tray you are using requires status notifications, then it appears that d-bus is a dependency for inter-process communication.

https://www.freedesktop.org/wiki/Spe...sNotifierItem/
Reply With Quote
  #7   (View Single Post)  
Old 1st May 2019
brudan brudan is offline
Fdisk Soldier
 
Join Date: Dec 2018
Posts: 82
Default

Thank you, jggimi. I think that's probably the case. Good to know--at least I won't chase my tail looking for a dbus-free replacement for yad that does not exist.

Oh, well. At least now I know what is responsible for starting dbus on my system.

Thank you all!
-Bruno
Reply With Quote
  #8   (View Single Post)  
Old 1st May 2019
Head_on_a_Stick's Avatar
Head_on_a_Stick Head_on_a_Stick is offline
Real Name: Matthew
Bloaty McBloatFace
 
Join Date: Dec 2015
Location: London
Posts: 136
Default

Quote:
Originally Posted by brudan View Post
Is there a way for a shell script to put icons in the systemtray that does not involve dbus?
Not sure about a shell script but you could try sysutils/tray-app for the battery and volume icons, they don't call up dbus on my machine.

Start them with these lines in ~/.xsession:
Code:
/usr/local/libexec/tray-app/battery &
/usr/local/libexec/tray-app/sound &
__________________
Linux is for people who hate Windows. BSD is for people who love UNIX.
Reply With Quote
  #9   (View Single Post)  
Old 1st May 2019
brudan brudan is offline
Fdisk Soldier
 
Join Date: Dec 2018
Posts: 82
Default

Thank you, Matthew. I'll check it out.

But that still leaves me with another problem: firefox is my web browser.

I tried launching it with 'dbus-launch --exit-with-session firefox' but dbus lingers on after I've closed firefox.

Is there a way to ensure that the dbus instance launched for firefox actually goes away once firefox closes? I thought '--exit-with-session' would accomplish this, but it seems I'm mistaken.
Reply With Quote
Old 1st May 2019
Head_on_a_Stick's Avatar
Head_on_a_Stick Head_on_a_Stick is offline
Real Name: Matthew
Bloaty McBloatFace
 
Join Date: Dec 2015
Location: London
Posts: 136
Default

Quote:
Originally Posted by brudan View Post
I thought '--exit-with-session' would accomplish this
Not according to dbus-launch(1)

Try
Code:
dbus-run-session firefox
(Untested.)

Or use www/chromium instead — that doesn't invoke dbus for me and Theo says it's better than FF in respect of security considerations.
__________________
Linux is for people who hate Windows. BSD is for people who love UNIX.
Reply With Quote
Old 1st May 2019
brudan brudan is offline
Fdisk Soldier
 
Join Date: Dec 2018
Posts: 82
Default

Code:
dbus-run-session firefox
YES! That's what I was looking for. No lingering dbus after firefox closes.

Interesting the Leader would say that. My assumption has always been that anything with ties to Google is suspect. But Theo would certainly know better than me
Reply With Quote
Old 1st May 2019
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 6,681
Default

Each of these major browsers takes a different approach to software architecture. That difference enables the OpenBSD port of chromium to use pledge(2) and its related unveil(2) security technologies.

FF is not all bad news. It applies W^X for security.
Reply With Quote
Old 5th May 2019
brudan brudan is offline
Fdisk Soldier
 
Join Date: Dec 2018
Posts: 82
Default

Just a quick followup: I found that between them, x11/Xdialog and x11/dzen2 do everything I needed x11/yad to do, so I no longer need yad.

By getting rid of yad and running firefox using Head_on_a_Stick's tip in post #10, now dbus only runs on my system while firefox is running.

Problem solved
Reply With Quote
Reply

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
starting smbd at boot EverydayDiesel OpenBSD General 5 4th June 2015 10:53 PM
dbus and avahi? kerasi OpenBSD Packages and Ports 2 8th January 2015 07:21 PM
Named not starting on NetBSD boot Antimidget NetBSD General 2 27th August 2009 10:57 PM
dbus-daemon lumiwa FreeBSD General 2 2nd October 2008 12:05 AM
Daemon Process not starting on boot map7 FreeBSD General 4 11th September 2008 04:24 PM


All times are GMT. The time now is 02:51 PM.


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