! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Some icons not being displayed after upgrade to xfce4-panel-4.11.0
Status:
RESOLVED: FIXED

Comments

Description Aaditya Bagga 2014-02-23 08:49:01 CET
Created attachment 5371 
xfce4-panel

Hello, I upgraded to xfce4-panel-4.11.0 (after garcon-0.3.0 and libxfce4util-4.11.0 and libxfce4ui-4.11.0),
and after the upgrade menu icons for many icons are not being displayed.

After reverting to 4.10.1 they were being displayed.
I also upgraded libxfce4ui to 4.11.1 from 4.11.0 but that did'nt make a difference.
I have attached a screenshot.

Also if I have missed to update some package let me know.
I am using Slackware Linux and the xfce4 packages are as follows:

libxfce4ui-4.11.1-x86_64-1_custom
xfce4-panel-4.11.0-x86_64-2_custom
libxfce4util-4.11.0-x86_64-1_custom
garcon-0.3.0-x86_64-1_custom
xfwm4-4.11.1-x86_64-1_custom
xfce4-dev-tools-4.10.0-x86_64-1
xfce4-terminal-0.6.2-x86_64-1
libxfcegui4-4.10.0-x86_64-2
gtk-xfce-engine-3.0.1-x86_64-1
xfce4-power-manager-1.2.0-x86_64-2
xfce4-notifyd-0.2.4-x86_64-1
xfce4-taskmanager-1.0.0-x86_64-2
xfce4-screenshooter-1.8.1-x86_64-2
xfce4-volumed-0.1.13-x86_64-1
xfce4-appfinder-4.10.1-x86_64-1
xfce4-settings-4.10.1-x86_64-1
xfce4-session-4.10.1-x86_64-3
xfce4-clipman-plugin-1.2.3-x86_64-2
xfce4-mixer-4.8.0-x86_64-1
Comment 1 Aaditya Bagga 2014-02-23 09:20:46 CET
Update:

The icons appear with the right click menu, but not the Applications menu, as described here:
https://www.linuxquestions.org/questions/slackware-14/xfce4-different-backgrounds-on-each-workspace-4175495831/#post5123095
Comment 2 Aaditya Bagga 2014-02-23 12:01:13 CET
Also I had a submenu previously called Others in which I had placed a couple of entries like Switch User, Wmagnify, etc, which is now not present with this release.
Comment 3 Olivier Duchateau 2014-02-23 21:58:32 CET
I've same behaviour, after upgrading xfce4-panel to 4.11.0. I think it's lack support of XPM icons in panel.
Comment 4 Olivier Duchateau 2014-02-26 19:10:45 CET
It's concerned only when full path (of icons) is mentionned in desktop files.

