Mir in a virtual machine
Daniel van Vugt
daniel.van.vugt at canonical.com
Thu Jan 23 02:35:14 UTC 2014
Q: Does Mir support multiple monitors? If so, do you have any examples
or at least a starting point on how to set that up.
A: Yes... The API for affecting the multi-monitor config is
To enable basic multi-monitor testing you can:
mir_demo_server_shell --display-config sidebyside
Mir's multi-monitor configuration is already used in detail by XMir.
That's how you can configure displays from X under XMir.
Q: How does Mir handle surfaces with shapes cut out of them. For
example, a smiley face where the background is shown through the eyes
A: Create your surface with an alpha channel (e.g.
mir_pixel_format_abgr_8888) and then any pixels with alpha==0 will be
transparent. As an example of a free-form shape, you can run:
mir_demo_client_egltriangle -b 0.0
Q: Do clients need to have root access. For the fingerprint test, I
could not get it to run without a sudo.
A: Yes and no. A client can run as the same user as the server,
including non-root. This works perfectly for touch (Android) devices
however desktop has the problem of requiring root to access input
devices. You can run mir server and client on desktop as non-root but
you won't be able to interact with it.
On 23/01/14 01:21, Rian Quinn wrote:
> I was able to update my system, and my sources and was able to get Mir
> up and running.
> I am actually really impressed with the Mir source code. We were
> considering writing a lot of this ourselves, but I think that Mir has
> everything that we need already.
> I do have a couple of questions.
> - Does Mir support multiple monitors? If so, do you have any examples or
> at least a starting point on how to set that up.
> - How does Mir handle surfaces with shapes cut out of them. For example,
> a smiley face where the background is shown through the eyes and mouth.
> - Do clients need to have root access. For the fingerprint test, I could
> not get it to run without a sudo.
> - Rian
> For others interested in how I got Mir up and running, here were my steps:
> Install the 3.13 linux kernel. Here is what I used for that:
> Install libDRM from the following PPA:
> run sudo apt-get build-dep mir
> Download and compile Mir form the following:
> Download and compile Mir's version of Mesa and here are the compilation
> I had to add --disable-dri3 to get it to compile, plus the
> Once I was done with that, I could get the examples to execute.
> On Tue, Jan 21, 2014 at 8:44 PM, Daniel van Vugt
> <daniel.van.vugt at canonical.com <mailto:daniel.van.vugt at canonical.com>>
> VMware (Thomas Hellstrom) has implemented Mir support. Apparently
> you need kernel 3.13 for the requisite graphics driver DRM changes.
> And you need a newish Mesa.
> I don't think anyone has documented the particulars yet. But we
> certainly should at least by the time regular Ubuntu (trusty?) has
> all the prerequisites in place.
> - Daniel
> On 22/01/14 05:08, Rian Quinn wrote:
> Is it possible to get Mir up and running in a Virtual Machine. I
> both VMWare and VirtualBox. Currently, under VMWare, you get an
> about open_drm_device. Basically, I am working with Mir for some
> / server development, and would like to do testing in a virtual
> to start.
> - Rian
More information about the Mir-devel