Icon not appearing in GNOME Shell under Wayland
Originally reported in Debian #942600
In Inkscape 1.0 the name of the installed .desktop
file was changed to org.inkscape.Inkscape.desktop
. This apparently (thanks to @bigon from the Debian's GNOME team for the help in debugging!) causes some problems under Wayland, where GNOME expects the name of the running program (which defaults to the name of the executable, i.e. inkscape
) to be the same of the name of the .desktop file. When such mismatch happens, it just shows no icon.
See this screenshot, which shows a blank icon on the left side:
Apparently, the following are some actions that can be taken to fix this issue:
- rename the executable to
org.inkscape.Inkscape
- something that I greatly dislike. - run the program with the environment variable
GDK_BACKEND=x11
- no opinions on this one. - call
g_set_prgname("org.inkscape.Inkscape");
while setting up the interface.
With @bigon, we tried to them, including the latest, and this seemed to just work:
--- a/src/inkscape-main.cpp
+++ b/src/inkscape-main.cpp
@@ -64,9 +64,10 @@ int main(int argc, char *argv[])
{
set_extensions_env();
- if (gtk_init_check(NULL, NULL))
+ if (gtk_init_check(NULL, NULL)) {
+ g_set_prgname("org.inkscape.Inkscape");
return (ConcreteInkscapeApplication<Gtk::Application>::get_instance()).run(argc, argv);
- else
+ } else
return (ConcreteInkscapeApplication<Gio::Application>::get_instance()).run(argc, argv);
}
See here for the documentation related to that Glib call. I'm not sure if that's the way to go, but hopefully some of you will have an idea :)