Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 138101 - gnome-session doesn't run with dbus-launch causing notification-daemon to bail out.
Summary: gnome-session doesn't run with dbus-launch causing notification-daemon to bai...
Status: RESOLVED DUPLICATE of bug 77504
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: PPC64 Linux
: High enhancement (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-26 13:20 UTC by Samuli Suominen (RETIRED)
Modified: 2006-06-28 00:34 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Samuli Suominen (RETIRED) gentoo-dev 2006-06-26 13:20:47 UTC
..because media-sound/bmpx-0.2* lost it's ~ppc64 flag because of it missing. And I do have some level of addiction to software speaking of. :)

Thanks, drac
Comment 1 Samuli Suominen (RETIRED) gentoo-dev 2006-06-26 13:27:13 UTC
blah, you just did this for net-im/gossip it seems. sorry.
Comment 2 Markus Rothe (RETIRED) gentoo-dev 2006-06-26 13:32:02 UTC
readded ~ppc64 to bmpx :-)
Comment 3 Brent Baude (RETIRED) gentoo-dev 2006-06-26 18:04:57 UTC
corsair, did you get libnotify to work or just build. Mine builds fine here but doesnt work properly.  Fails with dbus errors.
Comment 4 Markus Rothe (RETIRED) gentoo-dev 2006-06-27 03:20:36 UTC
for libnotify testing I ran this command:

dbus-launch --auto-syntax --exit-with-session notify-send hello

