Gtk3 Update Causing Havoc

Home » CentOS » Gtk3 Update Causing Havoc
CentOS 3 Comments

On my lab systems, the automatic updates were failing because of the problems with ipod libraries from EPEL being in the way. It turns out that was a good thing, because when I “fixed” it, a massive set of packages was updated, including the new gtk3.

These packages are the ones causing problems, I think.

gtk3-3.22.10-4.el7.x86_64
gtk3-devel-3.22.10-4.el7.x86_64

In the release notes, there is mention of the “giant icon” problem and how to fix that. We understand that part.

The bad problem I see now is that Emacs and Chromium-browser, which rely on gtk3 don’t work properly anymore. In Emacs, the symptom is that the ribbon of buttons under the pull down menu will no longer show. In Chromium, the buttons and other widget things on the top are an ugly yellow distortion.

I’ve recompiled the Emacs that comes with EL7, as well as 24.5, and the Emacs behaves the same way, no buttons show. The buttons are invisible, but still there. If you click in there, you can get lucky.

Do you see it too in Emacs?

I see some posts that say the Gnome themes don’t work any more with GTK and those themes should have been deprecated by the gtk3 packages. I don’t think the theme is the cause because I see same problem in both Gnome and XFCE4 desktops. I see it also if I SSH into the machine and run emacs forwarded over X11.

I just realized that on Ubuntu I’m running gtk-3.22.11 with Emacs 24.5
and the icons do show. Maybe there is a change in the compiler flag for Emacs that I’m missing.

pj

3 thoughts on - Gtk3 Update Causing Havoc

  • Un-intuitive as it may be, you may just need to start using either the Adwaita or Clearlooks-phenix theme.

    One chap I know of that’s using the CERN linux told me that solved a problem similar to yours by using the clearlooks-phenix theme.

    I use clearlooks-phenix here to solve a different set of problems (menus on Gnome-terminal and Geany), and I don’t really like the way Adwaita looks.

    Here’s the solution if you want to try it:

    yum install clearlooks-phenix-gtk2-theme clearlooks-phenix-gtk3-theme

    Go to the look and feel preferences setting on your desktop and select Clearlooks-phenix from the list.

    And afterward you can

    yum remove mate-themes

    if you want because it’s not needed any more (assuming that you’re using mate, that is).

  • I will try to fiddle with themes, but I think it is a superficial fix. Emacs ought to work even without a desktop environment. Hell, I’ll run Window Maker with no DE at all sometimes.

    I think I found fix with this with Emacs. It may be only fix for Chromium or like is a theme, because there is no way I have energy to learn how to compile that.

    The Emacs fix…

    I checked Ubuntu’s packaging of Emacs to see how it is different. They have a patch they pulled from Emacs upstream. Ironically, it is called “0020-Emacs-should-show-GTK-icons-again.patch”. With that, I’ve recompiled Emacs and buttons now work correctly, without changing anything else, no new themes. In fact, I’m doing these builds on a headless system where I’m launching Emacs to test via X11 forwarding. Theme does not matter, so far as I can tell. The Emacs session forwards back just fine now, calling into question the emphasis on themes.

    In case you want to try Emacs-24.5 on CentOS with that patch, the files are in my rpm server

    http://pj.freefaculty.org/Software/EL

    It is yum repo, if you install my security key

    The RPMs in question are

    http://pj.freefaculty.org/Software/EL/7/x86_64/emacs-24.5-8.el7.CentOS.x86_64.rpm http://pj.freefaculty.org/Software/EL/7/x86_64/emacs-common-24.5-8.el7.CentOS.x86_64.rpm

    All the other RPM files generated from the Emacs build are in that same folders.

    I know I’m not allowed to put an attachment on this list, so I’ll paste in 0020-Emacs-should-show-GTK-icons-again.patch and you can maybe tell me what it does:

    From d4a257411a7c23c2ed75c3e163243fd0e92dc2be Mon Sep 17 00:00:00 2001
    From: =?UTF-8?q?Jan=20Dj=C3=A4rv?=
    Date: Sat, 18 Oct 2014 18:19:53 +0200
    Subject: Emacs should show GTK+ icons again.

    This upstream patch has been added:

    Handle deprecated Gtk+ stuff for version < = 3.10 * lisp/term/x-win.el (x-gtk-stock-map): Add icon names suggested as replacements to stock names before stock names in a list. Cdr may be a list, each name is tried in turn until one is found. * src/gtkutil.c (XG_TEXT_CANCEL, XG_TEXT_OPEN, XG_TEXT_OK): New defines to handle Gtk versions. (xg_get_file_with_chooser): Use them. (xg_have_tear_offs, tearoff_remove, tearoff_activate): Remove (create_menus): Remove teroff argument and code. Remove call to gtk_menu_set_title. (xg_update_menubar, xg_update_submenu): Remove tearoff code. Adjust args to create_menus. (xg_tool_bar_menu_proxy, xg_tool_bar_detach_callback) (xg_tool_bar_attach_callback, TOOLBAR_TOP_WIDGET): Remove. (xg_pack_tool_bar): Replace TOOLBAR_TOP_WIDGET, remove detach code. (xg_make_tool_item): Remove detach code. (xg_update_tool_bar_sizes): Replace TOOLBAR_TOP_WIDGET. (find_icon_from_name): New function. (update_frame_tool_bar): Remove GtkStockItem code, move to find_icon_from_name. Let stock be a list of icon names to try. -- Paul E. Johnson http://pj.freefaculty.org Director, Center for Research Methods and Data Analysis http://crmda.ku.edu

    To write to me directly, please address me at pauljohn at ku.edu.

LEAVE A COMMENT