Skip to content

.xsession-errors: Theme parsing error: <data>:1:18: Junk at end of value for color

I noticed frequent writes into my $HOME/.xsession-errors, and found lines like the following:

(wrapper-2.0:33126): Gtk-WARNING **: 12:01:03.436: Theme parsing error: <data>:1:18: Junk at end of value for color

To reproduce this message:

  1. Add the Window Header - Menu to a panel.
  2. Edit the properties of the Window Header - Menu panel item, and UNCHECK "Show the window Icon."
  3. The message will appear in .xsession-errors.
  4. Change to various windows, and the message will appear whenever a new window is selected.

Work around:

  1. CHECK "Show the window Icon." in Window Header - Menu panel item.
  2. The message will not appear in .xsession-errors.
  3. If there are multiple panels and multiple instances of Window Header - Menu, the same option must be CHECKED on all instances.

xfce4-windowck-plugin version info:

Package: xfce4-windowck-plugin           
Version: 0.5.1-1+b1
New: yes
State: installed
Automatically installed: no
Multi-Arch: same
Priority: optional
Section: xfce
Maintainer: Akbarkhon Variskhanov <akbarkhon.variskhanov@gmail.com>
Architecture: amd64
Uncompressed Size: 570 k
Depends: libc6 (>= 2.4), libcairo2 (>= 1.2.4), libgdk-pixbuf-2.0-0 (>= 2.22.0), libglib2.0-0 (>= 2.41.1), libgtk-3-0 (>= 3.22.0), libpango-1.0-0 (>= 1.14.0), libwnck-3-0 (>= 3.22.0), libxfce4panel-2.0-4 (>= 4.14.0), libxfce4ui-2-0 (>= 4.15.2), libxfce4util7 (>= 4.14.0), libxfconf-0-3 (>= 4.14.0)
Description: window buttons, title & menu on Xfce panel
 This plugin allows adding buttons, title and menu for either active or maximized windows to the panel, separately. 
 
 Original plugin's features: 
 * Three separate plugins that can individually be set to appear for either active or maximized windows. 
 * Allow window actions on button and title clicks (activate, (un)maximize, close). 
 * Allow window action menu on left button click. 
 * Title formatting options. 
 * Xfwm4/Unity theming support for buttons.
Homepage: https://docs.xfce.org/panel-plugins/xfce4-windowck-plugin/start

Distribution/DE/WM information:

OS: Linux Mint 21 x86_64
DE: Xfce 4.16
WM: Xfwm4
WM Theme: CBlack
Theme: Mint-Y-Dark-Purple [GTK2]
Icons: Mint-Y-Purple [GTK2]

Investigation:

I noted the source of the line being <data> where more commonly this is a gtk.css file name. I believe (guess) when it shows <data> this means it's sort of embedded in a binary itself instead of an external file. I tracked down the wrapper PID in the line, which led me to an instance of wrapper calling libwckmenu.so. Looking through the source I found one instance of where color is being set in CSS syntax style to a variable.

https://gitlab.xfce.org/panel-plugins/xfce4-windowck-plugin/-/blob/master/panel-plugin/menu/wckmenu-icon.c#L111

It's my guess this is where this is coming from. Maybe the color value is malformed only when the standard down-arrow is used.

https://gitlab.xfce.org/panel-plugins/xfce4-windowck-plugin/-/blob/master/panel-plugin/menu/wckmenu-icon.c#L133

This line here appears to pass color into the function, maybe the theme that's being used doesn't have the applicable values set, and allows for this warning to surface? I think the logic surrounding this function call aligns with the conditions under which the message appears in my .xsession-errors:

if (wmp->prefs->show_app_icon)

It only executes the set_icon_color() when show_app_icon is false.