112

How can I install GTK+ 3.0 and use that instead of GTK+ 2.24?

Eliah Kagan
  • 117,780
dlin
  • 3,830

3 Answers3

278

To use gtk2 or gtk3 apps you don't need to install anything. But, if you want to develop (or even just compile) apps this is what you're looking for:

sudo apt-get install libgtk-3-dev
Eliah Kagan
  • 117,780
Thomio
  • 3,399
28

GTK3 is installed by default, please don't download and compile from the GTK website.

If you want to use GTK3 yourself, compile against that instead GTK2, or use PyGObject instead of PyGTK if you're using Python.

If you want all programs to use GTK3 instead of GTK2, it won't work, it's a job for the application developers to port their application.

Timo
  • 4,680
  • 1
    The package name changed a bit, try this: dpkg -l libgtk-[0-9]* | grep ^i – Timo Feb 04 '12 at 11:49
  • Also note that GTK2 and GTK3 are parellel installable. So it's not that you are using one or the other, it's the applications that choose which version. – Timo Feb 04 '12 at 11:51
  • @Nick if you have questions about specific apps, it would be better to ask a new question. We wouldn't want useful information to get lost in the comments. :) – Michael Martin-Smucker Feb 05 '12 at 00:24
  • Wasn't installed by default on my Ubuntu 20.04 LTS. Used below answer. – Philip Rego Aug 20 '20 at 16:24
3

If you already have an older version of GTK and you want to upgrade it then you can do the following:

sudo add-apt-repository ppa:gnome3-team/gnome3-staging
sudo add-apt-repository ppa:gnome3-team/gnome3
sudo apt update
sudo apt dist-upgrade