Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "SWT/Devel/Gtk/GtkVersion"
m (→Gtk of your system) |
(→Eclipse Init file) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
= About = | = About = | ||
− | Sometimes you want to know which version of GTK your Eclipse runs on, because certain versions of | + | 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: | There are multiple ways of finding out: | ||
Line 9: | Line 9: | ||
Help -> About -> Installation Details -> Configuration Tab. | Help -> About -> Installation Details -> Configuration Tab. | ||
− | Look for | + | Look for "gtk.version": |
− | org.eclipse.swt.internal.gtk.version=3. | + | |
+ | On GTK3: | ||
+ | org.eclipse.swt.internal.gtk.version=3.20.3 | ||
+ | |||
+ | On GTK2: | ||
+ | org.eclipse.swt.internal.gtk.version=2.24.30 | ||
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. | 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 | + | Note, if this line is missing altogether, you’re (very most likely) running Eclipse on GTK2. |
− | == | + | == GtkInspector == |
− | Hover over Eclipse, press Ctrl+Shift+ | + | Hover over Eclipse, press Ctrl+Shift+D (or Ctrl+Shift+D). |
− | In the general Tab, the | + | In the general Tab, the GTK version is mentioned. |
− | Note, | + | 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 | + | Usually Eclipse would use the GTK that is found on your system. The system GTK can be found out via pkg-config: |
On Fedora: | On Fedora: | ||
Line 32: | Line 37: | ||
dpkg -l libgtk2.0-0 libgtk-3-0 | dpkg -l libgtk2.0-0 libgtk-3-0 | ||
− | However, if you have both | + | 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 Init file == | ||
Line 42: | Line 47: | ||
* If you installed eclipse (e.g through yum/dnf), it will be located in your /etc/ folder: | * If you installed eclipse (e.g through yum/dnf), it will be located in your /etc/ folder: | ||
/etc/eclipse.ini | /etc/eclipse.ini | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Latest revision as of 06:30, 17 November 2021
Contents
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 "gtk.version":
On GTK3:
org.eclipse.swt.internal.gtk.version=3.20.3
On GTK2:
org.eclipse.swt.internal.gtk.version=2.24.30
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.
GtkInspector
Hover over Eclipse, press Ctrl+Shift+D (or Ctrl+Shift+D).
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