public
Last active

Pulse Audio socket path with ruby-dbus

  • Download Gist
dbus-pulseaudio.rb
Ruby
1 2 3 4 5 6 7 8 9 10 11
#! /usr/bin/env ruby
require 'rubygems'
require 'dbus'
b = DBus.session_bus
ps = b.service 'org.PulseAudio1'
po = ps.object '/org/pulseaudio/server_lookup1'
po.introspect
pi = po['org.PulseAudio.ServerLookup1']
a = pi['Address']
path = a.split('=').last
system 'stat', path

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.