Need a Mir server?
A couple of times in the last week I’ve been asked about a Mir server for testing. These requests have been from folks wanting to test their client-side work against Mir.
Most application developers will be using a toolkit or other graphics development library and not care if they are running on X11, Mir or even Windows. But the developers of those libraries will want to test with Mir.
For this purpose, the simplest Mir server to use is miral-shell. If you’re on Ubuntu Zesty Zapus then this is readily available:
$ sudo apt install miral-examples mir-graphics-drivers-desktop qtubuntu-desktop
If you’re on an earlier version of Ubuntu then you either need a ppa (such as the “stable phone overlay”) or, less risky to your system, just build and install it yourself. (If you’re not on Ubuntu this is still possible: there are some pointers here.)
What does miral-server provide?
Currently miral-server is the only Mir server to offer libmiral’s “basic window management”. That unique status is due to change real soon as this implementation is being merged into Unity8.
The simplest way way to run miral-shell is using Mir’s “Mir on X” support. From a terminal window just type:
Then you can connect your application from another terminal:
$ miral-run <application>
You should see your application appear in the “Mir on X” window.
A lot of the current work is focused on the placement of windows (menues, popup, etc.) and to help with this there’s a facility to trace the window management calls. Start miral-shell like this:
$ miral-shell --window-management-trace
And all the window management events and decisions are logged.
Another interesting option is to use a “tiling” window manager:
$ miral-shell --window-manager tiling
Which has a completely different approach to laying out the application windows.
For a full list of the option:
$ miral-shell --help
Documentation of the Mir “toolkit”API
A related question I’ve been asked is for documentation of the libmirclient API. You can find the documentation like this:
$ sudo apt install mir-doc $ xdg-open /usr/share/doc/mir-doc/html/group__mir__toolkit.htm
This will open the default browser on the relevant page.