|
From: Arne G. G. <ar...@li...> - 2005-06-07 13:25:23
|
* Helge Hafting > 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") Using chroot for this seems a bit excessive to me. I'd suggest running the X-servers in separate namespaces (see bottom of http://www.win.tue.nl/~aeb/linux/lk/lk-6.html) and then use bind mount on a device node level to customize the different namespaces. Arne. |