7.1.1. Using aRts daemon
We have to specify different sound devices for the different Xsessions/Displays. This is done by using the following options of aRts daemon (http://www.arts-project.org/):
By OSS-free sound driver:
where n is the number of the sound card.
By Alsa sound driver:
where n is sound card id.
Add these lines to your Window Manager start-up script (of course, with the proper arguments for your setup):
real_display=`echo $DISPLAY | sed "s/://" | sed "s/\..*//"`
case "$real_display" in
0)
artsd -F 10 -S 4096 -D /dev/dsp -s 5 -m artsmessage -l 3 -f &
;;
1)
artsd -F 10 -S 4096 -D /dev/dsp1 -s 5 -m artsmessage -l 3 -f &
;;
2)
artsd -F 10 -S 4096 -a alsa -D hw:4,0 -s 5 -m artsmessage -l 3 -f &
;;
esac
|
And at the end of the file:
Here is an example for /usr/X11R6/bin/startenlightenment:
#!/bin/sh
# License: GPL
real_display=`echo $DISPLAY | sed "s/://" | sed "s/\..*//"`
case "$real_display" in
0)
artsd -F 10 -S 4096 -D /dev/dsp -s 5 -m artsmessage -l 3 -f &
;;
1)
artsd -F 10 -S 4096 -D /dev/dsp1 -s 5 -m artsmessage -l 3 -f &
;;
2)
artsd -F 10 -S 4096 -a alsa -D hw:2,0 -s 5 -m artsmessage -l 3 -f &
;;
esac
/usr/X11R6/bin/enlightenment
artsshell -q terminate
|
This will start 3 aRts daemons for 3 X servers.
Daemon will use the first OSS sound device for the 1st X server.
Daemon will use the second OSS sound device for the 2nd X server.
Daemon will use the Alsa sound device for the 3rd X server (requires feedback).