×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Sep 2011
    Posts
    449

    QDBus - Cannot register Service name on System Bus

    Hi,

    How do I register service on to the System Bus.

    if(!dbus.registerService("org.archlinux.myservice"))
    qDebug() << "Failed to register alias Service on DBus";

    The connection happens correctly and everything works, the only trouble is that I can't register a service. Calling that on the session Bus works as expected, but the system Bus simply refuses to register it.
    Am I doing something wrong?

    There is an old thread on the same issue, but no solution given

  2. #2
    Registered User
    Join Date
    May 2012
    Posts
    1

    Re: QDBus - Cannot register Service name on System Bus

    I have the same issue that you do with the System Bus.

    Have you found a solution?

  3. #3
    Registered User
    Join Date
    Sep 2012
    Posts
    1

    Re: QDBus - Cannot register Service name on System Bus

    Old post but I was stuck with the same problem, so for anyone else interested the solution is you need to create a DBus policy conf.

    For example:

    /etc/dbus-1/system.d/org.kde.foohelper.conf

    Code:
    <!DOCTYPE busconfig PUBLIC
     "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
     "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
    <busconfig>
     
      <!-- Only user root can own the foo helper -->
      <policy user="root">
        <allow own="org.kde.foohelper"/>
      </policy>
     
      <!-- Allow anyone to call into the service - we'll reject callers using PolicyKit -->
      <policy context="default">
        <allow send_interface="org.kde.foohelper"/>
        <allow receive_sender="org.kde.foohelper"/>
        <allow receive_interface="org.kde.foohelper"/>
      </policy>
     
    </busconfig>
    http://techbase.kde.org/Development/...us_policy_file

    http://dbus.freedesktop.org/doc/dbus-daemon.1.html#lbAF

Similar Threads

  1. QDBus equivalent in windows
    By rabeeah in forum [Archived] Beginning Qt
    Replies: 1
    Last Post: 2011-05-21, 08:20
  2. QDBus can not chat in two process
    By chensu0526 in forum Nokia N9
    Replies: 27
    Last Post: 2010-10-19, 02:53
  3. Replies: 2
    Last Post: 2010-05-19, 09:30
  4. how to python register system hotkey
    By jay_st in forum Symbian
    Replies: 4
    Last Post: 2009-04-22, 11:11
  5. Replies: 2
    Last Post: 2008-09-09, 15:31

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •