Skip to content
Create a gist now

Instantly share code, notes, and snippets.

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'
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
Something went wrong with that request. Please try again.