Introduction
KGtk is a quick-n-dirty HACK to allow some Gtk2, and Gtk3, applications
to use KDE Frameworks 5 file dialogs.
KGtk is composed of the following pieces:
- An application called kdialogd5. This is the KDE app that will show the
file selector.
- LD_PRELOAD libraries that are used to override the Gtk2 and Gtk3 file
dialogs.
If you start an application using the following command:
kgtk-wrapper gimp
...the the following occurs:
- kgtk-wrapper determines whether the application is a Gtk2 or Gtk3
application. It then sets the LD_PRELOAD environment variable to point to
the approriate KGtk library.
- When 'gimp' now tries to open a file dialog, the KGtk library
intercepts this, and asks kdialogd to open a file dialog instead.
There will only ever be one instance of kdialogd, and all apps communicate with
the same instance - and it termiantes itself 30 seconds after the last app has
disconnected. This timeout can be changed by editing kdialogdrc and
setting/changing
[General]
Timeout=10
Installation
As of v0.9.1, kgtk uses CMake in place of autotools.
This is accomplished as follows:
- mkdir build
- cd build
- cmake .. -DCMAKE_INSTALL_PREFIX=/usr
- make
- sudo make install
- For 64 bit systems, also append -DLIB_SUFFIX=64
Notes
The library has been tested with the following applications:
Reported to work (A bit outdated):
- Firefox (7.0.1)
- Thunderbird 7.0.1
- Inkscape
- GIMP (2.10)
- Kino
- Eclipse
- Azureus
- Galde-2
- Streamtuner
- Avidemux2
- XSane (save dialog appears twice, but uses the name)
Reported not working:
- AbiWord