Mercurial > libervia-backend
annotate doc/installation.rst @ 4035:9c76678a39e2
cli (info/disco): Add external services in results:
rel 418
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 07 Apr 2023 15:18:05 +0200 |
parents | 3b72743b92db |
children | 3f59a2b141cc |
rev | line source |
---|---|
3022 | 1 .. _installation: |
2 | |
2946 | 3 ============ |
4 Installation | |
5 ============ | |
6 | |
3990
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
7 These are the instructions to install Libervia using Python. |
3505 | 8 Note that if you are using GNU/Linux, Libervia may already be present on your distribution. |
2946 | 9 |
3505 | 10 Libervia is made of one backend, and several frontends. To use it, the first thing to do is to install the backend. |
2946 | 11 |
3990
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
12 We recommand to use development version for now, until the release of 0.9. |
2946 | 13 |
14 Development version | |
15 ------------------- | |
16 | |
17 *Note for Arch users: a pkgbuild is available for your distribution on | |
3990
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
18 AUR, check libervia-backend-hg (as well as other libervia-\* packages).* |
2946 | 19 |
20 You can install the latest development version using pip. You need to | |
21 have the following dependencies installed first: | |
22 | |
3260
e9ecd133773b
doc (installation): updated instructions for backend
Goffi <goffi@goffi.org>
parents:
3022
diff
changeset
|
23 - Python 3 with development headers |
3383 | 24 - Python 3 "venv", which may already be installed with Python 3 |
2946 | 25 - Mercurial |
3383 | 26 - libcairo 2 with development header |
2946 | 27 - libjpeg with development headers |
28 - libgirepository 1.0 with development headers | |
29 - libdbus-1 with development headers | |
30 - libdbus-glib-1 with development headers | |
31 - libxml2 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) | |
34 - cmake | |
3990
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
35 - Python GPG package (and its GPG dependencies), those are needed to use all OpenPGP |
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
36 related features. We need to use the system package as package version needs to match |
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
37 system GPG version. |
2946 | 38 |
39 On Debian and derivatives, you can get all this with following command:: | |
40 | |
3990
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
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 |
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
42 |
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
43 Installation With pipx |
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
44 ~~~~~~~~~~~~~~~~~~~~~~ |
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
45 |
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
46 If you have `pipx`_ installed, you can install the dev version of the backend by simply |
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
47 entering:: |
2946 | 48 |
3990
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
49 $ pipx install --system-site-packages hg+https://repos.goffi.org/libervia-backend#egg=libervia-backend[SVG] |
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
50 |
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
51 Installation With Virtual Environment And pip |
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
52 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
53 |
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
54 Alternatively, you can install a virtual environment, clone the repository, and pip |
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
55 install from there. |
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
56 |
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
57 Go in a location where you can install Libervia, for instance your home directory:: |
2946 | 58 |
59 $ cd | |
60 | |
3558
d8581c83fef3
doc (installation): update instruction to use requirements + fix name in a few places
Goffi <goffi@goffi.org>
parents:
3536
diff
changeset
|
61 And enter the following commands (here we install Libervia with SVG support, which is needed to |
3260
e9ecd133773b
doc (installation): updated instructions for backend
Goffi <goffi@goffi.org>
parents:
3022
diff
changeset
|
62 display SVG avatars on some frontends):: |
2946 | 63 |
3990
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
64 $ python3 -m venv --system-site-packages libervia |
3563
267e4987b58b
doc: fix remaining SàT references/typos + add `libervia-cli` missing commands
Goffi <goffi@goffi.org>
parents:
3558
diff
changeset
|
65 $ source libervia/bin/activate |
3558
d8581c83fef3
doc (installation): update instruction to use requirements + fix name in a few places
Goffi <goffi@goffi.org>
parents:
3536
diff
changeset
|
66 $ pip install -U pip wheel |
3774
df836d6f9c8a
doc (installation): fix missing `hg clone` instructions
Goffi <goffi@goffi.org>
parents:
3563
diff
changeset
|
67 $ hg clone https://repos.goffi.org/libervia-backend |
df836d6f9c8a
doc (installation): fix missing `hg clone` instructions
Goffi <goffi@goffi.org>
parents:
3563
diff
changeset
|
68 $ cd libervia-backend |
3558
d8581c83fef3
doc (installation): update instruction to use requirements + fix name in a few places
Goffi <goffi@goffi.org>
parents:
3536
diff
changeset
|
69 $ pip install -r requirements.txt |
2946 | 70 |
3558
d8581c83fef3
doc (installation): update instruction to use requirements + fix name in a few places
Goffi <goffi@goffi.org>
parents:
3536
diff
changeset
|
71 Don't worry if you see the following message, Libervia should work anyway:: |
2946 | 72 |
3990
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
73 Failed building wheel for <some_package_name> |
2946 | 74 |
3990
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
75 Post Installation |
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
76 ~~~~~~~~~~~~~~~~~ |
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
77 |
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
78 After installing Libervia, you need to install the media (you may skip this if you don't |
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
79 plan to use any graphical frontend):: |
2946 | 80 |
81 $ cd | |
3776
4d333f249625
doc (installation): `sat_media` is now `libervia-media`
Goffi <goffi@goffi.org>
parents:
3774
diff
changeset
|
82 $ hg clone https://repos.goffi.org/libervia-media |
2946 | 83 |
3563
267e4987b58b
doc: fix remaining SàT references/typos + add `libervia-cli` missing commands
Goffi <goffi@goffi.org>
parents:
3558
diff
changeset
|
84 then, create the directory ``~/.config/libervia``:: |
3353
7726916c1ba6
doc: updated installation instructions
Goffi <goffi@goffi.org>
parents:
3260
diff
changeset
|
85 |
3563
267e4987b58b
doc: fix remaining SàT references/typos + add `libervia-cli` missing commands
Goffi <goffi@goffi.org>
parents:
3558
diff
changeset
|
86 $ mkdir -p ~/.config/libervia |
3353
7726916c1ba6
doc: updated installation instructions
Goffi <goffi@goffi.org>
parents:
3260
diff
changeset
|
87 |
3563
267e4987b58b
doc: fix remaining SàT references/typos + add `libervia-cli` missing commands
Goffi <goffi@goffi.org>
parents:
3558
diff
changeset
|
88 and the file ``~/.config/libervia/libervia.conf`` containing: |
2946 | 89 |
90 .. sourcecode:: cfg | |
91 | |
92 [DEFAULT] | |
3776
4d333f249625
doc (installation): `sat_media` is now `libervia-media`
Goffi <goffi@goffi.org>
parents:
3774
diff
changeset
|
93 media_dir = ~/libervia-media |
2946 | 94 |
3776
4d333f249625
doc (installation): `sat_media` is now `libervia-media`
Goffi <goffi@goffi.org>
parents:
3774
diff
changeset
|
95 Of course, replace ``~/libervia-media`` with the actual path you have used. |
2946 | 96 |
3260
e9ecd133773b
doc (installation): updated instructions for backend
Goffi <goffi@goffi.org>
parents:
3022
diff
changeset
|
97 You can check :ref:`configuration` for details |
2946 | 98 |
99 Usage | |
100 ===== | |
101 | |
3563
267e4987b58b
doc: fix remaining SàT references/typos + add `libervia-cli` missing commands
Goffi <goffi@goffi.org>
parents:
3558
diff
changeset
|
102 To launch the Libervia backend, enter:: |
2946 | 103 |
3563
267e4987b58b
doc: fix remaining SàT references/typos + add `libervia-cli` missing commands
Goffi <goffi@goffi.org>
parents:
3558
diff
changeset
|
104 $ libervia-backend |
2946 | 105 |
106 …or, if you want to launch it in foreground:: | |
107 | |
3563
267e4987b58b
doc: fix remaining SàT references/typos + add `libervia-cli` missing commands
Goffi <goffi@goffi.org>
parents:
3558
diff
changeset
|
108 $ libervia-backend fg |
2946 | 109 |
110 You can stop it with:: | |
111 | |
3563
267e4987b58b
doc: fix remaining SàT references/typos + add `libervia-cli` missing commands
Goffi <goffi@goffi.org>
parents:
3558
diff
changeset
|
112 $ libervia-backend stop |
2946 | 113 |
114 To know if backend is launched or not:: | |
115 | |
3563
267e4987b58b
doc: fix remaining SàT references/typos + add `libervia-cli` missing commands
Goffi <goffi@goffi.org>
parents:
3558
diff
changeset
|
116 $ libervia-backend status |
2946 | 117 |
3558
d8581c83fef3
doc (installation): update instruction to use requirements + fix name in a few places
Goffi <goffi@goffi.org>
parents:
3536
diff
changeset
|
118 **NOTE**: if ``misc/org.libervia.Libervia.service`` is installed correctly (which should |
3990
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
119 be done during the installation), the backend is automatically launched when a frontend |
3558
d8581c83fef3
doc (installation): update instruction to use requirements + fix name in a few places
Goffi <goffi@goffi.org>
parents:
3536
diff
changeset
|
120 needs it. |
2946 | 121 |
3558
d8581c83fef3
doc (installation): update instruction to use requirements + fix name in a few places
Goffi <goffi@goffi.org>
parents:
3536
diff
changeset
|
122 You can check that Libervia is installed correctly by trying jp (the backend need to be |
d8581c83fef3
doc (installation): update instruction to use requirements + fix name in a few places
Goffi <goffi@goffi.org>
parents:
3536
diff
changeset
|
123 launched first, check below):: |
2946 | 124 |
3558
d8581c83fef3
doc (installation): update instruction to use requirements + fix name in a few places
Goffi <goffi@goffi.org>
parents:
3536
diff
changeset
|
125 $ li --version |
d8581c83fef3
doc (installation): update instruction to use requirements + fix name in a few places
Goffi <goffi@goffi.org>
parents:
3536
diff
changeset
|
126 Libervia CLI 0.8.0D « La Cecília » (rev 184c66256bbc [M] (default 2021-06-09 11:35 +0200) +524) Copyright (C) 2009-2021 Jérôme Poisson, Adrien Cossa |
2946 | 127 This program comes with ABSOLUTELY NO WARRANTY; |
128 This is free software, and you are welcome to redistribute it under certain conditions. | |
129 | |
3558
d8581c83fef3
doc (installation): update instruction to use requirements + fix name in a few places
Goffi <goffi@goffi.org>
parents:
3536
diff
changeset
|
130 If you have a similar output, Libervia is working. |
2946 | 131 |
3353
7726916c1ba6
doc: updated installation instructions
Goffi <goffi@goffi.org>
parents:
3260
diff
changeset
|
132 .. note:: |
7726916c1ba6
doc: updated installation instructions
Goffi <goffi@goffi.org>
parents:
3260
diff
changeset
|
133 |
3990
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
134 You may see an error message indicating that D-Bus is not launched or that its |
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
135 environment variable is not set, this usually happens when launching Libervia on a |
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
136 server, without graphic interface like X.org or Wayland (otherwise D-Bus service should |
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
137 be launched automatically). In this case please follow instructions below. |
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
138 |
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
139 Launching D-Bus (on servers) |
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
140 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
141 |
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
142 You can launch the D-Bus service by creating a shell script with the following content |
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
143 in a file named ``dbus_launch.sh``: |
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
144 |
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
145 .. sourcecode:: sh |
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
146 |
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
147 #!/bin/sh |
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
148 |
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
149 DBUS_PATH="/tmp/.dbus.`whoami`" |
3353
7726916c1ba6
doc: updated installation instructions
Goffi <goffi@goffi.org>
parents:
3260
diff
changeset
|
150 |
3990
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
151 if [ ! -e $DBUS_PATH ]; then |
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
152 dbus-launch --sh-syntax > $DBUS_PATH |
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
153 chmod 400 $DBUS_PATH |
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
154 fi |
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
155 |
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
156 cat $DBUS_PATH |
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
157 |
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
158 Then run it before the backend or frontend by entering:: |
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
159 |
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
160 $ eval $(/path/to/dbus_launch.sh) |
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
161 |
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
162 This will launch the D-Bus daemon if necessary, and set the appropriate environment |
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
163 variable. If you use a new shell, be sure to launch the script again in an ``eval`` |
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
164 statement to have the environment variable set. You can put this in your ``.zshrc`` (or |
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
165 whatever you're using) to make it automatic. |
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
166 |
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
167 If you don't want to use D-Bus, you can use another bridge, e.g. ``pb`` is a good |
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
168 choice, by updating your :ref:`configuration` ``[DEFAULT]`` section with ``bridge = |
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
169 pb``. |
3353
7726916c1ba6
doc: updated installation instructions
Goffi <goffi@goffi.org>
parents:
3260
diff
changeset
|
170 |
2946 | 171 Frontends |
172 ========= | |
173 | |
174 So far, the following frontends exist and are actively maintained: | |
175 | |
3558
d8581c83fef3
doc (installation): update instruction to use requirements + fix name in a few places
Goffi <goffi@goffi.org>
parents:
3536
diff
changeset
|
176 Libervia Desktop (aka Cagou) |
2946 | 177 desktop/mobile (Android) frontend |
178 | |
3558
d8581c83fef3
doc (installation): update instruction to use requirements + fix name in a few places
Goffi <goffi@goffi.org>
parents:
3536
diff
changeset
|
179 Libervia Web |
2946 | 180 the web frontend |
181 | |
3558
d8581c83fef3
doc (installation): update instruction to use requirements + fix name in a few places
Goffi <goffi@goffi.org>
parents:
3536
diff
changeset
|
182 Libervia TUI (aka Primitivus) |
2946 | 183 Text User Interface |
184 | |
3558
d8581c83fef3
doc (installation): update instruction to use requirements + fix name in a few places
Goffi <goffi@goffi.org>
parents:
3536
diff
changeset
|
185 Libervia CLI (aka jp or li) |
2946 | 186 Command Line Interface |
187 | |
3558
d8581c83fef3
doc (installation): update instruction to use requirements + fix name in a few places
Goffi <goffi@goffi.org>
parents:
3536
diff
changeset
|
188 To launch Libervia TUI, just type:: |
2946 | 189 |
3558
d8581c83fef3
doc (installation): update instruction to use requirements + fix name in a few places
Goffi <goffi@goffi.org>
parents:
3536
diff
changeset
|
190 $ libervia-tui |
2946 | 191 |
192 then create a profile (XMPP account must already exist). | |
193 | |
3558
d8581c83fef3
doc (installation): update instruction to use requirements + fix name in a few places
Goffi <goffi@goffi.org>
parents:
3536
diff
changeset
|
194 To use Libervia CLI, follow its help (``li`` is a shortcut for ``libervia-cli``):: |
2946 | 195 |
3558
d8581c83fef3
doc (installation): update instruction to use requirements + fix name in a few places
Goffi <goffi@goffi.org>
parents:
3536
diff
changeset
|
196 $ li --help |
2946 | 197 |
198 | |
199 There are some other frontends: | |
200 | |
201 Bellaciao | |
202 based on Qt, a rich desktop frontend (currently on hold) | |
203 | |
204 Wix | |
205 former desktop frontend based on WxWidgets (deprecated with version 0.6.0) | |
206 | |
207 Sententia | |
208 Emacs frontend developed by a third party (development is currently stalled) | |
3990
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
209 |
3b72743b92db
doc[installation]: update instructions
Goffi <goffi@goffi.org>
parents:
3776
diff
changeset
|
210 .. _pipx: https://pypa.github.io/pipx/ |