README.md 8.14 KB
Newer Older
Nico's avatar
Nico committed
1
2
# Briar GTK

Nico's avatar
Nico committed
3
4
[![pipeline status](https://code.briarproject.org/briar/briar-gtk/badges/main/pipeline.svg)](https://code.briarproject.org/briar/briar-gtk/commits/main)
[![coverage report](https://code.briarproject.org/briar/briar-gtk/badges/main/coverage.svg)](https://code.briarproject.org/briar/briar-gtk/commits/main)
Nico's avatar
Nico committed
5

Nico's avatar
Nico committed
6
7
Note: Briar GTK is about to get replaced by [Briar Desktop](https://code.briarproject.org/briar/briar-desktop/) and is therefore no longer under development.

Nico's avatar
Nico committed
8
A GTK app for [Briar](https://briar.app), bringing secure messaging to your desktop and mobile devices.
Nico's avatar
Nico committed
9
It uses [briar_wrapper](https://code.briarproject.org/briar/python-briar-wrapper) and the
Nico's avatar
Nico committed
10
[Briar REST API](https://code.briarproject.org/briar/briar/blob/master/briar-headless/README.md)
Nico's avatar
Nico committed
11
12
and therefore requires Java and Python.
Currently, it only supports private chats and requires a x86 Linux.
Nico's avatar
Nico committed
13

Nico's avatar
Nico committed
14
15
![Screenshot of Briar GTK showing conversation screen with two contacts and open chat with Alice](tools/screenshots/briar-gtk-screenshot-1.png)

16
17
For regular updates, check out the Briar tag on
[Nico Alt's blog](https://nico.dorfbrunnen.eu/tags/briar/)
Nico's avatar
Nico committed
18
19
20
([RSS feed](https://nico.dorfbrunnen.eu/tags/briar/index.xml))
and watch the
[milestones of this repo](https://code.briarproject.org/briar/briar-gtk/-/milestones).
21

Nico's avatar
Nico committed
22
23
## Installation

Nico's avatar
Nico committed
24
25
26
27
28
29
We plan to distribute Briar via Debian (and related distributions) as _.deb_ and
via [Flathub.org](https://flathub.org/home) as flatpak, but until now, there are
only semi-official installation methods available. You might want to use them now
for not having to wait, but please note that those installation methods will be deprecated
once Briar is available in Debian and Flathub.org.

30
31
### Flatpak

Nico's avatar
Nico committed
32
Briar GTK can be installed using Flatpak.
33
34
35
36
37
After [installing Flatpak](https://flatpak.org/setup/), you can install
Briar GTK like this:
```
flatpak install --user https://flatpak.dorfbrunnen.eu/repo/appstream/app.briar.gtk.flatpakref
```
Nico's avatar
Nico committed
38

Nico's avatar
Nico committed
39
40
41
42
43
44
45
In case the above command doesn't work for you, you can try to install it manually:
```
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak remote-add --if-not-exists dorfbrunnen https://flatpak.dorfbrunnen.eu/repo/dorfbrunnen.flatpakrepo
flatpak install --user app.briar.gtk
```

46
#### Running
syster's avatar
syster committed
47

Nico's avatar
Nico committed
48
After installing Briar GTK, you can run it like this: 
syster's avatar
syster committed
49
50
51
52
```
flatpak run app.briar.gtk
```

Nico's avatar
Nico committed
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
### Debian Bullseye

At [media.dorfbrunnen.eu/briar/debs](https://media.dorfbrunnen.eu/briar/debs/)
_.deb_ files are available to install Briar GTK on Debian Bullseye (currently
_testing_). From its readme:

> Similar to the jars/ folder, I will upload .deb packages of Briar GTK here until Briar is included in Debian main.
>
> To verify the signatures, first download my PGP key:
>
> https://keys.openpgp.org/vks/v1/by-fingerprint/558BE9071CA6CA44DBF5576B95A0DAF7DBC7B548
>
> Then, import my key into your key ring:
>
> `gpg --import 558BE9071CA6CA44DBF5576B95A0DAF7DBC7B548`
>
> Finally, verify that the files match the signatures:
>
> `gpg --verify briar-gtk-latest.deb.sig briar-gtk-latest.deb`
>
> Before installing the .debs, please make sure to uninstall any other versions of Briar related software on your device, e.g. `briar_wrapper` from pip.
>
> You can then proceed to installing the .deb's:
>
> `sudo apt install ./*.deb`

Nico's avatar
Nico committed
79
80
81
82
### Arch Linux

Arch Linux users can use the [`briar-gtk` package from AUR](https://aur.archlinux.org/packages/briar-gtk/) to install Briar GTK and its dependencies.

Nico's avatar
Nico committed
83
84
## Developers

85
86
87
### GNOME Builder

The easiest and most convenient way to build _briar-gtk_ is by using
Nico's avatar
Nico committed
88
[Builder](https://wiki.gnome.org/Apps/Builder).
89
90
91
92
93
94
95
Because Flatpak support is quite new in Builder,
it's recommend to install Builder via Flatpak:
```
flatpak install flathub org.gnome.Builder
```
To setup Flatpak on your system, check out the
[documentation at flatpak.org](https://flatpak.org/setup/).
Nico's avatar
Nico committed
96
97
98
In _Builder_, click "Clone Repository" at the bottom and
enter the URL to this Git project.

99
100
### flatpak-builder

101
To build it on the command-line without Builder, call this:
102
103
```bash
flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
104
flatpak-builder --install-deps-from=flathub --user --install --force-clean --ccache flatpak-builddir app.briar.gtk.json
105
106
107
flatpak run app.briar.gtk
```

108
109
### Directly from source

Nico's avatar
Nico committed
110
111
_Warning: This hasn't been tested yet._

112
113
114
115
116
117
118
After cloning this Git repository, don't forget to initialize the briar-wrapper submodule:
```
git submodule update --init
```

First, install some Debian dependencies:
```
Nico's avatar
Nico committed
119
sudo apt install meson libhandy-1-dev gettext appstream-util python3-pip
120
121
122
123
124
125
126
127
128
129
130
```

On Fedora, you can call:
```
sudo dnf install meson gtk3-devel libhandy-devel gettext libappstream-glib python3-pip
```

Then, install the Python dependencies:
```
pip3 install -r requirements.txt
```
131

132
133
134
You also need to build
[Briar Headless](https://code.briarproject.org/briar/briar/-/tree/master/briar-headless).
Check its readme to learn how to do it. You can also use
Nico's avatar
Nico committed
135
136
builds provided by The Briar Project, e.g.
[briarproject.org/jar/briar-headless-1.2.14.jar](https://briarproject.org/jar/briar-headless-1.2.14.jar),
137
and put the .jar file at _~/.local/share/java/briar-headless.jar_.
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
Make sure to have _java_ (e.g. `openjdk-11-jdk`) installed.

Once you've done this, change the path to the Briar headless
jar in [briar_gtk.define](briar-gtk/briar_gtk/define.py) and
build Briar GTK with _meson_ and _ninja_:
```
meson --prefix $PWD/_install _build
ninja -C _build all install
```

You should then be able to run Briar GTK like this:
```
XDG_DATA_DIRS=_install/share:$XDG_DATA_DIRS ./_install/bin/briar-gtk
```

### Debian
First, install some Debian dependencies:
```
Nico's avatar
Nico committed
156
sudo apt install build-essential devscripts debhelper gnome-pkg-tools python3-all meson libhandy-1-dev gettext appstream-util
157
158
159
160
161
162
163
164
165
```

You can then build the .deb like this:
```
debuild -us -uc
```

And install the .deb like this:
```
Nico's avatar
Nico committed
166
sudo dpkg -i ../briar-gtk_0.1.0-beta1-1_all.deb
167
```
168

Nico's avatar
Nico committed
169
## Translations
Nico's avatar
Nico committed
170

Nico's avatar
Nico committed
171
See [TRANSLATION.md](./TRANSLATION.md) for more information.
Nico's avatar
Nico committed
172

173
174
175
176
## Maintenance

From time to time, translations and Flatpak's Python dependencies should be
updated. The former can be done with
Nico's avatar
Nico committed
177
`tools/update-translations.sh`, the latter using
178
179
[flatpak-builder-tools](https://github.com/flatpak/flatpak-builder-tools).

Nico's avatar
Nico committed
180
181
## Design Goals

Nico's avatar
Nico committed
182
183
184
* Intuitive UI, similar to Briar Android client
* Main platform is GNU/Linux, but should also support (at least) Windows and macOS
* Analogously, main platform is x86, but should also support (at least) arm
Nico's avatar
Nico committed
185
186
187
188
* Follows [GNOME Human Interface Guidelines](https://developer.gnome.org/hig/stable/)
* Adaptive to different screen sizes (desktop and mobile devices)
* Has [phone constraints](https://developer.puri.sm/Librem5/Apps/Guides/Design/Constraints.html) in mind
* Strictly separates API wrapper from GTK stuff, making former a solid base for other (commandline) clients
Nico's avatar
Nico committed
189

190
191
## FAQ

Nico's avatar
Nico committed
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
### How can I let Briar start automatically at system boot?

Until [#66](https://code.briarproject.org/briar/briar-gtk/-/issues/66) is resolved, you can manually
tell your desktop environment to start Briar by creating the following file:

_.config/autostart/briar-gtk.desktop_
```
[Desktop Entry]
Type=Application
Name=briar-gtk
Exec=/usr/bin/briar-gtk
```

If you're using Flatpak, you need to change `Exec` to `/usr/bin/flatpak run app.briar.gtk`.

Nico's avatar
Nico committed
207
### How can I run this on the PinePhone/Librem 5?
208

Nico's avatar
Nico committed
209
210
211
Good news: Briar GTK runs on mobile devices like PinePhone and Librem 5.
However, there's no official installation method yet, so you have to build it
yourself. See [the Flatpak Builder section](#flatpak-builder) for more information.
212
213
214
215

---

For more questions, take a look at
Nico's avatar
Nico committed
216
[the FAQ of python-briar-wrapper](https://code.briarproject.org/briar/python-briar-wrapper/blob/main/README.md#faq).
217

Nico's avatar
Nico committed
218
219
220
221
222
223
224
225
226
227
228
## License

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
[GNU Affero General Public License](LICENSE.md) for more details.