Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 223925 - net-im/pidgin-2.4.1 and net-im/pidgin-2.4.2: dbus does not work
Summary: net-im/pidgin-2.4.1 and net-im/pidgin-2.4.2: dbus does not work
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo net-im Herd
URL:
Whiteboard:
Keywords:
: 223967 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-05-28 09:40 UTC by Rohen Peterson
Modified: 2008-08-14 17:01 UTC (History)
3 users (show)

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


Attachments
emerge--info (emerge--info,11.37 KB, text/plain)
2008-07-05 11:01 UTC, DEMAINE Benoît-Pierre, aka DoubleHP
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rohen Peterson 2008-05-28 09:40:42 UTC
Dbus test plugin fails to work, proving error: "Failed to get connection: Failed to execute dbus-launch to autolaunch D-Bus session"

Error repeated in both versions. Downgraded to net-im/pidgin-2.3.1 for a working version.

Reproducible: Always

Steps to Reproduce:
1. Initialize dbus and then pidgin
2. Start pidgin dbus plugin
3. Plugin fails, stating error: "Failed to get connection: Failed to execute dbus-launch to autolaunch D-Bus session"

Actual Results:  
Dbus test plugin fails

Expected Results:  
Dbus test plugin should provide no error

Tested with AmarokPidgin as well. Working in version 2.3.1, but not newer versions.
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2008-05-28 15:59:09 UTC
Is dbus running according to `/etc/init.d/dbus status'?
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2008-05-28 16:20:05 UTC
*** Bug 223967 has been marked as a duplicate of this bug. ***
Comment 3 Xavier CHARLES 2008-05-28 16:49:40 UTC
hi  Jeroen

in my case dbus is running according /etc/init.d/dbus status

regards
Comment 4 Olivier Crete (RETIRED) gentoo-dev 2008-05-28 16:56:01 UTC
this bus launched by /etc/init.d/dbus is the system bus.. and it has nothing to do with the session bus that pidgin uses.

Which desktop environment are you using?

Does this command work?

dbus-send --session --print-reply --dest=im.pidgin.purple.PurpleService /im/pidgin/purple/PurpleObject im.pidgin.purple.PurpleInterface.PurpleAccountsGetAll

It should give you a list of int32 (one per account you have configured).
Comment 5 Rohen Peterson 2008-05-28 20:13:25 UTC
(In reply to comment #4)

I use ion3 (20080411).

The dbus command was executed as follows:
dbus-send --session --print-reply --dest=im.pidgin.purple.PurpleService /im/pidgin/purple/PurpleObject im.pidgin.purple.PurpleInterface.PurpleAccountsGetAll

The outputs for version 2.4.1 and 2.4.2:
Error org.freedesktop.DBus.Error.ServiceUnknown: The name im.pidgin.purple.PurpleService was not provided by any .service files

The output for version 2.3.1:
method return sender=:1.6 -> dest=:1.7 reply_serial=2
   array [
      int32 1500
      int32 1526
      int32 1558
   ]
Comment 6 Olivier Crete (RETIRED) gentoo-dev 2008-05-28 20:24:50 UTC
Strange strange, are you building pidgin with the dbus use flag? I'm a bit puzzled..
Comment 7 Rohen Peterson 2008-05-28 22:34:26 UTC
(In reply to comment #6)

Yes, dbus is built into pidgin. If it weren't, version 2.3.1 would not work (don't even think it would have the dbus test plugin).

Comment 8 Xavier CHARLES 2008-05-29 09:16:32 UTC
hi
I use xmonad 

I have same output than Rohen :
dbus-send --session --print-reply --dest=im.pidgin.purple.PurpleService /im/pidgin/purple/PurpleObject im.pidgin.purple.PurpleInterface.Purple
Error org.freedesktop.DBus.Error.ServiceUnknown: The name im.pidgin.purple.PurpleService was not provided by any .service files


ice ~ #  emerge -pv pidgin

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] net-im/pidgin-2.4.2  USE="dbus eds gnutls gstreamer gtk ncurses nls perl sasl spell -bonjour -debug* -doc -gadu -groupwise -meanwhile -networkmanager -prediction -qq -silc -tcl -tk -zephyr" 0 kB 

Total: 1 package (1 reinstall), Size of downloads: 0 kB


Comment 9 Xavier CHARLES 2008-05-29 09:20:50 UTC
hi again 

I have recompiled pidgin with debug option

here is the console output when I tried to enable libnotify :

libnotify-Message: Unable to get session bus: Failed to execute dbus-launch to autolaunch D-Bus session
(11:19:25) pidgin-libnotify: libnotify not running!
(11:19:25) prefs: /pidgin/plugins/loaded changed, scheduling save.
(11:19:27) jabber: Sending (ssl): <iq type='get' id='purplec8ad9d3a'><ping xmlns='urn:xmpp:ping'/></iq>
(11:19:27) jabber: Recv (ssl)(203): <iq xmlns='jabber:client' id='purplec8ad9d3a' type='error'><error type='cancel' code='501'><feature-not-implemented xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/></error><ping xmlns='urn:xmpp:ping'/></iq>
(11:19:31) util: Writing file prefs.xml to directory /home/charlesx/.purple
(11:19:31) util: Writing file /home/charlesx/.purple/prefs.xml


hope that it could help

thks in advance
Comment 10 Olivier Crete (RETIRED) gentoo-dev 2008-05-29 12:31:05 UTC
Can you run dbus-launch?

Normally, if you use a proper desktop like gnome or kde, dbus is started with your session..
Comment 11 Xavier CHARLES 2008-05-29 13:21:13 UTC
charlesx@ice ~ $ dbus-launch 
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-3dP080q6FU,guid=7c68aef7f1760b06848dead9483eadb7
DBUS_SESSION_BUS_PID=15703
Comment 12 Xavier CHARLES 2008-05-29 13:22:15 UTC
it seems that dbus is running , isn't it ?

charlesx@ice ~ $ ps -ef |grep dbus |grep -v grep
^[[3~102       8940     1  0 11:21 ?        00:00:00 /usr/bin/dbus-daemon --system
charlesx 15703     1  0 15:20 ?        00:00:00 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 9 --session
charlesx 16744     1  0 10:22 ?        00:00:00 dbus-launch --autolaunch 32acb5217fdbb938d9a2dd00457d1577 --binary-syntax --close-stderr
charlesx 16745     1  0 10:22 ?        00:00:00 /usr/bin/dbus-daemon --fork --print-pid 7 --print-address 9 --session
charlesx@ice ~ $
Comment 13 Xavier CHARLES 2008-05-29 13:39:44 UTC
it seems that dbus is running , isn't it ?

charlesx@ice ~ $ ps -ef |grep dbus |grep -v grep
^[[3~102       8940     1  0 11:21 ?        00:00:00 /usr/bin/dbus-daemon --system
charlesx 15703     1  0 15:20 ?        00:00:00 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 9 --session
charlesx 16744     1  0 10:22 ?        00:00:00 dbus-launch --autolaunch 32acb5217fdbb938d9a2dd00457d1577 --binary-syntax --close-stderr
charlesx 16745     1  0 10:22 ?        00:00:00 /usr/bin/dbus-daemon --fork --print-pid 7 --print-address 9 --session
charlesx@ice ~ $
Comment 14 Xavier CHARLES 2008-05-30 09:07:26 UTC
hello

I found a workaround

In a term

run dbus-launch

output looks like :

DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-3dP080q6FU,guid=7c68aef7f1760b06848dead9483eadb7
DBUS_SESSION_BUS_PID=15703

then export both variable
export DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-3dP080q6FU,guid=7c68aef7f1760b06848dead9483eadb7
export DBUS_SESSION_BUS_PID=15703

in same term run pidgin and libnotify is available

it works for me 

hope that can help you too
Comment 15 Miguel Sanjurjo 2008-07-04 19:48:34 UTC
(In reply to comment #14)

Even easier: "dbus-launch pidgin". Bug still present in 2.4.3
Comment 16 DEMAINE Benoît-Pierre, aka DoubleHP 2008-07-05 11:00:46 UTC
I have the same bug under Debian; Debian and Ubuntu forums also say to run
dbus-launch pidgin
but it does not fix the problem for 100% users.

Since it affects an other distro, I think the fix should be upstream, not Gentoo. But Gentoo could still temporarly use a wrapper, publish a revision, and remove it when upstream fixes the problem.

using 2.4.3 compiled 3rd july on Gentoo.

After some google on the error message:
http://developer.pidgin.im/wiki/DbusHowto
says that, in short, all distro should check that DBUS exports some variable. So, the fix require a dbus update; maybe the latest dbus is fine, but still reserved to unstable Gentoos ? do this problem occur only for stable, or also for unstable ? I am using stable x86. And dbus is a default service for me.

The bug can be considered 2 ways:
- DBUS_SESSION_BUS_ADDRESS not set
- dbus-launch --autolaunch fails

Gentoo will have to choose ...

Rohen, PLEASE attach your emerge --info !!! this is a "must have" for ALL bugs !
Comment 17 DEMAINE Benoît-Pierre, aka DoubleHP 2008-07-05 11:01:07 UTC
Created attachment 159599 [details]
emerge--info
Comment 18 DEMAINE Benoît-Pierre, aka DoubleHP 2008-07-28 13:32:48 UTC
(In reply to comment #14)

for i in `/usr/bin/dbus-launch` ; do export $i ; done

works in any bash; but other X apps cant talk to it; if i put that command in a subscript called by .xinitrc, i fear the exports wont be valid for the rest of X: i am not sure if exports will grow up from the subscripts to X itself.
Comment 19 Olivier Crete (RETIRED) gentoo-dev 2008-08-14 14:24:16 UTC
Alright, it all boils down to using crappy desktop environments that don't launch a session bus. Its clearly not a pidgin bug. You can probably go around it by running "dbus-launch <your session manager>" in the script you start your session with.
Comment 20 DEMAINE Benoît-Pierre, aka DoubleHP 2008-08-14 17:01:12 UTC
(In reply to comment #19)

At last, a nicely working "not so tricky" workaround :)

I am running E17 throught xinit; this would theoretically fix the problem: run
for i in `/usr/bin/dbus-launch` ; do export $i ; done
in .xinitrc, but, for loops are not accepted in .xinitrc. I have been looking for many ways to do this export around, and could not find any one. So, as since 4th july, i stuck to my home made workaround: as root, i move /usr/bin/pidgin to /usr/bin/pidgin and write a wrapper. It requires root operation after each pidgin remerge, what is both a good and a bad thing (need manual intervention each time pidgin is updated, but, also would make that as soon as pidgin would have been fixed, emerge would overwrite the wrapper, and thus delete my useless customization).

Yes, putting "exec /usr/bin/dbus-launch /usr/bin/enlightenment_start" in .xinitrc does fix for me.

Still, i am puzzled with the fix: why does pidgin assume the WM must support Dbus ? I imagine that in many cases, people wont be able/allowed to do what i did (people using a poor cession loader, or starting their cession without anything that reads .xinitrc).

I mean, for years, Gaim and Pidgin worked fine, and all of a sudden they assume the WM must provide Dbus ? Why would Dbus be started by the WM and not X ?

(In reply to comment #4)
I wonder why starting the service is not enough, and why we need "something else" at the WM level.

I wonder how other distributions will deal with this problem.

Olivier, do you exactly know what the WM should do or provide ? ... so we can complain to respective upstreams (E17 team for me).

Since Skype also heavily uses Dbus, any one know if there is any Skype bug or problem looking like this one ?