~alan-griffiths/miral/fix-miral-qt

110 by Alan Griffiths
A bit of documentation
1
Building and using Miral
2
========================
3
4
These instructions assume that you’re using Ubuntu 16.04LTS or later, I’ve not
5
earlier Ubuntu versions or other distributions.
6
7
You’ll need a few development and utility packages installed, along with the
171.1.10 by Alan Griffiths
Tidy up instructions and CMakeLists.txt
8
Mir development packages:
110 by Alan Griffiths
A bit of documentation
9
10
    $ sudo apt-get install cmake g++ make bzr python-pil
171.1.10 by Alan Griffiths
Tidy up instructions and CMakeLists.txt
11
    $ sudo apt-get install libmirserver-dev libmirclient-dev mirtest-dev
12
    $ sudo apt-get install mir-graphics-drivers-desktop
13
14
(If you’re working on a phone or tablet use mir-graphics-drivers-android in
15
place of mir-graphics-drivers-desktop.)
16
110 by Alan Griffiths
A bit of documentation
17
With these installed you can checkout and build miral:
18
19
    $ bzr branch lp:miral
20
    $ mkdir miral/build
21
    $ cd  miral/build
22
    $ cmake ..
23
    $ make
24
    
25
This creates libmiral.so in the lib directory and an example shell 
26
(miral-shell) in the bin directory. This can be run directly:
27
28
    $ bin/miral-shell
29
    
30
With the default options this runs in a window on X (which is convenient for
31
development). To run independently of X you need to grant access to the 
32
graphics hardware and specify a VT to run in. For example:
33
34
    $ sudo bin/miral-shell --vt 4 --arw-file --file $XDG_RUNTIME_DIR/mir_socket
35
    
36
The miral-shell example is simple, don’t expect to see a sophisticated launcher
37
by default. You can start mir apps from the command-line. For example:
38
 
128 by Alan Griffiths
Update building_and_using_miral.md
39
    $ bin/miral-run gnome-terminal
40
    
130 by Alan Griffiths
Rewording docs
41
That’s right, a lot of standard GTK+ applications will “just work” (the GDK
42
toolkit has a Mir backend). Any that assume the existence of an X11 and bypass
43
the toolkit my making X11 protocol calls will have problems though.
128 by Alan Griffiths
Update building_and_using_miral.md
44
130 by Alan Griffiths
Rewording docs
45
To exit from miral-shell press Ctrl-Alt-BkSp.
128 by Alan Griffiths
Update building_and_using_miral.md
46
47
48
Running applications on Miral
49
-----------------------------
50
51
Assuming you have a Mir server running, native Mir applications can be started
52
from the command-line:
53
54
    $ sudo apt-get install mir-demos
55
    $ mir_demo_client_egltriangle
56
57
Similarly, GTK+, Qt and SDL applications can be run with the miral-run script:
58
 
59
    $ bin/miral-run gedit
60
    $ bin/miral-run 7kaa
61
62
63
Configuration options
64
---------------------
65
66
You can list the configuration options for miral-shell with "--help":
67
68
    $ bin/miral-shell --help
69
    
70
Most of these options are inherited from Mir. These can be set on the command
71
line, by environment variables or in a config file. For example, if you want to
72
start the gnome-terminal when you run miral-shell you can:
73
74
Set supply the option on the command line:
75
76
    $ bin/miral-shell --startup-apps gnome-terminal
77
    
78
Set the corresponding MIR_SERVER_<option> environment variable:
79
    
80
    $ export MIR_SERVER_STARTUP_APPS=gnome-terminal
81
    ...
82
    $ bin/miral-shell
83
    
84
Create a miral-shell config file:
85
86
    $ echo startup-apps=gnome-terminal > ~/.config/miral-shell.config
87
    ...
88
    $ bin/miral-shell