Bug 470246 - kf.dbusaddons: Couldn't register name 'local.kleopatra' with DBUS - another process owns it already!
Summary: kf.dbusaddons: Couldn't register name 'local.kleopatra' with DBUS - another p...
Status: ASSIGNED
Alias: None
Product: kleopatra
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Timothée Ravier
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-25 10:25 UTC by Timothée Ravier
Modified: 2023-05-30 12:38 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Timothée Ravier 2023-05-25 10:25:27 UTC
SUMMARY

In a Flatpak, Kleopatra tries to register the `local.kleopatra` name on the session bus instead of the `org.kde.kleopatra` name.

It looks like it comes from https://invent.kde.org/frameworks/kdbusaddons/-/blob/master/src/kdbusservice.cpp#L50 that is reached because kleopatra does not set the organizationDomain: https://invent.kde.org/frameworks/kdbusaddons/-/blob/master/src/kdbusservice.cpp#L45

See: https://github.com/flathub/org.kde.kleopatra/issues/34

STEPS TO REPRODUCE
1.  Run Kleopatra from Flathub

OBSERVED RESULT

```
QIBusPlatformInputContext: invalid portal bus.
QSocketNotifier: Can only be used with threads started with QThread
libEGL warning: wayland-egl: could not open /dev/dri/renderD128 (No such file or directory)
kf.dbusaddons: Couldn't register name 'local.kleopatra' with DBUS - another process owns it already!
```
Kleopatra does not start.

EXPECTED RESULT

Kleopatra starts.

SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 38
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.106.0
Qt Version: 5.15.9
Kernel Version: 6.2.15-300.fc38.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-8665U CPU @ 1.90GHz
Memory: 31,1 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 620
Comment 1 Bug Janitor Service 2023-05-25 10:34:40 UTC
A possibly relevant merge request was started @ https://invent.kde.org/pim/kleopatra/-/merge_requests/48
Comment 2 Ingo Klöcker 2023-05-30 12:34:42 UTC
Git commit 66753b1e0d306d589f17c5dfd55e51e45d818ec2 by Ingo Klöcker, on behalf of Timothée Ravier.
Committed on 30/05/2023 at 12:31.
Pushed by kloecker into branch 'master'.

Set OrganizationDomain before registering the DBus service

The OrganizationDomain is used by KDBusAddons to generate the service
name used to register on the session bus so we need to set it up before
we try registering on the bus.

See: https://bugs.kde.org/show_bug.cgi?id=470246
See: https://github.com/flathub/org.kde.kleopatra/issues/34

M  +3    -0    src/main.cpp

https://invent.kde.org/pim/kleopatra/-/commit/66753b1e0d306d589f17c5dfd55e51e45d818ec2
Comment 3 Ingo Klöcker 2023-05-30 12:38:47 UTC
Git commit 9557e5ec15997ff0bd712c7d4b7016b98c2e9651 by Ingo Klöcker, on behalf of Timothée Ravier.
Committed on 30/05/2023 at 12:38.
Pushed by kloecker into branch 'release/23.04'.

Set OrganizationDomain before registering the DBus service

The OrganizationDomain is used by KDBusAddons to generate the service
name used to register on the session bus so we need to set it up before
we try registering on the bus.

See: https://bugs.kde.org/show_bug.cgi?id=470246
See: https://github.com/flathub/org.kde.kleopatra/issues/34
(cherry picked from commit 66753b1e0d306d589f17c5dfd55e51e45d818ec2)

M  +3    -0    src/main.cpp

https://invent.kde.org/pim/kleopatra/-/commit/9557e5ec15997ff0bd712c7d4b7016b98c2e9651