Skip to content

Instantly share code, notes, and snippets.

@mvidner
Created November 19, 2012 16:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mvidner/4111846 to your computer and use it in GitHub Desktop.
Save mvidner/4111846 to your computer and use it in GitHub Desktop.
Pulse Audio socket path with ruby-dbus
#! /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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment