|
From: Ken M. <ke...@th...> - 2005-06-05 21:09:03
|
On Fri, 2005-06-03 at 11:03 +0200, Helge Hafting wrote: > Aivils wrote: > > >On Thursday 02 June 2005 04:27, Ken McCord wrote: > > > > > >>I'm running a dual-head setup using Debian unstable + the x.org packages > >>from Ubuntu. I have two sound cards, and I'd like to assign each of > >>them > >>to a specific X display. How can I do this? > >> <snip> > > > >Try out set up artsd under KDE or esd under GNOME . > > > >Even if these software sound mixers like artsd or esd runs > >properly, then You cannot disable Java and Flash Player, > >which uses sound device directly. > >I open Java binary with hexedit and manulay replace > >/dev/dsp with fake non-existing device file for silence. > > > > > There is a way. > One xserver can run in its own chroot. The two servers can have > distinct /dev directories that way, where the two "dsp" files in the > distinct directories have different device numbers and so > refer to different sound devices. > Make a copy of /dev in /chroot/dev. In there, make sure > "dsp" refers to the second soundcard instead of the first. > > On a debian system "dsp" is a symlink to "dsp0". Change it to > a link to "dsp1" instead. On other systems you may have to > do something like "mv dsp1 dsp0". > > Whatever the solution is, do the same for all other sound-related > files, such as "mixer" and so on. > > > Now the chroot has a customized /dev. But what about all the > other directories needed for normal operation, such as > /bin, /usr, /var, /home and so on? > > The answer is to bind-mount them. Bind-mount every top-level > directory except /dev into the chroot, and you should be fine. > Then chroot into the /chroot directory, and start the second xserver. > (Details: man mount, search for "bind") > > Having all those bind-mounts means you don't have to duplicate > a single file (except for the contents of /dev). Both xservers will > access the same files, so they should work and the users shouldn't > be able to notice the difference. Except that they get distinct soundcards. > <snip> > Helge Hafting I've played around with artsd and esd a bit more, and have been able to get /dev/dsp and /dev/dsp1 working, but there are problems. Using esd, you can't use Gnome's 'Enable Sound Server Startup' in the 'Sound Preferences' dialog box as it starts another copy of esd. I haven't been able to find where to set any options for this server (ie use the options I want to start the server). Logging off and on again is problematic, and I've also seen times where my setting for ESPEAKER gets modified. The idea of running the chroot is interesting. But would I need to chroot the xserver only, or parts of Gnome as well? Thanks, Ken |