External Publication
Visit Post

Other/future projects • Re: GTK2 revival

Pale Moon forum - Forum index [Unofficial] May 2, 2026
Source

I got it working and am responding to you from a Basilisk build that is using gtk2-ng right now. The performance is definitely closer to a GTK3 build. All I had to do is set LD_LIBRARY_PATH to the folder where I installed gtk2-ng and it just worked. I didn't modify the build system, it just linked against my system GTK2. So your goal of maintaining ABI compatibility definitely works.

I ran into the issue that gtk2-ng did not include all of the GTK2 theme engines so my OS theme did not work. I'm not sure what the original GTK2 behavior was in this regard. I had to add the directory where my OS package manager has the GTK2 theme engines installed for my theme to the LD_LIBRARY_PATH as well for the theme to work. I did verify that it was still using gtk2-ng after that path to the LD_LIBRARY_PATH to verify that adding that directory didn't break gtk2-ng or cause the build to revert to system GTK2.

That's amazing! Thanks for testing! I'm going to make it even faster very soon

Regarding the theming engines: I'm not at home right now, but this will be the next thing I'm going to take care of.

Hi there. Just for the sake of it I tried to build this Gtk2 project of yours. Apart from a few deprecations I got a warning about an implicit declaration, and then later on an error upon linking related to that declaration. Dunno how to fix this. Running Linux Mint 19.2 (Ubuntu 18.04) with some backports, build tools GCC 9.5. Configuration log:

Gtk2-NG_configuration_log.zip

EDIT: Ah, it's probably due to Glib 2.72.4 missing g_sort_array. It's only available starting with 2.82. Can't install a newer glib unfortunately. Any workaround?

CODE:

gtkfilesystemmodel.c: In function ‘gtk_file_system_model_sort’:gtkfilesystemmodel.c:804:7: warning: implicit declaration of function ‘g_sort_array’ [-Wimplicit-function-declaration] 804 | g_sort_array (get_node (model, 1), /* start at index 1; don't sort the editable row */ | ^~~~~~~~~~~~[...]./.libs/libgtk-x11-2.0.so: undefined reference to `g_sort_array'collect2: error: ld returned 1 exit statusmake[4]: *** [Makefile:2962: gtk-query-immodules-2.0] Error 1[...]./.libs/libgtk-x11-2.0.so: undefined reference to `g_sort_array'collect2: error: ld returned 1 exit statuslinking of temporary binary failed: Command '['/bin/bash', '../libtool', '--mode=link', '--tag=CC', 'gcc', '-o', '<project path>/Gtk2-NG/gtk/tmp-introspectfivxap7y/Gtk-2.0', '-export-dynamic', '-DG_DISABLE_SINGLE_INCLUDES', '-DATK_DISABLE_SINGLE_INCLUDES', '-DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES', '-DGTK_DISABLE_SINGLE_INCLUDES', '-g', '-O2', '-Wall', '<project path>/Gtk2-NG/gtk/tmp-introspectfivxap7y/Gtk-2.0.o', '-L.', 'libgtk-x11-2.0.la', '-lgio-2.0', '-lgobject-2.0', '-Wl,--export-dynamic', '-lgmodule-2.0', '-pthread', '-lglib-2.0', '-lglib-2.0']' returned non-zero exit status 1.make[4]: *** [/usr/share/gobject-introspection-1.0/Makefile.introspection:156: Gtk-2.0.gir] Error 1

Hey there! Yeah, I didn't expect people to use thus fork on older systems, because gtk2 is still available on basically any distro from the last 5 years. This should be an easy fix though.


Discussion in the ATmosphere

Loading comments...