Subject: Re: Access to shared memory objects?
From: Milan Zamazal <pdm@zamazal.org>
Date: Tue, 05 Feb 2008 11:11:56 +0100

>>>>> "HP" == Herbert Poetzl <herbert@13thfloor.at> writes:

    HP> as usual, what kernel version, what patches, what util-vserver
    HP> versions, what is the setup ...

Debian GNU/Linux, mixture of stable/testing/unstable, amd64, Debian
kernel version 2.6.22-3, no custom changes to the kernel, Debian
util-vserver package version 0.30.212-1.

    >> For instance pulseaudio reports the following on play:
    >> 
    >> E: shm.c: shm_open() failed: Read-only file system
    >> 
    >> I've found this can be resolved when /dev/input/ is mounted
    >> read/write on the guest.  In order to make it accessible also to
    >> non-root users, /dev/input/ must be set world writable on the
    >> host (this is not very good, but I couldn't find any better way
    >> to make it work).

I mount /dev/input from the host to the guest using the following
/etc/fstab entry:

  /dev/input /var/lib/vservers/blackbird/dev/input auto bind 0 0

On the host everything works fine for ordinary (non-root) users even
when /dev/input permissions are set to 755 on the host.  On the guest
the error above is reported unless /dev/input permissions are set to 777
on the host.  /etc/vservers/blackbird/bcapabilities contains the
following:

  CAP_MKNOD
  CAP_SYS_ADMIN
  CAP_SYS_RAWIO
  CAP_IPC_LOCK
  CAP_SYS_NICE

(I tried to add almost all other capabilities listed in capabilities(7)
but it didn't help.)

As for the mythtv problem, I've found out the problem occurs whenever
mythfrontend is run on a remote display.  So the problem is actually
likely to be related to the fact the X server and X session run on
different machines (the host and the guest) rather than to vserver as
such.

Regards,

Milan Zamazal