Mercurial > libervia-backend
comparison doc/installation.rst @ 3990:3b72743b92db
doc[installation]: update instructions
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 24 Nov 2022 12:25:07 +0100 |
parents | 4d333f249625 |
children | 3f59a2b141cc |
comparison
equal
deleted
inserted
replaced
3989:f5ba7594cced | 3990:3b72743b92db |
---|---|
2 | 2 |
3 ============ | 3 ============ |
4 Installation | 4 Installation |
5 ============ | 5 ============ |
6 | 6 |
7 This are the instructions to install Libervia using Python. | 7 These are the instructions to install Libervia using Python. |
8 Note that if you are using GNU/Linux, Libervia may already be present on your distribution. | 8 Note that if you are using GNU/Linux, Libervia may already be present on your distribution. |
9 | 9 |
10 Libervia is made of one backend, and several frontends. To use it, the first thing to do is to install the backend. | 10 Libervia is made of one backend, and several frontends. To use it, the first thing to do is to install the backend. |
11 | 11 |
12 We recommand to use development version for now, until the release of 0.8. | 12 We recommand to use development version for now, until the release of 0.9. |
13 | 13 |
14 Development version | 14 Development version |
15 ------------------- | 15 ------------------- |
16 | 16 |
17 *Note for Arch users: a pkgbuild is available for your distribution on | 17 *Note for Arch users: a pkgbuild is available for your distribution on |
18 AUR, check sat-xmpp-hg (as well as other sat-\* packages).* | 18 AUR, check libervia-backend-hg (as well as other libervia-\* packages).* |
19 | 19 |
20 You can install the latest development version using pip. You need to | 20 You can install the latest development version using pip. You need to |
21 have the following dependencies installed first: | 21 have the following dependencies installed first: |
22 | 22 |
23 - Python 3 with development headers | 23 - Python 3 with development headers |
30 - libdbus-glib-1 with development headers | 30 - libdbus-glib-1 with development headers |
31 - libxml2 with development headers | 31 - libxml2 with development headers |
32 - libxlt2 with development headers | 32 - libxlt2 with development headers |
33 - D-Bus x11 tools (this doesn't needs X11, it is just needed for dbus-launch) | 33 - D-Bus x11 tools (this doesn't needs X11, it is just needed for dbus-launch) |
34 - cmake | 34 - cmake |
35 - Python GPG package (and its GPG dependencies), those are needed to use all OpenPGP | |
36 related features. We need to use the system package as package version needs to match | |
37 system GPG version. | |
35 | 38 |
36 On Debian and derivatives, you can get all this with following command:: | 39 On Debian and derivatives, you can get all this with following command:: |
37 | 40 |
38 $ sudo apt-get install python3-dev python3-venv python3-wheel mercurial libxml2-dev libxslt-dev libcairo2-dev libjpeg-dev libgirepository1.0-dev libdbus-1-dev libdbus-glib-1-dev dbus-x11 cmake | 41 $ sudo apt-get install python3-dev python3-venv python3-wheel mercurial libxml2-dev libxslt-dev libcairo2-dev libjpeg-dev libgirepository1.0-dev libdbus-1-dev libdbus-glib-1-dev dbus-x11 cmake python3-gpg |
39 | 42 |
40 Now go in a location where you can install Libervia, for | 43 Installation With pipx |
41 instance your home directory:: | 44 ~~~~~~~~~~~~~~~~~~~~~~ |
45 | |
46 If you have `pipx`_ installed, you can install the dev version of the backend by simply | |
47 entering:: | |
48 | |
49 $ pipx install --system-site-packages hg+https://repos.goffi.org/libervia-backend#egg=libervia-backend[SVG] | |
50 | |
51 Installation With Virtual Environment And pip | |
52 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
53 | |
54 Alternatively, you can install a virtual environment, clone the repository, and pip | |
55 install from there. | |
56 | |
57 Go in a location where you can install Libervia, for instance your home directory:: | |
42 | 58 |
43 $ cd | 59 $ cd |
44 | 60 |
45 And enter the following commands (here we install Libervia with SVG support, which is needed to | 61 And enter the following commands (here we install Libervia with SVG support, which is needed to |
46 display SVG avatars on some frontends):: | 62 display SVG avatars on some frontends):: |
47 | 63 |
48 $ python3 -m venv libervia | 64 $ python3 -m venv --system-site-packages libervia |
49 $ source libervia/bin/activate | 65 $ source libervia/bin/activate |
50 $ pip install -U pip wheel | 66 $ pip install -U pip wheel |
51 $ hg clone https://repos.goffi.org/libervia-backend | 67 $ hg clone https://repos.goffi.org/libervia-backend |
52 $ cd libervia-backend | 68 $ cd libervia-backend |
53 $ pip install -r requirements.txt | 69 $ pip install -r requirements.txt |
54 | 70 |
55 Don't worry if you see the following message, Libervia should work anyway:: | 71 Don't worry if you see the following message, Libervia should work anyway:: |
56 | 72 |
57 Failed building wheel for pygobject | 73 Failed building wheel for <some_package_name> |
58 | 74 |
59 After installing Libervia, you need to install the media:: | 75 Post Installation |
76 ~~~~~~~~~~~~~~~~~ | |
77 | |
78 After installing Libervia, you need to install the media (you may skip this if you don't | |
79 plan to use any graphical frontend):: | |
60 | 80 |
61 $ cd | 81 $ cd |
62 $ hg clone https://repos.goffi.org/libervia-media | 82 $ hg clone https://repos.goffi.org/libervia-media |
63 | 83 |
64 then, create the directory ``~/.config/libervia``:: | 84 then, create the directory ``~/.config/libervia``:: |
94 To know if backend is launched or not:: | 114 To know if backend is launched or not:: |
95 | 115 |
96 $ libervia-backend status | 116 $ libervia-backend status |
97 | 117 |
98 **NOTE**: if ``misc/org.libervia.Libervia.service`` is installed correctly (which should | 118 **NOTE**: if ``misc/org.libervia.Libervia.service`` is installed correctly (which should |
99 be done by during the installation), the backend is automatically launched when a frontend | 119 be done during the installation), the backend is automatically launched when a frontend |
100 needs it. | 120 needs it. |
101 | 121 |
102 You can check that Libervia is installed correctly by trying jp (the backend need to be | 122 You can check that Libervia is installed correctly by trying jp (the backend need to be |
103 launched first, check below):: | 123 launched first, check below):: |
104 | 124 |
109 | 129 |
110 If you have a similar output, Libervia is working. | 130 If you have a similar output, Libervia is working. |
111 | 131 |
112 .. note:: | 132 .. note:: |
113 | 133 |
114 if you have the message ``/!\ D-Bus is not launched, please see README to see | 134 You may see an error message indicating that D-Bus is not launched or that its |
115 instructions on how to launch it`` that mean that the D-Bus service is not launched, this | 135 environment variable is not set, this usually happens when launching Libervia on a |
116 usually happens when launching Libervia on a server, without graphic interface like X.org or | 136 server, without graphic interface like X.org or Wayland (otherwise D-Bus service should |
117 Wayland (in which case D-Bus service should be launcher automatically). | 137 be launched automatically). In this case please follow instructions below. |
118 | 138 |
119 As the message states, instructions on how to launch the service are given in the README | 139 Launching D-Bus (on servers) |
120 file of Libervia. | 140 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
141 | |
142 You can launch the D-Bus service by creating a shell script with the following content | |
143 in a file named ``dbus_launch.sh``: | |
144 | |
145 .. sourcecode:: sh | |
146 | |
147 #!/bin/sh | |
148 | |
149 DBUS_PATH="/tmp/.dbus.`whoami`" | |
150 | |
151 if [ ! -e $DBUS_PATH ]; then | |
152 dbus-launch --sh-syntax > $DBUS_PATH | |
153 chmod 400 $DBUS_PATH | |
154 fi | |
155 | |
156 cat $DBUS_PATH | |
157 | |
158 Then run it before the backend or frontend by entering:: | |
159 | |
160 $ eval $(/path/to/dbus_launch.sh) | |
161 | |
162 This will launch the D-Bus daemon if necessary, and set the appropriate environment | |
163 variable. If you use a new shell, be sure to launch the script again in an ``eval`` | |
164 statement to have the environment variable set. You can put this in your ``.zshrc`` (or | |
165 whatever you're using) to make it automatic. | |
166 | |
167 If you don't want to use D-Bus, you can use another bridge, e.g. ``pb`` is a good | |
168 choice, by updating your :ref:`configuration` ``[DEFAULT]`` section with ``bridge = | |
169 pb``. | |
121 | 170 |
122 Frontends | 171 Frontends |
123 ========= | 172 ========= |
124 | 173 |
125 So far, the following frontends exist and are actively maintained: | 174 So far, the following frontends exist and are actively maintained: |
155 Wix | 204 Wix |
156 former desktop frontend based on WxWidgets (deprecated with version 0.6.0) | 205 former desktop frontend based on WxWidgets (deprecated with version 0.6.0) |
157 | 206 |
158 Sententia | 207 Sententia |
159 Emacs frontend developed by a third party (development is currently stalled) | 208 Emacs frontend developed by a third party (development is currently stalled) |
209 | |
210 .. _pipx: https://pypa.github.io/pipx/ |