After the Linux PC/mobile phone is started, the kernel-daemo is started.
If a program is started, a connection will be mounted to executor-daemon, and the service of the program is maintained.
You can run the send-send command to check which services are mounted on the system bus or session bus, that is, which programs are currently mounted.
Is associated with your-daemon:
1. view the service mounted on the system bus.
Test @ test-desktop :~ $ Export-send -- System -- print-reply -- dest = org. freedesktop. Examples/org/freedesktop/export org. freedesktop. Examples. listactivatablenames Method return sender = org. freedesktop. Keys-> DEST =: 1.25 reply_serial = 2 Array [ String "org. freedesktop. Large" String "net. ekiga. helper" String "org. freedesktop. powermanagement" String "org. freedesktop. Tracker" String "org. freedesktop. Events" 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 mounted on the session bus.
Test @ test-desktop :~ $ Export-send -- session -- print-reply -- dest = org. freedesktop. Examples/org/freedesktop/export org. freedesktop. Examples. listactivatablenames Method return sender = org. freedesktop. Keys-> DEST =: 1.18 reply_serial = 2 Array [ String "org. freedesktop. Large" String "net. ekiga. helper" String "org. freedesktop. powermanagement" String "org. freedesktop. Tracker" String "org. freedesktop. Events" 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" ] |
Look at Nokia's maemo platform after the launch, we can see which background programs communicate with D-BUS:
For more usage, it is actually to call the standard interface provided by org. freedesktop. Producer:
Sbox-CHINOOK_X86: ~ > Export-send -- System -- print-reply -- dest = org. freedesktop. Examples/org/freedesktop/choose org. freedesktop. Examples. introspectable. introspect
Method return sender = org. freedesktop. Large-> 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. Rule. introspectable">
<Method name = "introspect">
<Arg name = "data" direction = "out" type = "S"/>
</Method>
</Interface>
<Interface name = "org. freedesktop. Large">
<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: ~ > Export-send -- System -- print-reply -- dest = org. freedesktop. Examples/org/freedesktop/choose org. freedesktop. Examples. listnames
Method return sender = org. freedesktop. Large-> DEST =: 1.10
Array [
String "org. freedesktop. Large"
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: ~ >
//////////////////////////////////////// /////////////////////////////////////
For more details, refer to the workshop documentation:
Http://dbus.freedesktop.org/doc/dbus-specification.html