ROOT integration in Gnome Shell

When you will run ROOT in the new Gnome Shell environment, you will find that each ROOT window (TCanvas, TBrowser, etc.) will be represented by separate icon and will not be grouped to one application. This is very inconvenient when you work with many canvases. This happens because the Gnome Shell uses another method to associate window with application (old gnome and even new gnome3 classic mode don’t have this problem).

I found simple solution for this problem. It’s enough to change function

void TRootCanvas::CreateCanvas(const char *name)

in the file $ROOTSYS/gui/gui/src/TRootCanvas.cxx

Change line 581 (for root_v5.34.08)

SetClassHints(“Canvas”, “Canvas”);

to

SetClassHints(“ROOT”, “Canvas”);

Now all TCanvas windows will be associated with executable ROOT.

The name of application (ROOT) should match parameter Name in the file root.desktop.
To have complete integration with Gnome Shell you may also place this ROOT desktop file $ROOTSYS/etc/root.desktop into proper directory (e.g. /usr/share/applications/ for the Debian Linux).

Finally, it will be great to add in this file line
Icon=RootIcon.ico
and place that icon $ROOTSYS/icons/RootIcon.ico into proper directory (/usr/share/icons/hicolor/32x32/apps/ on Debian Linux).

Best,
Andriy.

Hi Andriy,

Indeed, you’re right! It is now implemented in 5-34-00-patches and in the master. Many thanks for the suggestion!

Cheers, Bertrand.