[Gambas-user] DBus.Unique failing on KDE and Cinnamon
bsteers4 at gmail.com
Sat Aug 14 14:05:28 CEST 2021
On Sat, 14 Aug 2021 at 12:51, Bruce Steers <bsteers4 at gmail.com> wrote:
> On Sat, 14 Aug 2021 at 11:32, Bruce Steers <bsteers4 at gmail.com> wrote:
>> I have this application...
>> It uses DBus so if it is run when already running it opens the running
>> apps window and not run again.
>> It is the same as in my Desktop-ish app
>> For some reason Desktop-ish works as expected and sets up
>> But glaunch sets up org.gambas.glaunch and if i run it again it sets up
>> bug is happening on KDE and Cinnamon
>> it is okay on MATE and Gnome
> I'm not sure of the problem but i can report this...
> I think it has to do with one app using systemtray
> The 1st instance of glaunch sets up org.gambas.glaunch
> DBus.Name returns org.gambas.glaunch
> glaunch dbus application contains the usual introsect, etc and org.command
> (my interface)
> The 2nd instance of glaunch sets up org.gambas.glaunch-<ID> (ID is a
> DBus.Name wrongly returns org.gambas.glaunch
> glaunch dbus application contains the usual introspect, etc and
> org.command (my interface) and also a kde.statusnotifier
> aah, result..
> i just fixed it by adding DBus.Unique = True to the programs _init()
Getting DBus.Unique set at the start then caused the TrayIcon (in the Form)
to raise an error with name already registered.
I just had to import gb.dbus.trayicon and make it exit cleanly if unable to
register due to existing name.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the User