Skip to Navigation

Muffinlabs!

dbus

  1. #!/usr/bin/env ruby
  2.  
  3. #
  4. # I'm lazy and want to hold onto this code snippet but don't feel like putting it in subversion
  5. #
  6.  
  7. require 'rubygems'
  8. require 'rbus'
  9.  
  10. destination = "org.freedesktop.Notifications"
  11. object_path = "/org/freedesktop/Notifications"
  12.  
  13. member = "Notify"
  14.  
  15. bus = RBus.session_bus
  16. object = bus.get_object(destination, object_path)
  17.  
  18. object.Notify("string:R-Bus",
  19.         "uint32:0",
  20.         "string:info",
  21.         "string:R-Bus Notification",
  22.         "string:A test example to see that everything works.",
  23.         "array:string:",
  24.         "dict:string:variant:",
  25.         "int32:-1")
Syndicate content