Tested when Gtk3 is enabled.
Comment 5 Aaditya Bagga 2014-02-27 03:24:02 CET
(In reply to duchateau.olivier from comment #4)
> It's concerned only when full path (of icons) is mentionned in desktop files.
> 
> Tested when Gtk3 is enabled.

Yes, it maybe as you say that full path is specified.

BrZ also posted similarly in the link http://www.linuxquestions.org/questions/slackware-14/xfce4-different-backgrounds-on-each-workspace-4175495831/#post5123095

So now is it the case that its not possible to specify the full path of the icon? But it works with the right-click menu?

Also the "Others" submenu was lost for me which contained a couple of entries..
Comment 6 xethm55 2014-02-28 09:12:15 CET
I am seeing the same behavior running XFCE Panel version 4.11 on Manjaro.
Anyone know of a fix yet?
Comment 7 Simon Steinbeiss editbugs 2014-03-21 02:28:51 CET
The problem seems to be the switch to using garcon's gtk-menu (as introduced in this commit: http://git.xfce.org/xfce/garcon/commit/?id=70bc6e0e3fbb0ee8b42daf13f446a809e06e77d0)

The main difference is that previously, the applications menu used the function xfce_panel_image_new_from_source (checks for icon-names and paths), whereas garcon now uses gtk_image_new_from_icon_name (checks only for icon-names, "Creates a GtkImage displaying an icon from the current icon theme. If the icon name isn't known, a "broken image" icon will be displayed instead."). So all desktop-files specifying a full path or an icon extension fail.
The freedesktop.org specification for .desktop files specifies icon-names or paths as viable alternatives(http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s05.html), so in my opinion garcon should support both, despite gtk2's shortcomings in this respect.

What could be used in garcon is a function like xfdesktop's xfdesktop_app_menu_item_set_icon (from xfdesktop-app-menu-item) to check for the various ways the icon could be set in the desktop file. This function is also the main reason that xfdesktop's applications menu (in the previous comments dubbed as "right-click menu") doesn't expose this bug.

Another option is to switch back to using XfcePanelImage and xfce_panel_image_new_from_source.
Comment 8 Simon Steinbeiss editbugs 2014-03-21 02:32:32 CET

PS: And this is how I confirmed this issue for myself so far: For desktop-files that specify only an extension, but not the full path (e.g. skype specifies skype.png) you can simply add the file extension another time to confirm this issue, e.g. renaming it to "skype.png.png" (and updating the icon-cache) results in the icon being found by gtk_image_new_from_icon_name.
Comment 9 Eric Koegel editbugs 2014-03-21 19:35:46 CET
Just an FYI the spec now says:
"Icon to display in file manager, menus, etc. If the name is an
absolute path, the given file will be used. If the name is not
an absolute path, the algorithm described in the Icon Theme
Specification will be used to locate the icon."

http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s05.html

Installing gftp on some distros provides a helpful notice as such:

 * QA Notice: This package installs one or more .desktop files that do not
 * pass validation.
 * 
 * 	/usr/share/applications/gftp.desktop: error: (will be fatal in
 the future): value "gftp.png" for key "Icon" in group "Desktop Entry" is
 an icon name with an extension, but there should be no extension as
 described in the Icon Theme Specification if the value is not an
 absolute path
Comment 10 Eric Koegel editbugs 2014-03-25 18:08:10 CET
Created attachment 5395 
garcon patch for icons

This patch applies against garcon since that's
where the fix would be. It checks for an icon
by the name before the extension or if it exists
in the pixmaps folder. Same as xfdesktop.
Comment 11 Olivier Duchateau 2014-03-25 21:57:20 CET
(In reply to Eric Koegel from comment #10)
> Created attachment 5395 
> garcon patch for icons
> 
> This patch applies against garcon since that's
> where the fix would be. It checks for an icon
> by the name before the extension or if it exists
> in the pixmaps folder. Same as xfdesktop.

Thanks, now xfce4-panel displays every icons.
Comment 12 Aaditya Bagga 2014-03-26 18:52:43 CET
(In reply to Eric Koegel from comment #10)
> Created attachment 5395 
> garcon patch for icons
> 
> This patch applies against garcon since that's
> where the fix would be. It checks for an icon
> by the name before the extension or if it exists
> in the pixmaps folder. Same as xfdesktop.

Hi, the difference this patch makes on my system is that I have got the "Other" sub-menu back, but the icons still are not being displayed for me..

I patched and built garcon the following way (a snippet):

#--------------------------------------------------------------------------
# Apply patch
patch -p1 < 0001-Fix-menu-icons-for-misconfigured-desktop-files-Bug-1.patch

# Build and install:
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
#--------------------------------------------------------------------------

An example where the icon is not being displayed: Thunderbird (a snippet):

#--------------------------------------------------------------------------
cat /usr/share/applications/mozilla-thunderbird.desktop 
[Desktop Entry]
Encoding=UTF-8
Exec=thunderbird
Icon=/usr/share/pixmaps/thunderbird.png
Type=Application
Categories=Application;Network;
Name=Thunderbird
#--------------------------------------------------------------------------

Note that I have not restarted my system...is that necessary?
(I logged in as another user and it was the same as mine; icons not displayed)

Thanks.
Comment 13 Aaditya Bagga 2014-03-26 18:57:52 CET
Forgot to add that the icons are being displayed with Xfdesktop's application menu..
Comment 14 Aaditya Bagga 2014-04-18 10:55:03 CEST
Sometimes the "Other" submenu gets displayed, sometimes not...

(But no change in the display of the icons..)
Comment 15 mikkl 2014-08-30 12:17:21 CEST
I can confirm this issue and the provided patch fixes this for me.
I also have an "other" menu which was created by wine. However, i have no problems with it but it also wasn't affected by the issue before the patch.
Comment 16 Eric Koegel editbugs 2014-09-24 18:42:01 CEST
Moving over to garcon because that's where this would be applied.
Comment 17 Aaditya Bagga 2014-11-01 13:52:26 CET
Hi,

Today I looked more closely at the patch, and let me elaborate where it seems to work and where it does not.

a) Where it works:

1.) Only icon name specfied, and the icon is present in /usr/share/icons/hicolor/$SIZE/apps and /usr/share/icons/$THEME/apps/$SIZE

[Desktop Entry]
Version=1.0
Name=Thunderbird
Comment=Mail & News Reader
GenericName=Mail Client & News Reader
Exec=thunderbird %u
TryExec=thunderbird
Icon=thunderbird
Terminal=false
Type=Application
Categories=Network;Email;
MimeType=message/rfc822;x-scheme-handler/mailto;
StartupNotify=true

2.) Only icon name specified, and the icon is present in /usr/share/pixmaps

