GTK2 revival

For discussions about side projects, potential future projects or helper applications for Pale Moon.
vannilla
Moon Magic practitioner
Moon Magic practitioner
Posts: 2559
Joined: 2018-05-05, 13:29

Re: GTK2 revival

Post by vannilla » 2026-04-28, 17:17

I tried compiling it, but I met a few errors:
I have libtool 2.5.x which is not recognized by autogen.sh so I had to manually add it in;
similarly, Automake 1.18 is not recognized and I had to edit the Automake check to add this version;
in the end, compilation died with a segmentation fault when generating Gtk-2.0.gir inside /usr/share/gobject-introspection-1.0/Makefile.introspection.

Gentoo Linux, GCC 15.2.1.

User avatar
Daemonratte
Hobby Astronomer
Hobby Astronomer
Posts: 27
Joined: 2026-03-12, 19:59

Re: GTK2 revival

Post by Daemonratte » 2026-04-28, 17:32

Well, this thread shows me that a big part of being a developer is not letting other people demoralise and demotivate you -_-
Kind of makes me respect Moonchild and the TDE devs even more.

You can read why I'm doing this by going through my posts and palemoon is not the sole reason why I'm doing this.
vannilla wrote:
2026-04-28, 17:17
I tried compiling it, but I met a few errors:
I have libtool 2.5.x which is not recognized by autogen.sh so I had to manually add it in;
similarly, Automake 1.18 is not recognized and I had to edit the Automake check to add this version;
in the end, compilation died with a segmentation fault when generating Gtk-2.0.gir inside /usr/share/gobject-introspection-1.0/Makefile.introspection.

Gentoo Linux, GCC 15.2.1.
I only tested this on debian and devuan so far. could you send me the full output real quick?
Btw, I removed the hard checks on Automake and libtool. Update the code real quick and try again please

gabrgv
Fanatic
Fanatic
Posts: 100
Joined: 2023-10-28, 18:59

Re: GTK2 revival

Post by gabrgv » 2026-04-28, 21:49

Daemonratte wrote:
2026-04-28, 11:29
In the end I want there to be a DE that's to Gnome2 what TDE is to KDE3.
Real cool. That's something I'll look forward to.
mittorn wrote:
2026-04-28, 16:23
Native theme support is mostly hacked and only actual on windows/mac (because on linux gtk2 theme is not native anymore).
One thing I don't like on Basilisk and Pale Moon is the use of a built-in theme instead of the toolkit's one. I prefer that my GTK2 programs use the theme I chose. On Pale Moon, I think one can use an old Firefox theme called GTK native or something. On Basilisk, I had to hack together a userstyle.
Daemonratte wrote:
2026-04-28, 17:32
Well, this thread shows me that a big part of being a developer is not letting other people demoralise and demotivate you -_-
I'm sorry if it sound like I was demotivating you, but I never intended to.

vannilla
Moon Magic practitioner
Moon Magic practitioner
Posts: 2559
Joined: 2018-05-05, 13:29

Re: GTK2 revival

Post by vannilla » 2026-04-28, 22:12

Code: Select all

In file included from <path omitted>/gtk2-ng/gdk/g-ir-cpp-rkidskb2.c:4:
<path omitted>/gtk2-ng/gdk/gdk.h:32:10: fatal error: gdk/gdkapplaunchcontext.h: No such file or directory
   32 | #include <gdk/gdkapplaunchcontext.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

User avatar
wmlive
Apollo supporter
Apollo supporter
Posts: 39
Joined: 2023-07-20, 12:03

Re: GTK2 revival

Post by wmlive » 2026-04-28, 23:34

Daemonratte wrote:
2026-04-28, 17:32
Well, this thread shows me that a big part of being a developer is not letting other people demoralise and demotivate you -_-
May it be known that the silent majority (which i claim to be representing) is absolutely happy about your exceptional efforts!

In context of my own little thankless project (see signature) I was silently hoping that eventually someone capable enough to do so would step forward and just do it.
And so it happened!

For your own mental sanity please be aware that no halfways worthwhile project would ever exist without raising criticism by passive bystanders and naysayers.
You should only be worried if nobody else cares about what you do and if there is no feedback at all.

Thank you!
Project leader at https://wmlive.rumbero.org

User avatar
Daemonratte
Hobby Astronomer
Hobby Astronomer
Posts: 27
Joined: 2026-03-12, 19:59

Re: GTK2 revival

Post by Daemonratte » 2026-04-29, 15:55

vannilla wrote:
2026-04-28, 22:12

Code: Select all

