* Per-host .asoundrc on shared $HOME
@ 2013-04-23 20:41 Mark Hills
0 siblings, 0 replies; only message in thread
From: Mark Hills @ 2013-04-23 20:41 UTC (permalink / raw)
To: alsa-devel
There is a very old thread [1] on alsa-user on this topic which seems to
go through some yucky solutions. I have the same use case, and post some
findings here.
Since pre-2003 alsa-lib calls wordexp(3) on the filenames. I am using the
patch below in /usr/share/alsa/alsa.conf
It follows a precedent set by other files such as .Xdefaults-hostname.
I'd submit a patch, except there seems to be no guarantee that HOSTNAME is
in the environment (on Slackware it is explicitly set in /etc/profile.)
Without it I can only see a bash local variable.
>From the old thread I imagine this function (or at least this mail) would
be useful to others.
Would it be better to patch the C code to provide a token (eg. '\h') that
is substituted by the hostname? Or is it enough to assume that HOSTNAME
would be set?
I didn't consider short vs. long hostnames, I suppose $HOSTNAME gives the
user/admin some control over this.
This:
~/.asoundrc-$(hostname -s)
may work, but I don't see that forking a process is an option.
[1] http://thread.gmane.org/gmane.linux.alsa.user/27532/focus=27542
--
Mark
--- alsa.conf.orig 2013-04-23 21:22:45.105454493 +0100
+++ alsa.conf 2013-04-23 21:16:41.707053308 +0100
@@ -17,6 +17,7 @@
}
"/etc/asound.conf"
"~/.asoundrc"
+ "~/.asoundrc-$HOSTNAME"
]
errors false
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-04-23 20:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-23 20:41 Per-host .asoundrc on shared $HOME Mark Hills
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.