Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "SWT/Devel/Gtk/GtkVersion"

< SWT‎ | Devel‎ | Gtk
(Created page with "= About = Sometimes you want to know which version of GTK your Eclipse runs on, because certain versions of Gtk may make Eclipse behave in different ways. There are multiple...")
 
m (Gtk of your system)
Line 26: Line 26:
 
Usually Eclipse would use the Gtk that is found on your system. The system gtk can be found out via pkg-config:
 
Usually Eclipse would use the Gtk that is found on your system. The system gtk can be found out via pkg-config:
  
 +
On Fedora:
 
   pkg-config --modversion gtk+-3.0  
 
   pkg-config --modversion gtk+-3.0  
 +
 +
On ubuntu:
 +
  dpkg -l libgtk2.0-0 libgtk-3-0
  
 
However, if you have both Gtk2 and Gtk3 installed on your system, then Eclipse will use the one that is specified by your init file or failing that default for your linux distribution (which may vary).
 
However, if you have both Gtk2 and Gtk3 installed on your system, then Eclipse will use the one that is specified by your init file or failing that default for your linux distribution (which may vary).

Revision as of 22:25, 10 August 2015

About

Sometimes you want to know which version of GTK your Eclipse runs on, because certain versions of Gtk may make Eclipse behave in different ways.

There are multiple ways of finding out:

Via Configuration Tab

In Eclipse

Help -> About -> Installation Details -> Configuration Tab.

Look for the line: org.eclipse.swt.internal.gtk.version=3.14.12

This is often near line 84, but may vary depending on your setup. You can copy the text and search for it in your text editor.

Note, if this line is missing altogether, you’re (very most likely) running Eclipse on Gtk2.

Gtk Inspector

Hover over Eclipse, press Ctrl+Shift+d (or Ctrl+Shift+i).

In the general Tab, the Gtk Version is mentioned.

Note, Gtk Inspector is only available Gtk3.14 and onwards. Thus the key-combination above only works for these versions of Gtk.

Gtk of your system

Usually Eclipse would use the Gtk that is found on your system. The system gtk can be found out via pkg-config:

On Fedora:

 pkg-config --modversion gtk+-3.0 

On ubuntu:

 dpkg -l libgtk2.0-0 libgtk-3-0

However, if you have both Gtk2 and Gtk3 installed on your system, then Eclipse will use the one that is specified by your init file or failing that default for your linux distribution (which may vary).

Eclipse Init file

Eclipse reads which version of gtk to use in it's init file. The init file can be in two different locations.

  • If you downloaded eclipse bundle from the website, it can be found in the directory of the executable eclipse:
 ./eclipse.ini
  • If you installed eclipse (e.g through yum/dnf), it will be located in your /etc/ folder:
 /etc/eclipse.ini

The line that determines wheather to use Gtk2/Gtk3 is:

 --launcher.GTK_version
 3

Note, this determines which major version of gtk to use (Gtk2 or Gtk3), it does not specify minor versions.

Back to the top