LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 12-30-2021, 01:15 AM   #1
slac
Member
 
Registered: May 2019
Posts: 265

Rep: Reputation: Disabled
Exclamation dbus-daemon is being executed twice at the same time


I have a problem which is that dbus-daemon is being executed two times at the same time when I get into a xorg-session. That is a problem because programs that are looking up for services cannot used them since, I guess, they get confused about which dbus-daemon is the only that they should used.

This is the output of "ps aux":

Code:
user      362  0.0  0.0   4840  2060 tty1     S    01:08   0:00 dbus-launch --sh-syntax --exit-with-x11 startfluxbox
user      367  0.0  0.0   4840  2028 tty1     S    01:08   0:00 dbus-launch --autolaunch=9aaa8a87cd19540448dadf8a61ba58fa --binary-syntax --close-stderr
user      368  0.0  0.0   3380   184 ?        Ss   01:08   0:00 /usr/bin/dbus-daemon --syslog --fork --print-pid 5 --print-address 7 --session
user      369  0.0  0.0   3488  2144 ?        Ss   01:08   0:00 /usr/bin/dbus-daemon --syslog-only --fork --print-pid 5 --print-address 7 --session
user      418  0.0  0.0   3380  2660 ?        S    01:08   0:00 /usr/bin/dbus-daemon --config-file=/usr/share/defaults/at-spi2/accessibility.conf --nofork --print-address 3
user      495  0.0  0.0   5856  2088 pts/0    S+   01:08   0:00 grep dbus
As you can see there, there are two dbus-daemon, one with a flash of --syslog and other one with --syslog-only.

If I kill the xorg session and re-start it then the problem no longer appears. It seems like this only happens when for the very first time xorg (xinitrc) is execute after powering up or rebooting.

What could be the cause of that...? It may be a program that wants to use a dbus service from xinitrc but it does not explain why it only happens once (after rebooting or powering up) and no longer happens when xorg is re-started (the same programs are supposed to be executed).
 
Old 12-30-2021, 11:34 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,140

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
What problem is this causing? The dbus-daemon man page says you can have one system and multiple session daemons running with additional conf files.

https://dbus.freedesktop.org/doc/dbus-daemon.1.html
 
Old 12-30-2021, 04:04 PM   #3
slac
Member
 
Registered: May 2019
Posts: 265

Original Poster
Rep: Reputation: Disabled
But the problem persists, and I suppose that that was the problem because, as I said earlier, whenever I close the xorg session where the programs that are looking for dbus services do not work and then re-open a xorg session they work because there are no two dbus-daemons running, only one. Two dbus-daemon run ONLY after powering up or rebooting.

The service that a program is looking for is xorg.freedesktop.secrets.service. I removed the --start flag from the Exec=/usr/bin/gnome-keyring-daemon --start --foreground --components=secrets to see what was happening. I found that two gnome-keyring daemons were being executed, probably because there are two dbus-daemons trying to execute the service so the first or the second (I do not know really) gnome-keyring daemon is "overlapping" the other causing programs, which require the daemon, to not be able to use gnome keyrings.

I wonder if recompiling dbus was the reason for it, should I also recompile at-spi2-core, at-spi2-atk and atk?

Also if I remove dbus-launch from .xinitrc the programs can access gnome keyrings properly. Even if there is no DBUS_SESSION_BUS_ADDRESS.

I think that the directory /run/dbus does no exist. Should I execute dbus-daemon --system before any dbus-daemon --session?

Last edited by slac; 12-30-2021 at 04:07 PM. Reason: spell-checking
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Why any command in .bashrc is being executed twice lxas Linux - Newbie 7 02-28-2013 07:43 PM
ShellScript executed from command prmpt but not executed from crontab or at command BMMadhav Linux - Newbie 1 11-16-2012 07:20 PM
[SOLVED] Configured Cron job executed every hour is instead executed every minute for 10m markings Linux - Software 4 05-13-2012 05:43 PM
[SOLVED] Xwindow's program will not run when executed on boot or when executed remotely richman1234 Programming 2 10-08-2010 01:32 PM
Fedora Core 9 update dbus.exception & dbus.proxies & DBus.Error.AccessDenied errors trien27 Fedora 1 12-08-2008 11:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 07:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration