2

newbie here using Ubuntu 18.04 LTS

I am coming from the easy Windows world, I am trying to write an Windows Forms dialog application. When writing code I see that we have a choice between Mondo, Qt, Gtk and Tkintker. However, I am also looking for the understanding of how does Linux applications like FireFox show a GUI? I mean I am sure that these applications used something that was here before Mondo, Qt and Gtk appeared, right?

Does anyone know of a simple github project written in C++, hopefully simple means 5 lines of code as it doesn't take much to say Hello World.

I tried installing ubuntu-sdk-ide that was previously mentioned about in a 5 year old post, however, after installing I tried to start it but it just shows "QtCreator, The container backend returns an unknown error status. This is a bug and should never happen, please contact the developers."

note: ubuntu-sdk is here and says it's safe for 14.04. and the current is 18.04, thus any duplicate posts will point to the broken 14.04, and it doesn't say what real applications like FireFox uses. https://docs.ubuntu.com/phone/en/platform/sdk/installing-the-sdk

4
  • That's the post with 14.04 and is broken for 18.04, and it uses Qt which I am not looking for, what came before Qt? Mar 25, 2019 at 20:57
  • Is this what you are looking for? This is a simple Hello world GUI in GTK+: developer.gnome.org/gtk-tutorial/stable/c39.html#SEC-HELLOWORLD
    – user825380
    Mar 25, 2019 at 21:07
  • Is there something that does not use Mondo, Qt, Gtk or Tkintker? Mar 25, 2019 at 21:19
  • Short answer, no. GUI is made with specific toolkits. Qt, Gtk, and Tkinter are most common ones. You can look into WebKit, there's options to write GUI using HTML Mar 25, 2019 at 21:29

1 Answer 1

4
  1. Most applications are built on GUI toolkits such as Gtk and Qt. Much of the early, heavy development of these toolkits was driven by such applications.
  2. Many of these toolkits are now more than two decades old, so they predate most applications in use today.
  3. The toolkits themselves (or at least their implementations in X11) are all built on top of Xlib. You can attempt to follow an Xlib tutorial such as https://tronche.com/gui/x/xlib-tutorial/ but there is a good chance that you will hit something that does not work. Xlib development is extremely finicky. At the very least, you will come to appreciate how much of an abstraction that toolkits such as Gtk and Qt provide. Coming from the Windows world, these toolkits are much more akin to Win32 GUI development than Xlib development is.

Those are the facts, I will conclude with speculation since the OP seems particularly interested in Firefox: I believe that Firefox is actually built directly in X11, or more specifically uses its own internal GUI toolkit. While it descends from Netscape Navigator (which predates the general use of Gtk and Qt), Navigator appeared to use Motif (a much older Toolkit, itself built on top of a library called X-Toolkit), and one of the major changes from Navigator -> Firefox (or Phoenix as it was called early on) was the loss of that interface. This occurred when modern toolkits such as Gtk and Qt were proliferating and I suspect that rather than pick a side, the Firefox developers rolled their own.

Not the answer you're looking for? Browse other questions tagged .