Ade Malsasa Akbar contact
Senior author, Open Source enthusiast.
Thursday, April 1, 2021 at 21:39

Continuing the GTK3 setup, now I present a simple guide to setup GTK4 software development tools with screenshots included the instructions for Fedora and openSUSE operating systems. With this, you can start making desktop applications in C language with the latest version of this infamous widget toolkit that built GNOME. I selected Geany as the code writing tool here. Now rest easy and happy hacking!

Subscribe to UbuntuBuzz Telegram Channel to get article updates.

About OSes

  • For Ubuntu it is 21.04 (Hirsute Hippo).
  • For Fedora it is 32.
  • For openSUSE it is Tumbleweed.

They are the OS versions known today to provide GTK4 development libraries available. Later, more OSes that support GTK4 will come for sure.

Setup on Ubuntu


$ sudo apt-get install libgtk-4-dev gtk-4-examples geany
  • Min. requirement: Ubuntu 21.04 Hirsute Hippo
  • No. of packages: 120+
  • Download size: 30 MB+
  • Disk space used: 300MB+


 

Setup on Fedora


$ sudo dnf install gtk4-devel geany
  • Minimum requirement: Fedora 32
  • No. of packages: 59
  • Download size: 34MB
  • Disk space used: ?


Setup on openSUSE


$ sudo zypper install gtk4-devel geany
  • Minimum requirement: Tumbleweed
  • No. of packages: 75
  • Download size: 30MB
  • Disk space used: 165MB


The Results


By installing the packages, you should get a complete suite of all GTK4 libraries (unseen unless you code) and additional graphical applications namely:

GTK Demo

Code examples collection and ability to run the program and copy the source codes. This includes a 3D animation demo too.



Icon Browser

The tool to view and browse GTK icons in one place. This way, you can quickly see and compare an icon in various size (16, 24, 32, ...) and also copy the name to your source code.


Widget Factory

The full examples of all GTK4 widgets in one application. This is so we can see and know what we will be making later.

 
Print Editor

Tool to demonstrate GTK4 ability in printing. So you can create an application that is able to deal with printers.




Start Coding

GTK Project provides full documentation in doing programming with GTK4 with C language. Click here to get started it all.



References




This article is licensed under CC BY-SA 3.0.