Make it possible to remove gtk2

Bug #1585903 reported by Dmitry Golovin on 2016-05-26
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Ubuntu GNOME
Wishlist
Unassigned
meta-gnome3 (Debian)
Fix Released
Unknown
ubuntu-meta (Ubuntu)
Wishlist
Unassigned

Bug Description

Ubuntu 17.10 still requires gtk2
-------------------------------------------------------
sudo apt remove libgtk2.0-0

The following packages will be REMOVED:
  firefox* gnome-session-canberra* gtk2-engines-murrine* ibus-gtk* kerneloops-applet* libcanberra-gtk-module* libcanberra-gtk0* libgail-common* libgail18* libgtk2-perl* libgtk2.0-0* libgtk2.0-bin* light-themes* thunderbird* thunderbird-gnome-support* thunderbird-locale-en* thunderbird-locale-en-us* ubuntu-artwork* ubuntu-desktop*

Proposal for 18.04
-------------------------
1. DONE: Don't have webkit2 recommend the gtk2 support.
2. NOT NEEDED: Split the gtk2 part of light-themes to a separate package.
3. DONE: Use a dh_shlibdeps hack to drop the libgtk2.0-0 dependency from these GTK2 addons:
  a. DONE: gnome-themes-standard
  b. DONE: gtk2-engines-murrine
  c. DONE: gtk2-engines-pixbuf (not in default install but installed by vanilla gnome-session)
  d. DONE: ibus-gtk

4. DONE: Drop gnome-session-canberra's unnecessary manual dependency on libcanberra-gtk0

5. PROPOSED: Either disable Flash in Thunderbird or apply the dh_shblideps hack from Firefox. Either way probably needs Thunderbird Beta, but Thunderbird 59 should be stable or close it to by 18.04 release.
6. DONE in Firefox 58 Beta: Apply the dh_shlibdeps hack to Firefox

7. IN PROGRESS: Prepare a debconf-gtk3 backend and switch gnome-software and software-properties-gtk to use it (LP: #1736618)

8. DONE: Demote kerneloops dependency on kerneloops-applet to Suggests.

9. IN PROGRESS: Don't have ubuntu-desktop or gnome-orca recommend libgail-common. It's a gtk2 library (basically) that gtk2 already recommends.

10: optional: Apply the dh_shlibdeps hack to the gtk2 modules and theme engines that aren't in main.

Original Bug Report
---------------------------
I can't remove GTK2 from my system, because parts of GNOME still require it.

Tim Lunn (darkxst) wrote :

Removing gtk2 is still a long way off, since its still used by some apps.

Xwayland, I think due to the way mutter works is always going to be there (Atleast for 16.04). Also there are plenty of Gtk3 apps outside of the core GNOME apps that still require Xwayland for the foreseeable future

Changed in ubuntu-gnome:
importance: Undecided → Wishlist
Jeremy Bicha (jbicha) wrote :

Removing GTK2 is probably not going to happen any time soon because of how GTK2 themes work. If a theme supports GTK2, it will depend on GTK2.

Changed in ubuntu-gnome:
status: New → Opinion
Jeremy Bicha (jbicha) wrote :

I'm reopening this as a goal for next development cycle to reduce the number of things depending on gtk2. We might not be able to remove it from the default install because of Firefox. (You could try Epiphany if you want a browser that doesn't use gtk2).

I dropped XWayland from this bug. I think the best you can hope for there is if XWayland will only run on-demand since we have no intention of dropping support for running apps that require it.

description: updated
tags: removed: amd64 apport-bug gnome3-ppa gnome3-staging third-party-packages xenial
summary: - GTK2 is still required for gnome session, XWayland is always running
+ Make it possible to remove gtk2
Changed in ubuntu-gnome:
status: Opinion → Triaged
milestone: none → aa
rahmadani (rahmadani) on 2017-04-08
Changed in ubuntu-gnome:
assignee: nobody → rahmadani (rahmadani)
Jeremy Bicha (jbicha) on 2017-04-08
Changed in ubuntu-gnome:
assignee: rahmadani (rahmadani) → nobody
Jeremy Bicha (jbicha) on 2017-04-21
description: updated
tags: added: gnome-17.10
Jeremy Bicha (jbicha) on 2017-04-23
description: updated
Jeremy Bicha (jbicha) on 2017-06-01
description: updated
Jeremy Bicha (jbicha) on 2017-11-03
description: updated
Jeremy Bicha (jbicha) on 2017-11-03
description: updated
Jeremy Bicha (jbicha) on 2017-11-03
description: updated
Didier Roche (didrocks) wrote :

Splitting light-themes sounds good to me. We won't be able to support a light and dark theme officially for the LTS, so it shouldn't be a blocker.

Didier Roche (didrocks) wrote :

for the record:
My advice is to do the same way we handled optional modules and features:
- have light-themes-gtk2 seeded by default
- relax (in debian/rules, hack the generated shlib dep) the dep between light-themes-gtk2 to libgtk2 to not be listed
That way, people will have the theme available, and the first application needed GTK2 will fullfil the necessary dep

that's how we handled for a long time having Qt modules with ubuntu's behavior without pulling Qt
yeah, at least, we don't pull our theme for other derivatives.
The other way around (libgtk2 to recommends the ambiance theme) would impact all flavors

Bryan Quigley (bryanquigley) wrote :

ibus-sunpinyin also pulls in glade2->gtk2 to livecd. The list has gotten bigger.

Jeremy Bicha (jbicha) wrote :

Bryan, that's a good point that the live ISO is different than a fresh install in English.

Jeremy Bicha (jbicha) on 2017-12-01
description: updated
Jeremy Bicha (jbicha) on 2017-12-02
description: updated
Jeremy Bicha (jbicha) on 2017-12-04
description: updated
Jeremy Bicha (jbicha) on 2017-12-05
description: updated
tags: added: bionic
description: updated
Jeremy Bicha (jbicha) on 2017-12-05
tags: added: gtk2-demotion
Jeremy Bicha (jbicha) on 2017-12-05
Changed in ubuntu-meta (Ubuntu):
importance: Undecided → Wishlist
status: New → Triaged
Changed in meta-gnome3 (Debian):
status: Unknown → New
Jeremy Bicha (jbicha) wrote :

It is now possible to remove gtk2 from the default Ubuntu install in 18.04 Alpha but you'll lose Firefox (can be replaced by Chromium or Epiphany or Firefox 58 Beta) and Thunderbird (can be replaced by Evolution) and debconf support in the Ubuntu/GNOME Software app.

Let's keep this bug open though because it's possible to fix those issues before 18.04's release.

description: updated
Bryan Quigley (bryanquigley) wrote :

Is the Thunderbird proposed being tracked somewhere? I'm +1 disabling Flash in thunderbird.

Jeremy Bicha (jbicha) wrote :

Bryan, see https://bugzilla.mozilla.org/show_bug.cgi?id=1423363

Thunderbird only does major releases based off Firefox ESR's. Firefox 52 ESR still supports GTK2 plugins besides Flash. Therefore, I was thinking it would be safer to drop the gtk2 dependency in the current Thunderbird Beta's or in the next major release which I believe will be Thunderbird 60 and so it will be too late for Ubuntu 18.04 (but not 18.04.1). (Earlier, 59 was scheduled to be the next ESR and might have been early enough.)

We could
1. look at doing the change anyway in Ubuntu 18.04, or
2. ship a Thunderbird Beta, or
3. just wait for 18.04.1 and 18.10 to drop gtk2 from the default install, or
4. not include Thunderbird in the default install

See https://wiki.mozilla.org/RapidRelease/Calendar (note that a new major Thunderbird release is expected to a bit late compared to the Firefox ESR release)

Jeremy Bicha (jbicha) wrote :

gtk2 is no longer in the default install for most locales.

See https://launchpad.net/ubuntu/+bugs?field.tag=gtk2-demotion for the remaining bugs that affect the live image.

Changed in ubuntu-meta (Ubuntu):
status: Triaged → Fix Released
Changed in ubuntu-gnome:
status: Triaged → Fix Released
Changed in meta-gnome3 (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.