Bugzilla – Bug 116702
dbus-launch is executed twice on login
Last modified: 2005-10-14 14:18:42 UTC
Once a GNOME session is started, two DBUS session buses are running. One session bus is started by /etc/X11/xinit/xinitrc the other by GNOME: tsh 20539 0.0 0.2 3408 1280 ? Ss 12:12 0:00 dbus-daemon --fork --print-pid 8 --print- address 6 --session tsh 20540 0.0 0.1 2720 736 ? S 12:12 0:00 /usr/bin/dbus-launch --sh-syntax --exit- with-session /usr/X11R6/bin/gnome tsh 20557 0.0 0.1 2716 740 ? S 12:12 0:00 /usr/bin/dbus-launch --exit-with-session / opt/gnome/bin/gnome-session tsh 20558 0.0 0.2 3832 1400 ? Ss 12:12 0:00 dbus-daemon --fork --print-pid 8 --print- address 6 --session
GNOME should not start it's on session bus! With 9.3 we added the starting of dbus to xinitrc to make GNOME happy, for details check previous bug reports.
That didn't seem to work, that's why I added the starting of gnome-session through dbus-launch.
I have a solution. Do we want to put this in RC3?
Proposed solution: * remove "exec /usr/bin/dbus-launch --exit-with-session /opt/gnome/bin/gnome-session" from / usr/X11R6/bin/gnome * change /etc/X11/xinit/xinitrc: - WINDOWMANAGER="$dbuslaunch --sh-syntax --exit-with-session $WINDOWMANAGER" + exec /usr/bin/dbus-launch --exit-with-session /opt/gnome/bin/gnome-session
Hum, no, the second part (patch for xinitrc) is wrong I guess
Can't we just keep it in /usr/X11R6/bin/gnome and remove it from the other file?
I am not sure whether this would break another windowmanager which relies on xinitrc starting a dbus session bus.
Does the dbus-launch started /etc/X11/xinit/xinitrc work as expected in other WM? Can someone with KDE installed run it and try to run: $ notify-send Hello from a terminal in that WM? The same does not work at all in GNOME for me. Does it work in GNOME (removing the dbus-launch from /usr/X11R6/bin/gnome) for anyone? So, if, as I think, it does not work in any WM, no WM can be broken with that change. If it works, then maybe it's something with my setup, although I tried it also with newly created users
I've just checked a couple of other window managers. The dbus session bus by xinitrc * is useless for KDE (session bus is not running after login, DBUS_SESSION_BUS_ADDRESS is not set) * is useless for GNOME (session bus is running after login, DBUS_SESSION_BUS_ADDRESS is not set) * is useful for windowmaker and blackbox (sessuion bus is running after login, DBUS_SESSION_BUS_ADDRESS is set
notify-send works for me in a gnome session of my RC1 under both conditions: * two dbus session buses bus started by xinitrc and gnome * one dbus session bus started by gnome
Removing dbus-launch from /usr/X11R6/bin/gnome is a very bad idea since GNOME refuses to start at all afterwards.
Right, so the dbus-launch command in xinitrc seems useless, except for windowmaker and blackbox (are they starting, maybe, dbus-launch themselves after all? Since it does not work for other WM, I'd think so).
They do not start dbus-launch or dbus-daemon --session themselves. I really *think* that the invocation by xinitrc is useless but I'd mark this one as LATER since we have no bug reports that the two running session buses under GNOME cause any problems.
Andreas could you please comment?
Just got my hands on a machine with RC2 and KDE installed which is configured with auto-login. On that system there is a session bus running. This fact should empahsize that we better do _not_ remove dbus-launch from xinitrc at the current point of time.
The command in xinitrc is needed so that dbus works under KDE as well, we cannot change this. Note that we added this for 9.3 in this place and it worked at that time for both KDE and GNOME. Please fix gnome to work with the existing setup.
Does it really work in KDE? That is, does: $ notify-send Hello work as expected, showing a notification on the bottom right corner of the screen? (notify-send is from libnotify package
Just re-checked: My previous statement (comment #9) that no dbus session bus is running under KDE is not correct for local users. Hence, we have a sane setup for dbus-session buses for all X sessions but GNOME. send-notify does work in KDE, too.
Ok, the extra dbus-launch in gnome-session was added because of users having their own .xinitrc, in which case system-wide xinitrc is not run. So yeah, removing the dbus-launch in gnome-session and submitting a package...
I'm not sure we should jam this into RC3. I think an update with more testing is appropriate.
Careful! If you simply remove dbus-launch from /usr/X11R6/bin/gnome it will break GNOME completely. I just verified this with RC2.
JPR: Totally agreed. We have no bug reports that the second dbus session bus does cause any harm. I strongly vote for _not_ fixing this for 10.0 now.
Rodrigo and Timo, please test this! Btw. we added a release note mentioning the local modified xinitrc already. This one should take care of it.
Since Timo tested (collision while submitting this) and it failed, let's not do it for now...
aj: Yes. Having two session buses is not "nice" but will not cause any problems to my knowledge since only the second session bus will be used by applications.
Tim, how did it break GNOME? I just run with the fixed package, with no problems at all (for users with no .xinitrc). And, what exactly did you change in that file?
I commented out the line for dbus-launch. My local test user does not have a .xinitrc (just .xinitec.template). GNOME refuses to start with the common "your session lasted less than 10 seconds" dialog and has the following log: /etc/X11/xim: Checking wether an input method should be started. INPUT_METHOD is not se ir empty (no user selected input method). Trying to start a default input metod for the localte en_US.UTF-8 ... There is no default input method for the current locale.
Right, you don't have to comment that line, only remove the dbus-launch command line, so: - exec /usr/bin/dbus-launch --exit-with-session /opt/gnome/bin/gnome-session + exec /opt/gnome/bin/gnome-session
Yes, right. Works fine and should not have any side effects in my opinion. aj: Can we still submit a package for RC3?
Please do.
I can submit the package, since I did the change. Just tell me you approve it, and I'll submit it immediately
Just talked to JPR and we decided to not check it in for now. Let's test some more...
I do think we can take an update here though once this is tested.
Package submitted to STABLE