1
Using Mir on a PC {#using_mir_on_pc}
7
Before you can use Mir you need to ensure you have the proper custom Mesa build
8
installed. If you installed Mir using the packages from mir-team staging PPA
9
(see \ref installing_prebuilt_on_pc), you should be good to go.
11
If you built Mir from source code (see \ref building_source_for_pc), you need
12
to ensure you are using the proper Mesa at runtime. You can do that by
13
installing the Mesa packages manually from the staging PPA, or by building the
14
custom Mesa yourself and ensuring it can be found by mir, e.g., by using
17
Using Mir as system compositor with X
18
-------------------------------------
20
Note: for this to work you need to have Mir and all its dependencies (which
21
include lightdm, Mesa and the Xorg drivers). The easiest way is to install
22
pre-built packages from the staging PPA.
24
To run X sessions under Mir, with Mir acting as the system compositor, edit
25
your /etc/lightdm/lightdm.conf to look to look like this:
29
greeter-session=unity-greeter
34
$ sudo service lightdm restart
36
In theory, you should now find yourself back in Ubuntu and not notice
37
anything different. You can verify you're in mir several ways:
40
$ grep -i xmir /var/log/Xorg.0.log
41
$ ls -l /var/log/lightdm/mir.log
46
You can also run Mir natively. To do so, log in to VT1 (Ctrl+Alt+F1) _after_
47
you are already logged in to X. If you do so before then you will not be
48
assigned adequate credentials to access the graphics hardware and will get
51
Note that you can switch back to X using Alt+F7. But it is very important to
52
remember NOT to switch once you have any mir binaries running. Doing so will
53
currently make X die (!).
55
Now we want to run the mir server and a client to render something. The trick
56
is that we need to make sure the mir server is easy to terminate before ever
57
switching back to X. To ensure this, the server needs to be in the foreground,
58
but starting before your client (in the background). To do this, you must:
60
$ (sleep 3; some-mir-client) & mir ; kill $!
62
Wait 3 seconds and the client will start. You can kill it with Ctrl+C. REMEMBER
63
to kill the mir processes fully before attempting to switch back to X or your X
66
In case you accidentally killed your X login and ended up with a failsafe
67
screen, you might find on subsequent reboots you can't log in to X at all any
68
more (it instantly and silently takes you back to the login screen). The fix
69
for this is to log in to a VT and:
72
$ sudo restart lightdm
74
Getting some example client applications
75
----------------------------------------
77
If you installed mir using the packages from the mir-team staging PPA, you can
78
get some example programs by installing the `libmirclient-demos` package:
80
$ sudo apt-get install libmirclient-demos
82
If you are building from source you can find client applications in the bin/
83
subdirectory of the build directory.