Re: per host .asoundrc on shared $HOME

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At Wed, 06 Jun 2007 09:04:01 -0400,
Brian J. Murrell wrote:
> 
> I have a shared home dir on multiple machines.  I have a .asoundrc file
> for my local workstation but it contains stuff that is local to this
> machine.  When I go to another machine the stuff that's in my
> ~/.asoundrc is not relevant.
> 
> Is there a way to make a per-host specific .asoundrc file?

I thought there must be an environment variable to specify it but
apparently I was wrong.  So, I did some hack.

With the patch below, alsa-lib will check $ASOUNDRC variable, and look
for ~/.$ASOUNDRC file as the config file.  If the variable isn't set,
it defaults to ~/.asoundrc.

So, in your case, set like

	test -r ~/.asoundrc-$HOSTNAME && \
		export ASOUNDRC=asoundrc-$HOSTNAME

in ~/.bashrc.


Takashi

diff -r 0696aa1942b7 src/conf/alsa.conf
--- a/src/conf/alsa.conf	Mon Jun 04 15:22:04 2007 +0200
+++ b/src/conf/alsa.conf	Wed Jun 06 16:49:04 2007 +0200
@@ -9,7 +9,15 @@
 		func load
 		files [
 			"/etc/asound.conf"
-			"~/.asoundrc"
+			{ @func concat
+				strings [
+					"~/."
+					{ @func getenv
+						vars [ ASOUNDRC ]
+						default "asoundrc"
+					}
+				]
+			}
 		]
 		errors false
 	}

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Alsa-user mailing list
Alsa-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user

[Index of Archives]     [ALSA Devel]     [Linux Audio Users]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

  Powered by Linux