install.flatpak.markdown 5.5 KB
Newer Older
1 2
# Introduction

3 4
Flatpak is a package manager for Linux. It is available on all major GNU/Linux
distributions. It also keeps applications and all their dependencies inside
5 6 7 8 9 10 11 12 13 14 15 16
containers, making them easy to update and uninstall.

Its advantages:

- You get the latest version of Paperwork, directly from its developers.
- Paperwork remains nicely packaged. It won't make a mess on your system.

Its drawback:

- Using Flatpak, Paperwork comes directly from its developers. It has not been
  reviewed by your distribution maintainers. It may not include some changes
  that your distribution maintainers would have added.
17 18


19
# Quick start
20

21
## Installing Flatpak
22

Jerome Flesch's avatar
Jerome Flesch committed
23 24
* GNU/Linux Debian: `sudo apt install flatpak`
* GNU/Linux Fedora: `sudo dnf install flatpak`
25

26

27
## Installing Paperwork
28

29
```sh
30
# Install Paperwork (for the current user only)
31 32 33 34 35 36 37
# <branch> can be:
# - 'master': stable branch (latest release + some bug fixes)
# - 'testing': stabilization branch
# - 'develop': development branch (new untested features)
flatpak --user install https://builder.openpaper.work/paperwork_<branch>.flatpakref

# For example:
38
flatpak --user install https://builder.openpaper.work/paperwork_master.flatpakref
39
```
40

Jerome Flesch's avatar
Jerome Flesch committed
41 42
Flatpak will add a Paperwork icon in your menus. You may have to log out and
log back in to see it.
Bastien Nocera's avatar
Bastien Nocera committed
43

Jerome Flesch's avatar
Jerome Flesch committed
44
Alternatively, you can start Paperwork from a terminal:
45

46
```sh
Jerome Flesch's avatar
Jerome Flesch committed
47
flatpak run work.openpaper.Paperwork
48 49 50
```


Jerome Flesch's avatar
Jerome Flesch committed
51
## Allowing Paperwork to access scanners
52 53

When installed using Flatpak, Paperwork runs in a container. This container prevents
54 55 56
Paperwork from accessing devices directly. Therefore the scanning daemon
[Saned](https://linux.die.net/man/1/saned) must be enabled on the host system,
and connection must be allowed from 127.0.0.1.
57

Jerome Flesch's avatar
Jerome Flesch committed
58
Instructions can be found in the settings of Paperwork:
59

Jerome Flesch's avatar
Jerome Flesch committed
60 61 62
![Flatpak + Saned instructions: Step 1](flatpak_saned_1.png)
![Flatpak + Saned instructions: Step 2](flatpak_saned_2.png)
![Flatpak + Saned instructions: Step 3](flatpak_saned_3.png)
63

64

Jerome Flesch's avatar
Jerome Flesch committed
65
## Updating Paperwork
66

67
```sh
Jerome Flesch's avatar
Jerome Flesch committed
68
flatpak --user update work.openpaper.Paperwork
69 70
```

Jerome Flesch's avatar
Jerome Flesch committed
71
# FAQ
72

Jerome Flesch's avatar
Jerome Flesch committed
73
## How do I run paperwork-cli / paperwork-json ?
74

75 76 77
When using Flatpak, paperwork-cli is also available. Note that it will run
inside Paperwork's container and cannot access files outside your home
directory.
78

79 80 81
```sh
flatpak run --command=paperwork-cli work.openpaper.Paperwork [args]
flatpak run --command=paperwork-cli work.openpaper.Paperwork --help
82 83
```

84
Examples:
85

86 87 88 89
```sh
flatpak run --command=paperwork-cli work.openpaper.Paperwork help import
flatpak run --command=paperwork-cli work.openpaper.Paperwork -bq import ~/tmp/pdf
```
90 91


Jerome Flesch's avatar
Jerome Flesch committed
92
## No text appears when rendering PDF files. What do I do ?
93

94 95 96
If you run Paperwork from a terminal, you can see the message
`some font thing has failed` every time you open a PDF file from Paperwork.
This issue is related to fontconfig cache.
97

98
To fix it:
99

100 101
- Stop Paperwork
- Run: `flatpak run --command=fc-cache work.openpaper.Paperwork -f`
102

103

Jerome Flesch's avatar
Jerome Flesch committed
104
## What about i386 and ARM architectures ?
105

106 107 108 109
[Continous integration](https://gitlab.gnome.org/World/OpenPaperwork/paperwork/pipelines)
only builds Paperwork for amd64 (aka x86\_64). If you want to run Paperwork
on i386 or ARM systems, you can use the
[Flathub version](https://flathub.org/apps/details/work.openpaper.Paperwork).
110

111 112
If you don't know what architecture your computer is based and if your computer
has more than 2GB of RAM, it is probably compatible with amd64.
113 114


Jerome Flesch's avatar
Jerome Flesch committed
115
## How do I update The GPG public key of the Flatpak repository ?
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140

Paperwork repository GPG key expires every 2 years. When that happens, when you
try updating Paperwork, you will get an output similar to the following one:

```
$ flatpak --user update
Looking for updates…
F: Error updating remote metadata for 'paperwork-origin': GPG signatures found, but none are in trusted keyring
F: Warning: Treating remote fetch error as non-fatal since runtime/work.openpaper.Paperwork.Locale/x86_64/master is already installed: Unable to load summary from remote paperwork-origin: GPG signatures found, but none are in trusted keyring
F: Warning: Can't find runtime/work.openpaper.Paperwork.Locale/x86_64/master metadata for dependencies: Unable to load metadata from remote paperwork-origin: summary fetch error: GPG signatures found, but none are in trusted keyring
F: Warning: Treating remote fetch error as non-fatal since app/work.openpaper.Paperwork/x86_64/master is already installed: Unable to load summary from remote paperwork-origin: GPG signatures found, but none are in trusted keyring
F: Warning: Can't find app/work.openpaper.Paperwork/x86_64/master metadata for dependencies: Unable to load metadata from remote paperwork-origin: summary fetch error: GPG signatures found, but none are in trusted keyring
(...)
Warning: org.freedesktop.Platform.openh264 needs a later flatpak version
Error: GPG signatures found, but none are in trusted keyring
Error: GPG signatures found, but none are in trusted keyring
Changes complete.
error: There were one or more errors
```

The simplest way to fix that is to reinstall Paperwork. Uninstalling Paperwork
will never delete your documents.

```
flatpak --user remove work.openpaper.Paperwork
Jerome Flesch's avatar
Jerome Flesch committed
141
flatpak --user install https://builder.openpaper.work/paperwork_master.flatpakref
142 143 144
```


Jerome Flesch's avatar
Jerome Flesch committed
145
# Build
146

147 148
Here are the instructions if you want to try to build the Flatpak version
yourself.
149

150 151 152 153 154 155 156
```sh
git clone https://gitlab.gnome.org/World/OpenPaperwork/paperwork.git
cd paperwork/flatpak
flatpak --user remote-add --if-not-exists gnome https://sdk.gnome.org/gnome.flatpakrepo
flatpak --user install gnome org.gnome.Sdk//3.26
flatpak --user install gnome org.gnome.Platform//3.26
make
157
```