Monday, August 27, 2012

Find Out GTK+ Version in Ubuntu / Linux

GTK+ is a toolkit for creating graphical user interfaces, that is capable to be used in many platform (multi-platform). The GTK name was originally a short of "GIMP ToolKit". It is the engine for rendering graphical widgets/elements in applications. GTK+ is the default rendering engine used in GNOME applications that we can find in various GNOME-based Linux distributions including Ubuntu OS.

A GTK+ theme, such as a theme I made, requires GTK+ library to be installed before it can be used. Like an application, a GTK+ theme is designed for specific version of GTK+ libraries. For example, zonColor theme pack was designed for both GTK+ 2 and GTK+ 3, specifically GTK 2 ver. 2.20 and/or GTK 3 ver 3.4 as minimum requirements.

A GTK theme used in GNOME image viewer app (EOG) displaying GTK+ logo

So, the question is: How to find out the GTK version running in my OS?

There is no specific tool or command that can be used to answer that question, but you can try Terminal commands below, for both GTK2-based desktop (such as Ubuntu 10.04) and GTK3-based desktop (such as Ubuntu 12.04).

For GTK 2

Run this command in Terminal:
dpkg -s libgtk2.0-0|grep '^Version'

The output should look something like this:
Version: 2.24.11-0ubuntu1


For GTK 3

Run this command in Terminal:
dpkg -s libgtk-3-0|grep '^Version'

The output should look something like this:
Version: 3.5.12-0ubuntu3


Notes:
The above commands are tested on Ubuntu OS (10.04 and 12.04). For other Linux distros, they may vary.

.


PS: Still, sorry for my English :)

No comments:

Post a Comment

Google+ Comments Disqus Comments
Disqus Comments Google+ Comments
comments powered by Disqus