~mir-team/mir/development-branch

« back to all changes in this revision

Viewing changes to doc/using_mir_on_pc.md

  • Committer: Alan Griffiths
  • Date: 2017-09-07 09:53:20 UTC
  • mto: (4245.1.1 mir-1.0-test)
  • mto: This revision was merged to the branch mainline in revision 4245.
  • Revision ID: alan@octopull.co.uk-20170907095320-f6tru4mntw165bhf
A pass at updating docs including integrating MirAL documentation

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Using Mir on a PC {#using_mir_on_pc}
2
 
=================
3
 
 
4
 
Before you begin
5
 
----------------
6
 
 
7
 
Make sure your hardware is supported. That means you're using a Mesa driver,
8
 
of which intel, radeon, and nouveau families are supported. If you're logged
9
 
in to X then run this command to verify an appropriate DRI driver is active:
10
 
 
11
 
    sudo pmap `pidof X` | grep dri.so
12
 
 
13
 
or
14
 
 
15
 
    lsmod | grep drm
16
 
 
17
 
Before you can use Mir you need to ensure you have the proper custom Mesa
18
 
build installed. If you are running Ubuntu 13.10 or later
19
 
(see \ref installing_prebuilt_on_pc), you should be good to go.
20
 
 
21
 
If you built Mir from source code (see \ref building_source_for_pc), you
22
 
need to ensure you are using the proper Mesa at runtime. You can do that by
23
 
installing the Mesa packages from Ubuntu 13.10 (or later) or by building the
24
 
custom Mesa yourself and ensuring it can be found by Mir, e.g., by using
25
 
`LD_LIBRARY_PATH`.
26
 
 
27
 
### Getting some example client applications
28
 
 
29
 
You can get some example programs by installing the `mir-demos` package:
30
 
 
31
 
    $ sudo apt-get install mir-demos
32
 
 
33
 
If you are building from source you can find client applications in the `bin/`
34
 
subdirectory of the build directory.
35
 
 
36
 
Running Mir
37
 
-----------
38
 
 
39
 
Mir can run run either natively on mesa-kms or as an X application.
40
 
 
41
 
### Running Mir on X
42
 
 
43
 
To run Mir as an X client start it from an X terminal:
44
 
 
45
 
    $ mir_demo_server --launch-client mir_demo_client_multiwin
46
 
    
47
 
You can start additional Mir clients, for example (in a new terminal):
48
 
 
49
 
    $ mir_demo_egltriangle
50
 
    
51
 
To exit from Mir:
52
 
 
53
 
    <Ctrl+Alt+BkSp>
54
 
    
55
 
Note: up to Mir 0.18 it is also necessary to specify `--platform-input-lib` when
56
 
starting the server:
57
 
  - for Mir-0.17 add: `--platform-input-lib server-mesa-x11.so.6`
58
 
  - for Mir-0.18 add: `--platform-input-lib server-mesa-x11.so.7`
59
 
 
60
 
### Running Mir natively
61
 
 
62
 
To run Mir natively on a PC/desktop/laptop:
63
 
 
64
 
    $ sudo DISPLAY= mir_demo_server --vt 1 --arw-file
65
 
    
66
 
This will switch you to a Mir session on VT1. Switch back to your X-based 
67
 
desktop:
68
 
 
69
 
    <Ctrl+Alt+F7>
70
 
    
71
 
In a new terminal:
72
 
 
73
 
    $ mir_demo_client_multiwin -m /tmp/mir_socket
74
 
    
75
 
Switch back to Mir.
76
 
 
77
 
    <Ctrl+Alt+F1>
78
 
    
79
 
Watch your friends be amazed!
80
 
 
81
 
To exit from Mir:
82
 
 
83
 
    <Ctrl+Alt+BkSp>
84
 
 
85
 
In case you accidentally killed your X login and ended up with a failsafe
86
 
screen, you might find on subsequent reboots you can't log in to X at all any
87
 
more (it instantly and silently takes you back to the login screen).  The fix
88
 
for this is to log in to a VT and:
89
 
 
90
 
    $ rm .Xauthority
91
 
    $ sudo restart lightdm