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
mir_connection_create_display_config
mir_connection_apply_display_config
etc.. http://unity.ubuntu.com/mir/group__mir__toolkit.html
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
and mouth.
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:
> Daniel,
>
> 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.
>
> Thanks,
> - Rian
>
> For others interested in how I got Mir up and running, here were my steps:
>
> 1:
> Install the 3.13 linux kernel. Here is what I used for that:
> http://linuxg.net/how-to-install-kernel-3-13-rc-7-on-ubuntu-linux-mint-pear-os-and-elementary-os/
>
> 2:
> Install libDRM from the following PPA:
> https://launchpad.net/~oibaf/+archive/graphics-drivers/
>
> 3:
> run sudo apt-get build-dep mir
>
> 4:
> Download and compile Mir form the following:
> http://unity.ubuntu.com/mir/building_source_for_pc.html
>
> 5:
> Download and compile Mir's version of Mesa and here are the compilation
> steps:
> http://www.mesa3d.org/install.html
>
> I had to add --disable-dri3 to get it to compile, plus the
> --with-egl-platform=mir,drm
>
> 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>>
> wrote:
>
> Rian,
>
> 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
> have
> both VMWare and VirtualBox. Currently, under VMWare, you get an
> error
> about open_drm_device. Basically, I am working with Mir for some
> client
> / server development, and would like to do testing in a virtual
> machine
> to start.
>
> Thanks,
> - Rian
>
>
>
More information about the Mir-devel
mailing list