In file included from <path omitted>/gtk2-ng/gdk/g-ir-cpp-rkidskb2.c:4:
<path omitted>/gtk2-ng/gdk/gdk.h:32:10: fatal error: gdk/gdkapplaunchcontext.h: No such file or directory
   32 | #include <gdk/gdkapplaunchcontext.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Alright, it should compile now. I set up two containers, one for Arch and one for Gentoo, and the code is now fully modernised.

Thank you, @"wmlive" and @"gabrgv", for the kind words!
wmlive wrote:
2026-04-28, 23:34
In context of my own little thankless project (see signature) I was silently hoping that eventually someone capable enough to do so would step forward and just do it.
And so it happened!
I can imagine :( I'm sure you also heard "who needs that" or "reactionary" my ignorant people plenty of times.

vannilla
Moon Magic practitioner
Moon Magic practitioner
Posts: 2559
Joined: 2018-05-05, 13:29

Re: GTK2 revival

Post by vannilla » 2026-04-29, 16:48

I could compile GTK-2-ng and a simple test application to try the new file picker.
The current "icon view" is 100% what I wanted to see, but it's missing a few usability features.

To begin with, if GTK does not show thumbnails the icon view is pretty useless, so it would be great if it could create missing thumbnails on a best effort basis when changing modes, i.e. it tries to make something but if it fails once it doesn't try to be smart.
Keeping this behaviour strictly to the icon view prevents unnecessary resource usage for those who track each processor cycle.

Second, to add a setting somewhere to make the icon view the default view, if it doesn't remember the last choice already.

These are the most important to me, but I'm not in a rush to see them implemented right now so take your time to write them properly.
Looking forward to see this project reach a point it can be used with Pale Moon.

User avatar
Daemonratte
Hobby Astronomer
Hobby Astronomer
Posts: 27
Joined: 2026-03-12, 19:59

Re: GTK2 revival

Post by Daemonratte » 2026-04-29, 17:03

vannilla wrote:
2026-04-29, 16:48
I could compile GTK-2-ng and a simple test application to try the new file picker.
The current "icon view" is 100% what I wanted to see, but it's missing a few usability features.

To begin with, if GTK does not show thumbnails the icon view is pretty useless, so it would be great if it could create missing thumbnails on a best effort basis when changing modes, i.e. it tries to make something but if it fails once it doesn't try to be smart.
Keeping this behaviour strictly to the icon view prevents unnecessary resource usage for those who track each processor cycle.

Second, to add a setting somewhere to make the icon view the default view, if it doesn't remember the last choice already.

These are the most important to me, but I'm not in a rush to see them implemented right now so take your time to write them properly.
Looking forward to see this project reach a point it can be used with Pale Moon.
Awesome! I'm glad you like it :D
You having no thumbnails is weird though. I'll debug this next week on a test system to make sure thumbnails work reliably. I'll be travelling over the weekend.
The file chooser should remember your last choice already btw.

Another thing I consider is having some kind of preview panel that you can activate. This is especially useful for gimp, for example, when selecting an image

User avatar
Basilisk-Dev
Astronaut
Astronaut
Posts: 636
Joined: 2022-03-23, 16:41
Location: Chamber of Secrets

Re: GTK2 revival

Post by Basilisk-Dev » 2026-04-29, 17:20

gabrgv wrote:
2026-04-28, 21:49
One thing I don't like on Basilisk and Pale Moon is the use of a built-in theme instead of the toolkit's one. I prefer that my GTK2 programs use the theme I chose. On Pale Moon, I think one can use an old Firefox theme called GTK native or something. On Basilisk, I had to hack together a userstyle.
Am I missing something here? My GTK2 build of Basilisk absolutely uses my GTK2 theme on my machine
Basilisk Project Owner

viewtopic.php?f=61&p=230756

gabrgv
Fanatic
Fanatic
Posts: 100
Joined: 2023-10-28, 18:59

Re: GTK2 revival

Post by gabrgv » 2026-04-29, 18:47

Basilisk-Dev wrote:
2026-04-29, 17:20
Am I missing something here? My GTK2 build of Basilisk absolutely uses my GTK2 theme on my machine
It looks like Basilisk only follows the theme's color scheme and few things more. In the screenshots, I'm using the Raleigh theme (default in GTK2), but I tested it with Clearlooks, Darkcold and Bluecurve too.
You do not have the required permissions to view the files attached to this post.

gabrgv
Fanatic
Fanatic
Posts: 100
Joined: 2023-10-28, 18:59

Re: GTK2 revival

Post by gabrgv » 2026-04-30, 03:41

Daemonratte, would it be possible to make it XDG-compliant?
  • ~/.gtkrc-2.0
    Currently, GTK2 looks for a file called .gtkrc-2.0 in the user's home directory for its configuration. The only way I know to workaround this right now is defining another path through the environment variable GTK2_RC_FILES in ~/.profile.

    The XDG-compliant place to put this file would be XDG_CONFIG_HOME/gtk-2.0/, and its name should probably be gtkrc.
  • ~/.gtk-2.0/
    This is the default directory in which GTK2 looks for theme engines and other stuff. You can workaround this by defining another path through the environment variable GTK_PATH (I know this is read by GTK3 too).

    I'm not sure, but I think the proper place for this is XDG_DATA_HOME, but I don't know about how to name the directory.
  • ~/.themes/, ~/.icons/
    Currently, GTK2 only looks for widget and icon themes in the .themes/ and .icons/ directories, besides the system-wide ones.

    It should look for them in XDG_DATA_HOME/themes/ and XDG_DATA_HOME/icons/ too.
And, of course, it should still look for older paths and files, to ensure backward compatibility.

I think that's it, but I might be wrong somewhere or just missing something.

User avatar
Daemonratte
Hobby Astronomer
Hobby Astronomer
Posts: 27
Joined: 2026-03-12, 19:59

Re: GTK2 revival

Post by Daemonratte » 2026-04-30, 05:55

gabrgv wrote:
2026-04-30, 03:41
Daemonratte, would it be possible to make it XDG-compliant?
...
Of course that's possible :)
I can let gtk2-ng use XDG-compliant default directories and have it use the folders that clutter up your home directly if they already exist. For example from an older installation.

Also, HOLY HELL, this is gaining traktion. I wish this happened one day later, because I updated the project page and fixed all the compiler issues on bleeding edge systems just minutes after Lunduke reported on it, for example.
https://distrowatch.com/dwres.php?resou ... tory=20175
https://linuxiac.com/gtk2-gets-an-unoff ... inux-apps/
https://www.youtube.com/watch?v=Z4k9h9nO53c
https://www.phoronix.com/news/GTK2-NG

User avatar
nia_netbsd
Newbie
Newbie
Posts: 5
Joined: 2024-08-08, 13:27

Re: GTK2 revival

Post by nia_netbsd » 2026-04-30, 09:37

athenian200 wrote:
2026-04-25, 20:27
From my perspective, GTK2 winds up being "the best" only in the sense that GNOME was dominant on Linux historically because of Red Hat, and thus it was once the biggest foundation a lot of people were building on and thus remembered by many. So it's only best that came out of the GNOME project, not truly better overall. The very fast that it's seen as the best toolkit Linux ever had just speaks to Red Hat's power and the fact that most have never seen anything that wasn't derived from GNOME, other than maybe KDE, and most users can't figure out KDE or find it overwhelming.
GTK became dominant because of licensing issues with Qt/Motif, and object orientation being the new hotness at the time (partly due to the influence of Java on the "anything but Microsoft" scene). GNOME was kept in check because Sun Microsystems also had strong influence on its development, it's only with their collapse that Red Hat effectively gained majority control over freedesktop.org and their focus increasingly became "Linux only". After Sun's collapse, GTK 3 effectively killed GTK's popularity as a cross-platform toolkit in favour of Qt 5.

These days, you'd never pick GTK unless you wanted to make an "app for the GNOME platform". In the past, things were different.

User avatar
athenian200
Contributing developer
Contributing developer
Posts: 1749
Joined: 2018-10-28, 19:56
Location: Georgia

Re: GTK2 revival

Post by athenian200 » 2026-04-30, 10:00

nia_netbsd wrote:
2026-04-30, 09:37
GTK became dominant because of incensing issues with Qt/Motif, and object orientation being the new hotness at the time (partly due to the influence of Java on the "anything but Microsoft" scene). GNOME was kept in check because Sun Microsystems also had strong influence on its development, it's only with their collapse that Red Hat effectively gained majority control over freedesktop.org and their focus increasingly became "Linux only". After Sun's collapse, GTK 3 effectively killed GTK's popularity as a cross-platform toolkit in favour of Qt 5.

These days, you'd never pick GTK unless you wanted to make an "app for the GNOME platform". In the past, things were different.
Thanks for sharing this with me.

It's kind of weird how Sun Microsystems winds up being so closely linked with the story of our codebase on so many levels. Like, first, there's all these early ties between Netscape and Sun. Then we find out Sun was collaborating with Red Hat to some degree to create a replacement for Motif, which is probably why GTK2 wound up being better than GTK1... and also better than GTK3 and 4, apparently. I had noticed that prior to GTK2, the standard seemed to be Motif, but then everyone suddenly shifted to GTK2 without explanation.

It really does seem like Linux in general started to become a much worse OS after the decline of Sun, the timing lines up surprisingly well... can't put my finger on why, but it seems like there is a connection.
"The Athenians, however, represent the unity of these opposites; in them, mind or spirit has emerged from the Theban subjectivity without losing itself in the Spartan objectivity of ethical life. With the Athenians, the rights of the State and of the individual found as perfect a union as was possible at all at the level of the Greek spirit." -- Hegel's philosophy of Mind

vannilla
Moon Magic practitioner
Moon Magic practitioner
Posts: 2559
Joined: 2018-05-05, 13:29

Re: GTK2 revival

Post by vannilla » 2026-04-30, 10:04

Off-topic:
Sun had a lot of good people, either at a technical level or in personality. Not all Sun's choices were good, but generally they had the right people at the right time and genuinely wanted to make good things.
Some people say this goodness is what caused Sun to fail...they were not ruthless enough to survive the business world against the newcomers.

User avatar
andyprough
Board Warrior
Board Warrior
Posts: 1389
Joined: 2020-05-31, 04:33

Re: GTK2 revival

Post by andyprough » 2026-04-30, 11:37

Daemonratte wrote:
2026-04-30, 05:55
Also, HOLY HELL, this is gaining traktion. I wish this happened one day later, because I updated the project page and fixed all the compiler issues on bleeding edge systems just minutes after Lunduke reported on it, for example.
https://distrowatch.com/dwres.php?resou ... tory=20175
https://linuxiac.com/gtk2-gets-an-unoff ... inux-apps/
https://www.youtube.com/watch?v=Z4k9h9nO53c
https://www.phoronix.com/news/GTK2-NG
Yes, you have everyone's attention now. And the timing seems quite good as gtk2-ng seems to be rounding into good form.

User avatar
Basilisk-Dev
Astronaut
Astronaut
Posts: 636
Joined: 2022-03-23, 16:41
Location: Chamber of Secrets

Re: GTK2 revival

Post by Basilisk-Dev » 2026-04-30, 14:39

From Devuan Users forum:
Daemonratte wrote: Possibly change the license to GPLv3, if that is legally possible, though it probably is not.
That completely destroys any chances of people using it for previously existing GTK applications that are not under the GPL. I considered trying this for some internal Basilisk builds but if that's the plan this is useless to me and most projects still using GTK2.
Basilisk Project Owner

viewtopic.php?f=61&p=230756

User avatar
Daemonratte
Hobby Astronomer
Hobby Astronomer
Posts: 27
Joined: 2026-03-12, 19:59

Re: GTK2 revival

Post by Daemonratte » 2026-04-30, 15:45

Basilisk-Dev wrote:
2026-04-30, 14:39
That completely destroys any chances of people using it for previously existing GTK applications that are not under the GPL. I considered trying this for some internal Basilisk builds but if that's the plan this is useless to me and most projects still using GTK2.
The licence is going to stay at LGPL v2.1. This is supposed to be a drop-in replacement for everyone and i don't think you'd consider migrating to another licence ;)
Anyways, if you test this: please report any issues you encounter to me.
If can make Pale Moon or Basilisk faster by optimising this toolkit then that would be awesome

User avatar
Basilisk-Dev
Astronaut
Astronaut
Posts: 636
Joined: 2022-03-23, 16:41
Location: Chamber of Secrets

Re: GTK2 revival

Post by Basilisk-Dev » 2026-04-30, 18:56

Daemonratte wrote:
2026-04-30, 15:45
Anyways, if you test this: please report any issues you encounter to me.
If can make Pale Moon or Basilisk faster by optimising this toolkit then that would be awesome
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.
Basilisk Project Owner

viewtopic.php?f=61&p=230756

User avatar
Basilisk-Dev
Astronaut
Astronaut
Posts: 636
Joined: 2022-03-23, 16:41
Location: Chamber of Secrets

Re: GTK2 revival

Post by Basilisk-Dev » 2026-04-30, 19:10

nia_netbsd wrote:
2026-04-30, 09:37
After Sun's collapse, GTK 3 effectively killed GTK's popularity as a cross-platform toolkit in favour of Qt 5.

These days, you'd never pick GTK unless you wanted to make an "app for the GNOME platform". In the past, things were different.
I looked into QT as an alternative to GTK for our frontend but it seems like they break things more frequently and come out with major versions more often so decided not to pursue it further
Basilisk Project Owner

viewtopic.php?f=61&p=230756