that works pretty good (I'm not sure why it does not work with just "notify-send hello")

and for bmpx: yes, you are right. my fault. I only did the normal compile tests as bmpx-0.2* would have gotten the ~ppc64 keyword anyway if we had libnotify already ~ppc64. Unfortunaly bmpx does not run as I found out after you made the last comment. It behaves like this:

$ beep-media-player-2
beep-media-player-2: Couldn't connect to session bus: Unable to determine the address of the message bus
$ dbus-launch --auto-syntax --exit-with-session beep-media-player-2
beep-media-player-2-bin received signal 11

so the dbus-lauch trick does not work for bmpx...

Samuli/ranger: could one of you please try to find out, if bmpx actualy works on other archs? (I only have my G5 next to me currently)
Comment 5 Samuli Suominen (RETIRED) gentoo-dev 2006-06-27 06:12:20 UTC
> Samuli/ranger: could one of you please try to find out, if bmpx actualy works
> on other archs? (I only have my G5 next to me currently)

Fine on x86, but there is issues with _pre versions and I've spend some hours debugging them with upstream and eliminated most of the them.

It runs on amd64 too, don't have such machine next to me but I know it works (from other users). There has been issues also with dbus and running BMPx from KDE which dbus-launch /usr/libexec/beep-media-player-2 "fixed" (note the quotes). 

Sad that it doesn't work on ppc64, with 0.12.9 there was many arches it worked on.. now there is only few left. Guess it's cause of expanding dependencies, mostly cause of C to C++ conversion and of course new features/code.
Comment 6 Brent Baude (RETIRED) gentoo-dev 2006-06-27 11:04:24 UTC
I looked into this a bit more. On my x86, I get:

libnotify-Message: Unable to get session bus: Unable to determine the address of the message bus

when running this from gnome.  Other window managers, such as xfce4, work fine.  When I add the dbus-launch in front, it works fine in gnome.

Have you seen similar funny-business with window mgrs and libnotify?  Any special way gnome should be built so it just works?
Comment 7 Milosz Derezynski 2006-06-27 13:40:04 UTC
Ok guys the point is this:

dbus-daemon and having a D-BUS session is not like apache, or an ftpd, or whatever. You can not just start it, and it's "just" there, you have to start it from the "root" environment from which all your D-BUS operations will happen.

What this means is:

If you open a terminal, run dbus-daemon --arguments, and exit it, then it will be running in the background as a process, but unavailable to anything else on the system or rather in your session, as the DBUS_SESSION_BUS_ADDRESS variable will be lost..

This is an enviroment variable (for those who don't know, please read here: http://www-biocomp.doit.wisc.edu/env.shtml), which contains the D-BUS address, and whether you like it or not, or whether you think it's stupid, totally out of sanity or whatever, it IS just THAT way and NO other.

What this means is that you have to use dbus-launch to create the root environment from which all D-BUS operations will happen. This sentence doesn't make any sense does it, so i'll explain it:

You have to either:

- Have in your ~/.xinitrc something like (let's say you run gnome, but i don't want to hear any comments right now that you don't cause this isn't the place for it): "dbus-launch --auto-syntax --exit-with-session gnome-session"

or

- Start an xterm; run echo `dbus-launch --auto-syntax`; and THEN use D-BUS apps ONLY from within this xterm. You can start another xterm from it (but ONLY from _IT_, and not again from your desktop environemnt by using Alt+F2, or some shortcut or whatever), and you can also then use "beep-media-player-2" to start BMPx, or you can use notify-send or whatever, but it _HAS_ to happen from this xterm, or one of it's child processes, as they inherit the environment.

As a little excerise, try this:

- Start an xterm, run: echo `dbus-launch --auto-syntax`
- run: killall -9 notification-daemon
- run: notify-send "Hello"

It WILL show a notification, because there is a dbus daemon running whose address is known to the current shell trough the environement variable (again, this is just how it works and it has nothing to do with BMPx, or libnotify, whatever, don't start flames against either of those here, and btw, no, libnotify is not part of BMPx)

Exercise continued:

- Now, run: unset DBUS_SESSION_BUS_ADDRESS
- run: killall -9 notification-daemon
- run: notify-send "Hello"

The notification will NOT show up because libnotify, which is used by notify-send, will be NOT able to start up notification-daemon automatically trough D-BUS activation (D-BUS Activation: http://raphael.slinckx.net/blog/documents/dbus-tutorial/), coz you just unset the BUS_ADDRESS variable, and it just doesn't know how. Likewise, you will not be able to start bmpx with 'beep-media-player-2'.

The Signal 11 (SIGSEGV) issue is with all certainity not related to this problem, but something else happened that cause BMPx to segfault (you might want to run it 'manually' with '/usr/libexec/beep-media-player-2-bin --no-log' in a terminal to see what is going on).

So please don't tell me stuff'n'stories, but make sure you have a D-BUS session runnig that is known to your WHOLE environment and thus everything can work properly, or just leave it up to your distro to run D-BUS for you in your X session, or leave it altogether, or read the fine manuals on it and do-it-yourself-but-correctly.

Kthx,
Milosz
Comment 8 Samuli Suominen (RETIRED) gentoo-dev 2006-06-27 14:07:35 UTC
let me try to sum this up,

- gdm starts gnome-session with dbus-launch and notification-daemon works.

- starting gnome-session directly from ~/.xinitrc like "exec gnome-session" doesn't start it with dbus launch. notification-daemon doesn't work.

- starting gnome-session directly from ~/.xinitrc like "exec dbus-launch --exit-with-session gnome-session" of course runs it with dbus-launch and notification-daemon works again.

- gnome-session should handle this internally, a patch is probably needed.

- this is NOT BMPx issue, apologies to BMPx upstream for unnecessary fuzz.
Comment 9 Samuli Suominen (RETIRED) gentoo-dev 2006-06-27 14:16:09 UTC
Added you compnerd to CC cause you are in !meta notification-daemon in case you are intrested of this.
Comment 10 Steev Klimaszewski (RETIRED) gentoo-dev 2006-06-27 18:16:51 UTC
this is a gnome-session thing, not a notification-daemon thing.  if your session is starting without dbus, then you need to get that working first.
Comment 11 Steev Klimaszewski (RETIRED) gentoo-dev 2006-06-27 18:27:15 UTC
One other thing to note - we can't (won't) modify your ~/.xinitrc so if you are using that over .xsession (i think it is, its been a while) then you need to add the dbus-launch syntax manually.  If you thing gnome-session should start it automatically, then you should file a bug (enhancement request) upstream.
Comment 12 Saleem Abdulrasool (RETIRED) gentoo-dev 2006-06-28 00:34:14 UTC

*** This bug has been marked as a duplicate of 77504 ***