I'm trying to create a YaKuake (see
http://www.kde-look.org/content/show.php?content=3D29153 for more
details) type kde program for instant messages. Basically I want to be
able to hit a key, maybe f11 and have a window pop halfway down the
screen with all of my current instant messages. Anyway, that is my end
goal. Now the problem I'm having on the gaim side of things is getting
gaim to pass along all of its messages to my program. I've tried a
whole bunch of ideas so far, but nothing has quite worked.
I'm running an Amd64 with gentoo stable, kde 3.5 and both
gaim2.0beta1-r2 and gaim from cvs_head. Additionally I have
python-2.4.2 and dbus-0.50-r2.
So I guess I will just start by listing the things I have tried.
1. My first idea was to have gaim communicate with kde over kde's
dcop. I though that this would be simple because gaim is supposed to
allow one to write plugin in perl and kde has dcop bindings for perl.
However, I could not even get a simple perl plugin working. All I was
trying to have it do was to register a callback and print out hello
every time it was about to recieve a message. However, this caused
gaim to crash. I'll post the code I was using for my plugin below, but
I'm not sure it is a problem with my code because I couldn't get any
of the test cases included with gaim to work either.
2. Next I wrote a gaim c plugin (assuming that kde dcop would have c
bindings). The gaim part of this exercise worked fine, however the kde
dcop bindings for c are pretty out of date and were not working
correctly. Without using c sockets to develop some proprietary
connection, I wasn't sure how to make my qt/kde app communicate with
the c program.
3. Finally I tried to use the new dbus features that are coming out in
gaim2.0. This testing was done with gaim2.0beta1. I installed the
above versions of dbus-0.50-r2 and python-2.4.2. Attached are my
session.conf and system.conf files that live in /etc/dbus-1/. Also
attached is my /usr/share/dbus-1/services/gaim.service file. However,
I cannot get dbus to work even in the test cases. Here are the steps I
have taken to try and use dbus.
1. start "/etc/init.d/dbus start"
2. Login to kde
3. Start gaim2.0beta1 -- then load the dbus plugin
4. Try using the following gaim-send command to which I get an
Prints out: Failed to open connection to session
message bus: Unable to determine the address of the message bus
Since that didn't work I tried several other things with dbus
to see if I could coax it into working. I tried starting gaim with
"dbus-launch gaim". I tried running dbus-launch and then exporting the
two session variables that it prints out (DBUS_SESSION_BUS_ADDRESS and
DBUS_SESSION_BUS_PID). Also I tried running dbus-daemon-1 and
dbus-daemon (with and without the --session flag).
At one point after I exported the two global variables I started
getting the following error instead of the one mentioned above.
Failed to open connection to session message bus:
Failed to connect to socket /tmp/dbus-zPVpmOxvEE: Connection refused.
There is no socket (file) that starts with /tmp/dbus.... so I'm
assuming that is part of my problem. I'm assuming that there is
something somewhat simple that I'm missing in my dbus setup, but I
looked online for documentation and didn't find it all that much help.
So basically here is where I am. I cannot figure out how to
have my program communicate with gaim over anything other than simple
c sockets (which seems like a hackish solution given the other system
wide communication methods that should be available). I would really
like to figure out how to make it work with dcop since I am writing my
program in kde/qt and every kde/qt user has dcop running. Dbus seems
like it should work, but I must be missing something. And I cannot get
the perl plugins to work at all.
Finally as another bug I seem to be having. When I compile
gaim2.0beta1 with debug support, if I try to open up the debug window
gaim crashes. in gaim_gtk_syslog_show(). Unfortunately I don't have
some other libraries built with debug support so the core file isn't
all that useful and it is 8.0M large so I though the mailing list
would appreciate if I did not send it as an attachment. If anyone is
interested let me know.
Also attached is the perl plugin that I was trying to make work
(included with the documentation, but I thought I would include it
here just in case). I changed it slightly to use the gaim debug
I'm about out of ideas which is why I'm writing to the mailing list
for help. Any direction/ideas would be appreciated.