Use Dbus-send to see how many service is mounted on the current system bus or session bus.

Source: Internet
Author: User
Tags rhythmbox

After the Linux pc/phone started, Dbus-daemo started.

This is if a program is started, there will be a connection mount to the Dbus-daemon, while maintaining the service of the program.

You can use the Dbus-send command to see which service is on top of system bus or session bus, that is, what programs are currently

is associated with the Dbus-daemon:

1 View the service that is mounted on system bus.

test@test-desktop:~$ dbus-send--system--print-reply--dest=org.freedesktop.dbus/org/freedesktop/dbus Org.freedesktop.DBus.ListActivatableNames

Method return Sender=org.freedesktop.dbus-> dest=:1.25 reply_serial=2
Array [
String "Org.freedesktop.DBus"
String "Net.ekiga.helper"
String "Org.freedesktop.PowerManagement"
String "Org.freedesktop.Tracker"
String "Org.freedesktop.Notifications"
String "Org.freedesktop.SystemToolsBackends.GroupsConfig"
String "Org.freedesktop.SystemToolsBackends.NTPConfig"
String "Org.freedesktop.SystemToolsBackends.NFSConfig"
String "Org.gnome.Tomboy"
String "Org.freedesktop.SystemToolsBackends.HostsConfig"
String "Org.freedesktop.SystemToolsBackends"
String "Net.ekiga.instance"
String "Org.gnome.GnomeVFS.Daemon"
String "Com.redhat.dhcp"
String "Org.freedesktop.SystemToolsBackends.IfacesConfig"
String "Org.freedesktop.SystemToolsBackends.TimeConfig"
String "Org.freedesktop.SystemToolsBackends.ServicesConfig"
String "Org.gnome.Rhythmbox"
String "Org.freedesktop.SystemToolsBackends.Platform"
String "Org.freedesktop.SystemToolsBackends.SMBConfig"
String "Org.gnome.SettingsDaemon"
String "Org.freedesktop.SystemToolsBackends.UsersConfig"
]

2 View the service that is mounted on the session bus.
test@test-desktop:~$ dbus-send--session--print-reply--dest=org.freedesktop.dbus/org/freedesktop/dbus Org.freedesktop.DBus.ListActivatableNames
Method return Sender=org.freedesktop.dbus-> dest=:1.18 reply_serial=2
Array [
String "Org.freedesktop.DBus"
String "Net.ekiga.helper"
String "Org.freedesktop.PowerManagement"
String "Org.freedesktop.Tracker"
String "Org.freedesktop.Notifications"
String "Org.freedesktop.SystemToolsBackends.GroupsConfig"
String "Org.freedesktop.SystemToolsBackends.NTPConfig"
String "Org.freedesktop.SystemToolsBackends.NFSConfig"
String "Org.gnome.Tomboy"
String "Org.freedesktop.SystemToolsBackends.HostsConfig"
String "Org.freedesktop.SystemToolsBackends"
String "Net.ekiga.instance"
String "Org.gnome.GnomeVFS.Daemon"
String "Com.redhat.dhcp"
String "Org.freedesktop.SystemToolsBackends.IfacesConfig"
String "Org.freedesktop.SystemToolsBackends.TimeConfig"
String "Org.freedesktop.SystemToolsBackends.ServicesConfig"
String "Org.gnome.Rhythmbox"
String "Org.freedesktop.SystemToolsBackends.Platform"
String "Org.freedesktop.SystemToolsBackends.SMBConfig"
String "Org.gnome.SettingsDaemon"
String "Org.freedesktop.SystemToolsBackends.UsersConfig"
]

After looking at Nokia's Maemo platform launch, we can see which background programs are communicating with D-bus:

More usage, in fact, is to invoke the standard interface provided by Org.freedesktop.Dbus:

[sbox-chinook_x86: ~] > Dbus-send--system--print-reply--dest=org.freedesktop.dbus/org/freedesktop/dbus Org.freedesktop.DBus.Introspectable.Introspect

Method return Sender=org.freedesktop.dbus-> dest=:1.8
String "<! DOCTYPE node Public "-//FREEDESKTOP//DTD D-bus Object introspection 1.0//en"
"Http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd" >
<node>
<interface name= "Org.freedesktop.DBus.Introspectable" >
<method name= "Introspect" >
<arg name= "Data" direction= "out" type= "s"/>
</method>
</interface>
<interface name= "Org.freedesktop.DBus" >
<method name= "Requestname" >
<arg direction= "in" type= "s"/>
<arg direction= "in" type= "U"/>
<arg direction= "Out" type= "U"/>
</method>
<method name= "Releasename" >
<arg direction= "in" type= "s"/>
<arg direction= "Out" type= "U"/>
</method>
<method name= "Startservicebyname" >
<arg direction= "in" type= "s"/>
<arg direction= "in" type= "U"/>
<arg direction= "Out" type= "U"/>
</method>
<method name= "Hello" >
<arg direction= "Out" type= "s"/>
</method>
<method name= "Namehasowner" >
<arg direction= "in" type= "s"/>
<arg direction= "Out" type= "B"/>
</method>
<method name= "ListNames" >
<arg direction= "Out" type= "as"/>
</method>
<method name= "Listactivatablenames" >
<arg direction= "Out" type= "as"/>
</method>
<method name= "Addmatch" >
<arg direction= "in" type= "s"/>
</method>
<method name= "Removematch" >
<arg direction= "in" type= "s"/>
</method>
<method name= "Getnameowner" >
<arg direction= "in" type= "s"/>
<arg direction= "Out" type= "s"/>
</method>
<method name= "Listqueuedowners" >
<arg direction= "in" type= "s"/>
<arg direction= "Out" type= "as"/>
</method>
<method name= "Getconnectionunixuser" >
<arg direction= "in" type= "s"/>
<arg direction= "Out" type= "U"/>
</method>
<method name= "Getconnectionunixprocessid" >
<arg direction= "in" type= "s"/>
<arg direction= "Out" type= "U"/>
</method>
<method name= "Getconnectionselinuxsecuritycontext" >
<arg direction= "in" type= "s"/>
<arg direction= "Out" type= "ay"/>
</method>
<method name= "Reloadconfig" >
</method>
<signal name= "Nameownerchanged" >
<arg type= "s"/>
<arg type= "s"/>
<arg type= "s"/>
</signal>
<signal name= "Namelost" >
<arg type= "s"/>
</signal>
<signal name= "nameacquired" >
<arg type= "s"/>
</signal>
</interface>
</node>
"

///////////////////////////////////////////////////////////////////////////

[sbox-chinook_x86: ~] > Dbus-send--system--print-reply--dest=org.freedesktop.dbus/org/freedesktop/dbus Org.freedesktop.DBus.ListNames
Method return Sender=org.freedesktop.dbus-> dest=:1.10
Array [
String "Org.freedesktop.DBus"
String "Com.nokia.hildon-desktop"
String "Com.nokia.SM_DIMMED_infoprint"
String "org.gnome.GConf"
String "Com.nokia.hildon_input_method"
String ": 1.10"
String "Com.nokia.AS_DIMMED_infoprint"
String ": 1.0"
String ": 1.1"
String ": 1.2"
String ": 1.3"
String ": 1.4"
String ": 1.5"
]
[sbox-chinook_x86: ~] >

/////////////////////////////////////////////////////////////////////////////

Take a look at Dbus's documentation for more detailed stuff:

Http://dbus.freedesktop.org/doc/dbus-specification.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.