Cairo-Dock / cairo-dock-core

Core part of Cairo-Dock project.
http://glx-dock.org
GNU General Public License v3.0
191 stars 47 forks source link

cairo-dock cannot launch with multiple classes exist for appli #36

Closed mtasaka closed 2 months ago

mtasaka commented 2 months ago

Testing latest git ( https://github.com/Cairo-Dock/cairo-dock-core/commit/5a23a059e6454f711ab8388f3e5611760b32e35b ), cairo-dock fails to launch like:

$ cairo-dock -c 

 ============================================================================
Cairo-Dock version: 3.5.99
   compiled date: Sep 22 2024 00:00:00

Cairo-Dock was built with support for:
 * GTK version:                  3.24
 * X11:                          yes
 * Wayland:                      yes
 * GLX:                          yes
 * EGL:                          yes
 * gtk-layer-shell:              yes
 * additional Wayland protocols: yes
 * Wayfire IPC:                  yes

Cairo-Dock is currently running with:
 * display backend:              X11
 * OpenGL:                       no
 * taskbar backend:              X11
 * desktop manager backend(s):   X11
 * detected desktop environment: unknown
 ============================================================================

ERROR   :  (/home/tasaka1/rpmbuild/fedora-specific/MY-PKG/cairo-dock/rawhide/cairo-dock-3.5.99_20240922git5a23a05-build/cairo-dock-3.5.99-20240922git5a23a05/src/gldit/cairo-dock-class-manager.c:cairo_dock_register_class_full:2060)  
  multiple classes exist for appli: gnome-terminal, org.gnome.terminal !
new owner: 
-> no more connection to cairo-dock
Trace/breakpoint trap (コアダンプ)

If I revert https://github.com/Cairo-Dock/cairo-dock-core/commit/700d702d7571676e1e65b16f3e1fd29427cae8ee , cairo-dock launches as before, so currently I guess the above commit is the culprit.

dkondor commented 2 months ago

Hi,

thank you for reporting! Could you test https://github.com/dkondor/cairo-dock-core/commit/3c9b8dfdffdac7e8c715a78f0e8772a0365c681b ? Apparently, I forgot that cd_error() will abort the program -- that is not what's meant here.

I will also look into where the issue with gnome-terminal is coming from.

dkondor commented 2 months ago

In case you don't want to checkout the above commit, the following patch should work as well:

diff --git a/src/gldit/cairo-dock-class-manager.c b/src/gldit/cairo-dock-class-manager.c
index 04f45884..70b7630f 100644
--- a/src/gldit/cairo-dock-class-manager.c
+++ b/src/gldit/cairo-dock-class-manager.c
@@ -2057,7 +2057,7 @@ gchar *cairo_dock_register_class_full (const gchar *cDesktopFile, const gchar *c
                        if (pDesktopIDAppli)
                        {
                                if(pClassAppli != pDesktopIDAppli)
-                                       cd_error ("multiple classes exist for appli: %s, %s !", cClass, cDesktopFileID);
+                                       cd_critical ("multiple classes exist for appli: %s, %s !", cClass, cDesktopFileID);
                                g_free (cDesktopFileID); // not needed anymore
                        }
                        else if (cDesktopFileID)
dkondor commented 2 months ago

It would be great if you could test #37 which for me also fixes the problem with the "multiple classes exist" error messages. Thank you!

mtasaka commented 2 months ago

Okay, I've verified that with #37 cairo-dock again launches, thank you!

mtasaka commented 2 months ago

Closing. Thank you.