[Desktop Entry]
Name=Firefox ESR
GenericName=Web Browser
Icon=firefox-esr
Type=Application
Categories=Application;Network;
MimeType=text/html
Encoding=UTF-8
Exec=firefox-esr %u
Terminal=false
MultipleArgs=false
StartupNotify=false
StartupWMClass=Firefox ESR


b) Where it does not work:

1.) Full path of icon specified, icon is in specified location

[Desktop Entry]
Encoding=UTF-8
Name=3D Acceleration
Comment=Change 3D Acceleration options
Exec=driconf
Icon=/usr/share/driconf/driconf-icon.png
Type=Application
Categories=GNOME;Application;Settings;AdvancedSettings;
StartupNotify=true

2.) Name of icon specified with or without extension, desktop file is in .local/share/applications

[Desktop Entry]
Type=Application
Version=1.0
Name=Opera
GenericName=Web browser
Comment=Fast and secure web browser and Internet suite
Icon=opera-browser.png
Exec=opera
Terminal=false
Categories=Network;WebBrowser;
StartupNotify=true

----------------------------------------------------------------------------------

* In all these cases, the xfdesktop menu displays the icons correctly.

----------------------------------------------------------------------------------
Comment 18 Aaditya Bagga 2014-11-01 13:57:38 CET
Forget to mention to mention that for example no b.2 above, the icon can be found at /usr/share/icons/$THEME/apps/$SIZE (and the .desktop file is in the home folder).
Comment 19 Aaditya Bagga 2014-11-01 14:42:47 CET
Maybe I was using the wrong package (from archive.xfce.org rather than git.xfce.org), or maybe I was not patching it correctly, but today in re-evaluating, I tried to patch and rebuild the package, and this time the rebuilt package worked correctly (after logging in and out).

I tried it on two different distributions (Manjaro and Slackware), and the patched version seemed to work on both.

Sorry for any inconvenience (unintentionally) caused .

Marking it as resolved.
Comment 20 Eric Koegel editbugs 2014-11-01 15:33:32 CET
Hey,
  Glad it's working for you! Thanks for testing it out. We should leave this open until someone commits it to gacron, otherwise the patch may be forgotten.

Reopening bug for now.
Comment 21 Eric Koegel editbugs 2014-12-17 09:30:39 CET
Finally, pushed to master in:
commit d8f01b81c7bc69cd4f9741e6ec42b66e6a848b9d
Author: Eric Koegel <eric.koegel@gmail.com>
Date:   Tue Mar 25 19:59:55 2014 +0300

    Fix menu icons for misconfigured desktop files (Bug 10709)
    
    The desktop entry spec says the Icon key in a .desktop file should
    either not have an extension or provide an absolute path. This patch
    allows programs which don't conform to that spec to still properly
    display an icon by checking for the icon name before the extension
    or if they exist in the pixmaps folder; Same as xfdesktop.
    This patch also scales all the images down to the configured gtk icon
    size which is slightly different from xfdesktop because garcon doesn't
    depend on libexo.
    Revelant Desktop Entry Spec:
    http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s05.html
