Gtk+ and KDE

KDE is one of the most successful desktop environments for the Linux operating system. It has been around before Gnome, and uses the Qt toolkit. Despite this, it is possible to integrate Gtk+ applications with KDE, as we will see.

Gtk+ is an X Window toolkit that has all the necessary features for the creation of modern UNIX applications. It is used by thousands of applications, some of them high successful, such as Gimp and Firefox.

Gtk+ can integrate with KDE because of the freedom of implementation provided by the X Window System. There is nothing preventing programmers from creating applications with one toolkit and using it on a desktop environment that uses a separate toolkit.

To understand this, you need to remember the difference between the window manager and the toolkit. The window manager is the process that control how top level windows are displayed and resized. The KDE window manager is the major component of KDE that enters in contact with your application.

By using Gtk+ you are determining how the internal behavior of your applications windows will be. This doesn't change how the desktop environment or the window manager sees your application.

Therefore, there is not issue in using Gtk+ in an application that is operated under KDE. KDE will treat the application created with Gtk+ as just another window that needs to be resized and managed.

Moreover, there is a set of messages that are exchanged between the window manager and the application. These messages are standard, and are usually the same (with small differences) between all window managers.

Similarly, session management systems also exchange messages with applications. For example, the session manager may ask to save the state of the application. Such messages are common to all session managers, so in theory you can design an application that works under Gnome or KDE session managers.

The conclusion is that Gtk+ is part of Gnome, but this doesn't mean that Gtk+ applications cannot work with other desktop environments. In particular, KDE provides everything necessary to run Gtk+ applications smoothly.

Tags: KDE, Gtk, programming, Linux, Unix, desktop, environment
Article created on 2010-08-19 14:51:20

Post a comment