The source project of this merge request has been removed.
Use UUID instead of PID in per-process D-Bus name
Okular's ‘Open in a New Tab’ feature is broken when running in a Flatpak. When opening a file, Okular scans for already existing org.kde.okular-NOT_MY_PID
buses and then tries to hand over the file to them.
The problem is that in Flatpak all PIDs are sandboxed, which can be verified by running:
flatpak run --command=bash org.kde.okular -c 'echo "$$" && read tmp'
simultaneously in two terminals (both will print the PID of 2). Since Okular always gets a PID of 2, and since it always filters out buses with its own PID, it never finds a previous instance and always starts a new one.
This merge request switches away from PIDs to UUIDs and also renames the service to conform to D-Bus naming conventions.