http://git.xfce.org/xfce/garcon/commit/?id=d8f01b81c7bc69cd4f9741e6ec42b66e6a848b9d
Comment 22 Zero_Chaos 2015-08-17 17:32:16 CEST
Inexplicably, I'm hitting exactly as this bug describes:

[ebuild   R    ] xfce-base/xfdesktop-4.12.2::gentoo  USE="libnotify thunar -debug" 1,387 KiB
[ebuild   R    ] xfce-base/xfce4-panel-4.12.0::gentoo  USE="-debug" 0 KiB
[ebuild   R    ]  xfce-base/garcon-0.5.0-r1::gentoo  USE="-debug" 447 KiB


I have a custom menu created with icons defined by full path.  The custom menu is completely missing from the xfce application menu in the panel, but only the icons are missing when I right click to view applications.

Please advise.
Comment 23 Zero_Chaos 2015-08-21 18:28:25 CEST
per a request in irc, I rebuild everything I have installed that contained "xfce" in the category or package name (twice) yet I am still experiencing what appears to be this bug.  here is a list of package with versions:

[ebuild   R    ] xfce-extra/xfce4-xkb-plugin-0.7.1::gentoo  USE="-debug" 0 KiB
[ebuild   R    ] xfce-extra/xfce4-volumed-pulse-0.2.0::gentoo  USE="libnotify -debug" 0 KiB
[ebuild   R    ] xfce-extra/xfce4-screenshooter-1.8.2::gentoo  USE="-debug" 0 KiB
[ebuild   R    ] xfce-extra/xfce4-power-manager-1.5.2::gentoo  USE="policykit -debug -networkmanager -systemd" XFCE_PLUGINS="power" 0 KiB
[ebuild   R    ] xfce-extra/xfce4-battery-plugin-1.0.5::gentoo  USE="-debug" 0 KiB
[ebuild   R    ] xfce-extra/tumbler-0.1.31::gentoo  USE="curl ffmpeg gstreamer jpeg pdf -debug -odf -raw" 0 KiB
[ebuild   R    ] xfce-extra/thunar-volman-0.8.1::gentoo  USE="libnotify -debug" 0 KiB
[ebuild   R    ] xfce-extra/thunar-vcs-plugin-0.1.4::gentoo  USE="git subversion -debug" 0 KiB
[ebuild   R    ] xfce-extra/thunar-archive-plugin-0.3.1-r1::gentoo  USE="-debug" 0 KiB
[ebuild   R    ] xfce-base/xfce4-meta-4.12::gentoo  USE="svg -minimal" 0 KiB
r200:0::gentoo] USE="-debug" ABI_X86="32 (64) (-x32)" 368 KiB
[ebuild   R    ] x11-terms/xfce4-terminal-0.6.3::gentoo  USE="-debug" 0 KiB
[ebuild   R    ] xfce-base/xfdesktop-4.12.2::gentoo  USE="libnotify thunar -debug" 0 KiB
[ebuild   R    ]  xfce-base/thunar-1.6.10::gentoo  USE="dbus exif libnotify pcre udisks -debug {-test}" XFCE_PLUGINS="trash" 0 KiB
[ebuild   R    ] xfce-base/xfce4-session-4.12.1::gentoo  USE="nls policykit upower xscreensaver -debug -systemd" 0 KiB
[ebuild   R    ] xfce-extra/xfce4-notifyd-0.2.4::gentoo  USE="-debug" 0 KiB
[ebuild   R    ] xfce-base/xfce4-settings-4.12.0::gentoo  USE="libnotify upower xklavier -debug -libcanberra -libinput" 0 KiB
[ebuild   R    ] xfce-base/xfwm4-4.12.3::gentoo  USE="dri startup-notification xcomposite -debug" 0 KiB
[ebuild   R    ] xfce-base/xfce4-appfinder-4.12.0-r1::gentoo  USE="-debug" 0 KiB
[ebuild   R    ] xfce-base/xfce4-panel-4.12.0::gentoo  USE="-debug" 0 KiB
[ebuild   R    ]  xfce-base/garcon-0.5.0-r1::gentoo  USE="-debug" 0 KiB
[ebuild   R    ]  xfce-base/exo-0.10.6::gentoo  USE="-debug" 0 KiB
[ebuild   R    ]   xfce-base/libxfce4ui-4.12.1-r2::gentoo  USE="gtk3 startup-notification -debug" 0 KiB
[ebuild   R    ] xfce-base/xfconf-4.12.0-r1::gentoo  USE="perl -debug" 0 KiB
[ebuild   R    ]  xfce-base/libxfce4util-4.12.1:0/7::gentoo  USE="-debug" 0 KiB
[ebuild   R    ] dev-util/xfce4-dev-tools-4.12.0::gentoo  0 KiB
Comment 24 Zero_Chaos 2015-09-02 16:06:51 CEST
by request, my gtk stuff was rebuilt and also didn't solve this issue:

