Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
ruby-dbus play with Banshee
#!/usr/bin/env ruby
require 'dbus'
bus = DBus::SessionBus.instance
banshee_service = bus.service("org.bansheeproject.Banshee")
banshee = banshee_service.object("/org/bansheeproject/Banshee/PlayerEngine")
puts banshee.introspect
player_iface = banshee["org.bansheeproject.Banshee.PlayerEngine"]
puts player_iface.inspect
banshee.default_iface = "org.bansheeproject.Banshee.PlayerEngine"
banshee.on_signal("EventChanged") do |evnt, message, buffering_percent|
puts "#{evnt} #{message} #{buffering_percent}"
banshee.on_signal("StateChanged") do |state|
puts state
puts "Looping..."
loop =
loop << bus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment