Users can open two instances of the Partition Manager. There's no use in doing that and it may cause data loss and other issues. Reproducible: Always Steps to Reproduce: 1. Open the KDE Partition Manager 2. Keep it open and launch the program again from the start menu (Kickoff). Actual Results: Another instance of the program starts. Expected Results: The current instance/window of the program should be focused. KDE Partition Manager Version 2.2.1 KDE Neon 5.7 (user edition)
Git commit 71510d270950d05ddda5c81d938db7e5744650bc by Andrius Štikonas. Committed on 20/07/2016 at 11:36. Pushed by stikonas into branch 'master'. Do not allow the second instance of Partition Manager M +1 -0 CMakeLists.txt M +1 -0 src/CMakeLists.txt M +3 -0 src/main.cpp http://commits.kde.org/partitionmanager/71510d270950d05ddda5c81d938db7e5744650bc
Unfortunately this introduces a regression in Wayland support. I'll revert the commit for now.
(In reply to Andrius Štikonas from comment #2) > Unfortunately this introduces a regression in Wayland support. I'll revert > the commit for now. I investigated this regression a bit. It seems that under wayland we are not able to make a connection to a current user's dbus daemon. It looks like even setuid does not help in this case (and similar case in kpmcore where we disable plasma automounter, that code also works only on X11).
I don't think it will be possible to use KDBusService as QDBusConnection::sessionBus is not connected on Wayland. Possibly we will need to register our own dbus interface (basically do what KDBusService::Unique does). Maybe with system bus instead of session bus to make sure that other users can't start the second instance too.
Git commit c40a729ba73ab82bf75fe6c36b977ae17807b75a by Andrius Štikonas. Committed on 24/03/2018 at 22:26. Pushed by stikonas into branch 'kauth'. Do not allow the second instance of Partition Manager. M +1 -0 CMakeLists.txt M +1 -0 src/CMakeLists.txt M +3 -0 src/main.cpp https://commits.kde.org/partitionmanager/c40a729ba73ab82bf75fe6c36b977ae17807b75a