KDE client (Linux)
The KDE client shows the editor in its own program window instead of in the browser. It starts the omnipressix program itself in the background and quits it again when closed, or it connects to an OmniPressix server. It is built with Qt 6 and fits into KDE Plasma, but also runs under other Linux desktops.
What is different from the browser:
- Its own window with an icon in the start menu and the task bar. A second start brings the open window to the front.
.opxfiles (layouts and templates, see File format) are associated with the program: a double-click in the file manager opens the layout in the editor (if the program is already running, in the existing window), as doesomnipressix-desktop file.opx. This also applies to the Flatpak (the file arrives through the document portal). After a manual installation, runupdate-mime-database ~/.local/share/mimeif necessary.- Saving (layout, PDF, sample CSV) asks for the location with the system’s save dialog.
- Printing opens the system’s print dialog with all the printer’s settings. Paper size and orientation are already preselected to fit the card or the A4 sheet.
- Templates and photos are in
~/.local/share/omnipressix(subfoldersvorlagenandfotos; up to 4.0 the folder was called~/.local/share/omnipressixfreeand is renamed automatically on first start, likewise~/.config/omnipressixfree), the print log there indruckprotokoll.jsonl. - Editor settings, print profiles and the sign-in to the server are kept across restarts.
- Links to other sites open in the normal browser.
- The camera for “Take a photo with the camera” is released for the editor without asking, also when connected to a server; other sites do not get it. The Flatpak needs access to devices (
--device=all) for this.
Build and install#
Fedora:
sudo dnf install gcc-c++ cmake golang qt6-qtbase-devel qt6-qtwebengine-devel qt6-qtwebchannel-devel qt6-qtpdf-devel
Debian/Ubuntu (from Ubuntu 24.04):
sudo apt install g++ cmake golang qt6-base-dev qt6-webengine-dev qt6-webchannel-dev qt6-pdf-dev
In the project folder:
cmake -S desktop/kde -B build-kde -DCMAKE_BUILD_TYPE=Release
cmake --build build-kde -j
./build-kde/omnipressix-desktop # try it out
cmake --install build-kde --prefix ~/.local # install (for you only, without sudo)
The Go program omnipressix is built along and installed to libexec/omnipressix/. If you have already installed it in another way, switch this off with -DOMNIPRESSIX_BUILD_PROGRAM=OFF. The client then looks for the program in the PATH.
./build-all.sh kde builds the client and packs it as dist/omnipressix-kde-linux-amd64.tar.gz. Without arguments build-all.sh builds it along as soon as cmake is installed. You unpack the archive like this:
tar -xzf omnipressix-kde-linux-amd64.tar.gz -C ~/.local --strip-components=1
The archive does not contain Qt. It therefore only runs on systems whose Qt version is at least as new as that of the computer it was built on (e.g. within the same Fedora version). For other systems there is the Flatpak.
As a Flatpak#
The Flatpak contains the client and the program and runs on any Linux distribution with Flatpak. It brings Qt along through the KDE runtime from Flathub.
flatpak install --user flathub org.flatpak.Builder # once
./build-all.sh flatpak # produces dist/omnipressix-<version>.flatpak
Without arguments ./build-all.sh builds the Flatpak along as soon as flatpak-builder is installed.
The first time, flatpak-builder downloads the KDE runtime and the Qt WebEngine base (about 2 GB); later builds are fast. Go downloads its libraries while building, so the build needs the internet. The description is in desktop/kde/flatpak/click.schmalle.OmniPressix.yml.
Install and start, on any computer:
flatpak install --user omnipressix-3.0.0.flatpak # fetches the KDE runtime from Flathub if needed
flatpak run click.schmalle.OmniPressix
OmniPressix then also appears in the start menu. Differences from the normal installation:
- Templates and photos are in
~/.var/app/click.schmalle.OmniPressix/data/omnipressix, the settings in~/.var/app/click.schmalle.OmniPressix/config/omnipressix. - Opening and saving go through Flatpak’s file dialogs (“portals”). The program only sees the files you choose there.
- Printing goes through CUPS, so to all printers of the system.
How to publish OmniPressix on Flathub so that it appears in KDE Discover and GNOME Software is described in Publishing on Flathub.
Setting up the connection#
On first start the client connects locally if it finds the program. Otherwise the window Set up connection appears. You can reach it later with Ctrl+Shift+,, by right-clicking the icon in the start menu (“Set up connection …”) or with omnipressix-desktop --einstellungen.
- On this computer: The client starts
omnipressixon the given port (default 8090). If an OmniPressix is already running there, it is used. It looks for the program in this order: the entered path, next to the client,../libexec/omnipressix/relative to the client, in the installation folder, in thePATH. - OmniPressix server: Enter the address, e.g.
https://karten.example.org. Signing in happens in the window. With a self-issued certificate the client asks once per start.
The settings are in ~/.config/omnipressix/desktop.conf. With --server URL the client connects to a server for this start only.
Keys#
| Key | Effect |
|---|---|
Ctrl+Shift+, | Set up connection |
F5 | Reload the editor |
F11 | Full screen |
Ctrl+Q | Quit |
All other keys belong to the editor (see Operation). “Quit program” in the editor also closes the window.
Structure#
The client (desktop/kde/src) is a Qt Widgets program with Qt WebEngine:
backend.cppstarts and stopsomnipressix. It recognises a running OmniPressix by the headerX-OmniPressix-Apiin the answer to/healthz.mainwindow.cppcontains the window, profile, save dialog, certificate prompt and external links.printbridge.cppprints: the editor passes the PDF on through QWebChannel (bridge.js, injected into every page, andprintBlobinweb/js/print.js). The pages are rendered with QtPdf at printer resolution (at most 600 dpi).CMakeLists.txtreads the version number frominternal/version/version.go.