D-Bus Tutorial and References

From TLE-BU; The Linux Experience, BackUp
Jump to: navigation, search

These documents and tutorials are still being actively developed!

Until this warning is removed, all following documents, references and code samples are considered ALPHA and very likely contain mistakes, omissions and tales of great fantasy. Please keep this in mind and by all means, help us correct and improve this reference in any manner you can!

Contents

[edit] Papers

These are the papers from talks I have given on D-Bus proper and the Net::DBus binding for perl. They do not differ terribly; The TLUG talk tries to be more language neutral where the TPM talk is more Perl-centric.

  • Toronto Perl Mongers (TPM) Talk - Aug. 28, 2008
As: PDF 240 KiB or ODT 94 KiB
  • Toronto Linux User's Group (TLUG) Talk - Aug. 12, 2008
As: PDF 248 KiB or ODT 94 KiB (last updated on Aug. 27, 2008)

[edit] Sample Code

These are the sample programs written to go along with the various talks I've given on D-Bus. Each program file has a good deal of internal comments that explain what each part of the various programs does, why it is there and how you might change it to experiment.

[edit] Query HAL for Devices

This is the most basic example of how to use D-Bus. It is a slight modification on the Net::DBus 'lshal.pl' script.

[edit] Basic Service and Caller

This is a very basic service* script that publishes a simple method onto the D-Bus and a caller that calls the newly published method.

(* This is not technically a 'service' in the D-Bus sense yet as no '.service' file exists at this point)

[edit] Proper Service script with signals, Updated Caller and new Listener

This is a slightly more advanced version of the previous service script that adds signals onto the D-Bus and a slightly more advanced caller that calls this new signal and a new "listener" file that reacts when the new signal is emitted. This also adds the '.service' file for the service script making it a proper "service" in the D-Bus sense.

[edit] References

This is the main tutorial page. It still leaves much to be desired.

This is my (Digimer's) personal collection of notes and such that I have gathered while trying to build this body of work.

Personal tools
Hosting of the TLE-BU source code provided by:
SourceForge.net Logo