[ebuild   R    ] x11-themes/gtk-theme-switch-2.1.0::gentoo  0 KiB
[ebuild   R    ] x11-misc/xdg-user-dirs-gtk-0.10::gentoo  0 KiB
[ebuild   R    ] net-misc/spice-gtk-0.25-r1::gentoo  USE="dbus gtk3 introspection policykit pulseaudio python usbredir -doc -gstreamer -sasl -smartcard -static-libs -vala -webdav" PYTHON_TARGETS="python2_7" 0 KiB
[ebuild   R    ] net-libs/gtk-vnc-0.5.4::gentoo  USE="gtk3 introspection pulseaudio python -examples -sasl -vala" PYTHON_TARGETS="python2_7" 0 KiB
[ebuild   R    ] media-video/gtk-recordmydesktop-0.3.8-r3::gentoo  PYTHON_TARGETS="python2_7" 0 KiB
[ebuild   R    ] media-libs/clutter-gtk-1.6.0:1.0::gentoo  USE="introspection -debug -examples" 0 KiB
[ebuild   R    ] dev-ruby/ruby-gtk2-2.2.3::gentoo  USE="{-test}" RUBY_TARGETS="ruby19 ruby20" 0 KiB
[ebuild   R    ] dev-python/pygtksourceview-2.10.1-r1:2::gentoo  USE="-doc" PYTHON_TARGETS="python2_7" 0 KiB
[ebuild   R    ] dev-cpp/gtksourceviewmm-3.12.0:3.0::gentoo  USE="-doc" 0 KiB
[ebuild   R    ]  x11-libs/gtksourceview-3.14.4:3.0/3::gentoo  USE="introspection -glade {-test} -vala" 0 KiB
[ebuild   R    ]  dev-cpp/gtkmm-3.14.0-r1:3.0::gentoo  USE="X (-aqua) -doc -examples {-test} -wayland" ABI_X86="32 (64) (-x32)" 0 KiB
[ebuild   R    ] dev-python/pygtk-2.24.0-r4:2::gentoo  USE="-doc -examples {-test}" PYTHON_TARGETS="python2_7" 0 KiB
[ebuild   R    ] x11-libs/gtk+-3.14.13:3::gentoo  USE="X cups introspection xinerama (-aqua) -broadway -cloudprint -colord -debug -examples {-test} -vim-syntax -wayland" ABI_X86="32 (64) (-x32)" 0 KiB
[ebuild   R    ] x11-libs/gtk+-2.24.28-r1:2::gentoo  USE="cups introspection xinerama (-aqua) -debug -examples {-test} -vim-syntax" ABI_X86="32 (64) (-x32)" 0 KiB
[ebuild   R    ]  dev-util/gtk-update-icon-cache-3.14.13::gentoo  0 KiB
[ebuild   R    ]  dev-util/gtk-doc-am-1.24::gentoo  0 KiB
Comment 25 Zero_Chaos 2015-09-02 18:45:00 CEST
for anyone following this still, killermoehre on irc pointed out that my problem is with .directory files and not .desktop files based on a screenshot, so I will stop posting on this bug.

Bug #10709

Reported by:
Aaditya Bagga
Reported on: 2014-02-23
Last modified on: 2015-09-02

People

Assignee:
Nick Schermer
CC List:
7 users

Version

Version:
unspecified

Attachments

xfce4-panel (446.68 KB, image/png)
2014-02-23 08:49 CET , Aaditya Bagga
no flags
garcon patch for icons (3.66 KB, patch)
2014-03-25 18:08 CET , Eric Koegel
no flags

Additional information