Hi Daniel, thanks for the detailed bug report. We detect the Shell using the ListNames method of Dbus, and we track it with NameOwnerChanged. Of course some other ways are possible, like tracking processes by name, or using other methods like the one you mentioned, but those 2 are made for that exact purpose.
>From what I understand, gnome-flashback uses the well-known name of Gnome-Shell for some reason. In my opinion, this is a fault; maybe it's done so that you can't launch one if the other is running, I don't know Even if there was a practical use case, I think it's a misbehavior to use the well-known name of another program. So, my recommendation would be to redirect this bug report to gnome-flashback, and see if we can fix it properly. By the way, switching cd_init_gnome_shell_backend() and cd_init_compiz_backend() wouldn't be reliable as you guessed, since it is done asynchronously under the hood. Thank you ! Le ven. 15 mai 2020 à 15:50, Daniel Kondor <1878...@bugs.launchpad.net> a écrit : > Something extra I noticed which is a difference between gnome-flashback > and gnome-shell: > > for the following query: > > dbus-send --print-reply --type=method_call --dest=org.gnome.Shell > /org/gnome/Shell org.freedesktop.DBus.Properties.Get > string:org.gnome.Shell string:ShellVersion > > gnome-shell replies with a version string, while gnome-flashback returns > an empty string. I'm not sure if this could be a reliable way of > differentiating though. > > -- > You received this bug notification because you are a member of Cairo- > Dock Devs, which is subscribed to Cairo-Dock Core. > https://bugs.launchpad.net/bugs/1878757 > > Title: > gnome-flashback is incorrectly detected as gnome-shell > > Status in Cairo-Dock Core: > New > > Bug description: > I'm running cairo-dock 3.4.99.alpha1 (downloaded from latest git) on > Ubuntu 18.04. > > I'm using the "Cairo-dock (GNOME)" session with compiz as the window > manager. > > I'm manually starting "gnome-flashback", since I need it to process > hotkey presses. > > > My main problem is that initiating the compiz scale plugin by cairo-dock > is not working anymore. This is the functionality that provides presenting > a window group when clicking on a launcher that has multiple windows open. > > It seems that the cause of this problem is that the gnome-shell > desktop manager backend is loaded instead of the compiz one. The cause > of this is that cairo-dock checks for the presence of gnome-shell by > querying the DBus name "org.gnome.Shell" (in src/implementations > /cairo-dock-gnome-shell-integration.c, line 180), but gnome-flashback > also provides this DBus name. > > > Steps to reproduce > ================== > > 1. Run "Cairo-dock (GNOME)" session (with compiz window manager) > 2. Ensure that the "Scale" compiz pluging is enabled (in ccsm) > 3. Ensure that "Present window preview on click when several windows are > grouped together" option is enabled in Cairo-dock's configuration (Advanced > mode -> Taskbar) > 4. Start "gnome-flashback" (manually or autostart) > 5. Start multiple instances of the same program (e.g. gnome-terminal) > 6. Click on the taskbar icon representing the group of windows > > Expected behavior > ================= > > Scale view is displayed with all open windows of the clicked program > (e.g. multiple terminal windows) > > Actual behavior > =============== > > Nothing happens > > > Workarounds > =========== > > -- Do not run gnome-flashback. If it is running, kill it and restart > cairo-dock (`killall gnome-flashback; killall cairo-dock; cairo-dock -o > &`). Scale will work again (but services provided by gnome-flashback will > not -- this includes handling some hotkeys). > -- Comment out cd_init_gnome_shell_backend() in > src/gldit/cairo-dock-desktop-manager.c (line 363) > -- Switch cd_init_gnome_shell_backend() and cd_init_compiz_backend() in > src/gldit/cairo-dock-desktop-manager.c (lines 361 - 363); this might be > fragile if initialization depends on response time on DBus (I cannot tell > if that happens synchronously). > > I can provide a PR for the third option. > > > Additional info > =============== > > Manual way to check if "org.gnome.Shell" exists on Dbus: > > dbus-send --print-reply --type=method_call --dest=org.gnome.Shell > /org/gnome/Shell org.freedesktop.DBus.Introspectable.Introspect > > This prints out a bunch of info if gnome-flashback is running and an > error message if it is not. > > To manage notifications about this bug go to: > https://bugs.launchpad.net/cairo-dock-core/+bug/1878757/+subscriptions > > _______________________________________________ > Mailing list: https://launchpad.net/~cairo-dock-team > Post to : cairo-dock-team@lists.launchpad.net > Unsubscribe : https://launchpad.net/~cairo-dock-team > More help : https://help.launchpad.net/ListHelp > -- You received this bug notification because you are a member of Cairo- Dock Devs, which is subscribed to Cairo-Dock Core. https://bugs.launchpad.net/bugs/1878757 Title: gnome-flashback is incorrectly detected as gnome-shell Status in Cairo-Dock Core: New Bug description: I'm running cairo-dock 3.4.99.alpha1 (downloaded from latest git) on Ubuntu 18.04. I'm using the "Cairo-dock (GNOME)" session with compiz as the window manager. I'm manually starting "gnome-flashback", since I need it to process hotkey presses. My main problem is that initiating the compiz scale plugin by cairo-dock is not working anymore. This is the functionality that provides presenting a window group when clicking on a launcher that has multiple windows open. It seems that the cause of this problem is that the gnome-shell desktop manager backend is loaded instead of the compiz one. The cause of this is that cairo-dock checks for the presence of gnome-shell by querying the DBus name "org.gnome.Shell" (in src/implementations /cairo-dock-gnome-shell-integration.c, line 180), but gnome-flashback also provides this DBus name. Steps to reproduce ================== 1. Run "Cairo-dock (GNOME)" session (with compiz window manager) 2. Ensure that the "Scale" compiz pluging is enabled (in ccsm) 3. Ensure that "Present window preview on click when several windows are grouped together" option is enabled in Cairo-dock's configuration (Advanced mode -> Taskbar) 4. Start "gnome-flashback" (manually or autostart) 5. Start multiple instances of the same program (e.g. gnome-terminal) 6. Click on the taskbar icon representing the group of windows Expected behavior ================= Scale view is displayed with all open windows of the clicked program (e.g. multiple terminal windows) Actual behavior =============== Nothing happens Workarounds =========== -- Do not run gnome-flashback. If it is running, kill it and restart cairo-dock (`killall gnome-flashback; killall cairo-dock; cairo-dock -o &`). Scale will work again (but services provided by gnome-flashback will not -- this includes handling some hotkeys). -- Comment out cd_init_gnome_shell_backend() in src/gldit/cairo-dock-desktop-manager.c (line 363) -- Switch cd_init_gnome_shell_backend() and cd_init_compiz_backend() in src/gldit/cairo-dock-desktop-manager.c (lines 361 - 363); this might be fragile if initialization depends on response time on DBus (I cannot tell if that happens synchronously). I can provide a PR for the third option. Additional info =============== Manual way to check if "org.gnome.Shell" exists on Dbus: dbus-send --print-reply --type=method_call --dest=org.gnome.Shell /org/gnome/Shell org.freedesktop.DBus.Introspectable.Introspect This prints out a bunch of info if gnome-flashback is running and an error message if it is not. To manage notifications about this bug go to: https://bugs.launchpad.net/cairo-dock-core/+bug/1878757/+subscriptions _______________________________________________ Mailing list: https://launchpad.net/~cairo-dock-team Post to : cairo-dock-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~cairo-dock-team More help : https://help.launchpad.net/ListHelp