KUniqueApplication complains ' Cannot find the D-Bus session server'

Hui Jin blueangel.jin at gmail.com
Wed Jun 28 07:59:02 CEST 2006


Hi All,

Thanks for your generous help. I now could run kopete without problem.
I would like to share the experience with you. Sorry, I could not add
this post to the blog, since Blogger seems down today. I would add it
ASAP.

This HOWTO assume you have installed Qt4 and kdelibs4 before, and you
would like to upgrade it to the HEAD. The Qt4 is insalled in
/usr/local/Trolltech/Qt-4.1.3, and a symbol link is created in
/usr/qt/4; kdelibs is installed in /usr/local/KDE-4.0.

Let's start from the begining:
0. Read PORTING-TO-DBUS.txt in kdelibs4_snapshot
1. build dbus-0.62+
2. fetch kdesupport, build qt-dbus binding. I install it to
/usr/local/KDE-4.0, YMMV.
  cd ~/kdesupport; mkdir obj; cd obj;
  cmake -DCMAKE_INSTALL_PREFIX=/usr/local/KDE-4.0 -DCMAKE_BUILD_TYPE=debug ../
  make && sudo make install

3. Add this line to your .bashrc to make pkg-config happy:
export PKG_CONFIG_PATH=/usr/local/KDE-4.0/lib/pkgconfig:/usr/qt/4/lib
So you would not set it up later.

4. Build kdelibs
  cd kdelibs; mkdir obj; cd obj;
  source ~/.bashrc
  cmake -DCMAKE_INSTALL_PREFIX=/usr/local/KDE-4.0 -DCMAKE_BUILD_TYPE=debug ../
  make && sudo make install

5. Build kopete
  cd kdenetwork; mkdir obj; cd obj;
  cmake -DCMAKE_INSTALL_PREFIX=/usr/local/KDE-4.0 -DCMAKE_BUILD_TYPE=debug ../
  make && make install

I met some problems here:
the make just complains that dbus/qdbus.h is not found. Here is a
quick-and-dirty hack, add the hard-coded directory to the
CMakeList.txt : Ln 33

include_directories ( /usr/local/KDE-4.0/include/dbus-1.0
${QDBUS_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR}
${KDE4_INCLUDES})

6. start dbus
  $ dbus-launch --sh-syntax
It looks like the DBus environment is not corrected exported. So I
manually export the variables from the output:
export DBUS_SESSION_BUS_ADDRESS='unix:abstract=/tmp/dbus-29IavvsbXU,guid=fc11a244b8f599eb607605fa0b449100'
export DBUS_SESSION_BUS_PID=11244

7 start kopete
  $ kopete
Ok, kopete launches, but no account available here. I checked the
output, and found the version number confliction of
/var/tmp/kdecache-YOURNAME, just delete it and restart the kopete. It
works.

Thanks for your patience to go so far. :-)



On 6/27/06, Will Stephenson <wstephenson at kde.org> wrote:
>
>
>
> On Tuesday 27 June 2006 20:00, Hui Jin wrote:
>
> > I have following the PORTING-TO-DBUS.txt to build the kdelibs4 and
>
> > kdesupport, for dbus part, I emerge the dbus-0.62 in the system-wide.
>
> >
>
> > $ eix dbus
>
> > * sys-apps/dbus
>
> > Available versions: 0.23.4-r1 0.50-r1 0.50-r2 0.60-r3 0.60-r4 0.61
>
> > 0.61-r1 Installed: 0.62
>
> > Homepage: http://dbus.freedesktop.org/
>
> > Description: A message bus system, a simple way for
>
> > applications to talk to each other
>
> >
>
> > I then restart the dbus, and start custom-built kopete:
>
> >
>
> > kopete: ERROR: KUniqueApplication: Cannot find the D-Bus session server
>
> >
>
> > Then I restart the computer, my uptime :-(.
>
> > Still no luck. Any suggestions?
>
>
>
> KUniqueApplication reads the environment variables DBUS_SESSION_BUS_ADDRESS
> and DBUS_SESSION_BUS_PID. Are these variables set in your KDE session? Is
> there a dbus-daemon running as you? You might try launching your own session
> bus locally and then running your KDE4 kopete.
>
>
>
> eg
>
> $ (do whatever is needed to set up your KDE4 environment)
>
> $ eval `dbus-launch`
>
> (this sets the above variables)
>
> $ kopete
>
>
>
> HTH
>
>
>
> Will
>
>
>
> --
>
> Will Stephenson
>
> IRC: Bille


-- 
Best regards,
Hui Jin


More information about the Kde-soc mailing list