Results 1 to 6 of 6

Thread: DBus daemon not starting

  1. #1
    Join Date
    Nov 2007
    Posts
    51
    Thanks
    2
    Thanked 2 Times in 2 Posts

    Default DBus daemon not starting

    Greetings.

    Excuse me if i posted this question in the wrong place.
    I've been using the DBus windows port provided by winkde.org.

    I added the dll's and the several exe's and configuration files that come along with the package to the qt bin directory.

    dbus-launch.exe --com.something.nice works perfectly, when i start it from the qt bin directory.

    However, when i move the package to a new directory (the same my own exe is, i want to run dbus-launch at startup with a qprocess from my application) the dbus daemon is not started.

    What can be the problem?

    Thank you.
    Last edited by Khal Drogo; 4th August 2008 at 13:10. Reason: Title not descriptive enough

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 975 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: DBus daemon not starting

    It might be missing some libraries that were present in the previous directory.

  3. #3
    Join Date
    Nov 2007
    Posts
    51
    Thanks
    2
    Thanked 2 Times in 2 Posts

    Default Re: DBus daemon not starting

    Thanks for taking the time to read through and respond, however, that does not solve the problem.
    Subsequently, i tried copying the entire qt bin directory to another location and start it from there, still unsuccessfully.
    There might be some settings, dependencies, etc. which i'm not aware of?

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 975 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: DBus daemon not starting

    If not the libs, then maybe it needs some plugins?

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,013 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: DBus daemon not starting

    Quote Originally Posted by Khal Drogo View Post
    Thanks for taking the time to read through and respond, however, that does not solve the problem.
    Subsequently, i tried copying the entire qt bin directory to another location and start it from there, still unsuccessfully.
    There might be some settings, dependencies, etc. which i'm not aware of?
    Did you try using a dependency walker?

    Quote Originally Posted by jacek View Post
    If not the libs, then maybe it needs some plugins?
    I don't think DBus has any (mandatory) plugins.

  6. #6
    Join Date
    Nov 2007
    Posts
    51
    Thanks
    2
    Thanked 2 Times in 2 Posts

    Default Re: DBus daemon not starting

    Yes i've tried using a dependancy walker, everything needed was there.

    (btw. the port is here: http://winkde.org/pub/kde/ports/win3...ory/win32libs/ )

    Maybe someone who used DBus under windows can tell me what are the must-needed files to run dbus-daemon from command prompt from a particular location? eg. E:/Deploy/PR1
    I would appreciate it very much.

    I have another DBus related question. Please advise whether i should make a new thread about this.
    I intend to use a signal like the following with DBus:
    Qt Code:
    1. void start(int id, const QString &name, Stuff stuff);
    To copy to clipboard, switch view to plain text mode 

    The structure Stuff:
    Qt Code:
    1. typedef struct
    2. {
    3. MY_TYPE type;
    4. } Stuff;
    To copy to clipboard, switch view to plain text mode 

    I used dbusxml2cpp to achieve my needed interface and adaptor files. My problem is, that the slot connected to this signal does not get called. The problem must lie somewhere in the marshalling of my custom type, because the signal-slot mechanism through DBus works perfectly with Qt types.

    I declared my struct and enum with Q_DECLARE_METATYPE. I also registered them on the DBus:
    Qt Code:
    1. qDBusRegisterMetaType<Stuff>();
    2. qDBusRegisterMetaType<MY_TYPE>();
    To copy to clipboard, switch view to plain text mode 
    I've also overridden the QDBusArgument << and >> operators, thusly:
    Qt Code:
    1. QDBusArgument &operator << (QDBusArgument &arg, const Stuff& stuff)
    2. {
    3. arg.beginStructure();
    4. arg << stuff.a << stuff.b << stuff.type;
    5. arg.endStructure();
    6.  
    7. return arg;
    8. }
    9.  
    10. QDBusArgument &operator << (QDBusArgument &arg, const MY_TYPE& ct)
    11. {
    12. arg.beginStructure();
    13. arg << static_cast<int>(ct);
    14. arg.endStructure();
    15.  
    16. return arg;
    17. }
    To copy to clipboard, switch view to plain text mode 
    Similarly, the other way around.

    I am trying to emit a signal the following way:
    Qt Code:
    1.  
    2. msg = QDBusMessage::createSignal("/Pr1", "com.trolltech.pr1", "start");
    3. msg << m_ID;
    4. msg << m_name;
    5. msg << QVariant::fromValue<Stuff>(m_stuff);
    6.  
    7. QDBusConnection::sessionBus().send(msg);
    To copy to clipboard, switch view to plain text mode 

    The slot in my other process doesn't get called.

    What did i miss/done wrong?

    Thanks in advance, there isn't an abundance of info or examples for using custom types with DBus, so i would appreciate any assistance.

Similar Threads

  1. Steps in solving a programming problem?
    By triperzonak in forum General Programming
    Replies: 8
    Last Post: 5th August 2008, 08:47
  2. problem with paint and erase in frame
    By M.A.M in forum Qt Programming
    Replies: 9
    Last Post: 4th May 2008, 20:17
  3. Tricky problem with ARGB widget / UpdateLayeredWindow
    By nooky59 in forum Qt Programming
    Replies: 3
    Last Post: 21st February 2008, 10:35
  4. Grid Layout Problem
    By Seema Rao in forum Qt Programming
    Replies: 2
    Last Post: 4th May 2006, 12:45
  5. Replies: 16
    Last Post: 7th March 2006, 15:57

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.