Disable css warnings

5,997

Solution 1

Well, I usually deal with that by redirecting stderr to /dev/null

gapp 2>/dev/null

Also, try the option --gtk-no-debug all

Solution 2

I'm not sure if anyone else is still having this issue but I sure was. the solution is INCREDIBLY SIMPLE.

I run xfce4 on Arch Linux with the "dusk theme". I was getting this error for a gtk.css file on line 72.

By grepping the output of "find", I found the file in /usr/share/themes/Xfce-dusk/gtk-3.0/gtk.css.

On Line 72 I changed it from,

"text-shadow: 1 1 white;"

to

"text-shadow: 1px 1px white;"

Voila! No more annoying error messages!

Share:
5,997

Related videos on Youtube

Simon Landeholm
Author by

Simon Landeholm

Updated on September 18, 2022

Comments

  • Simon Landeholm
    Simon Landeholm almost 2 years

    Everytime I open a gtk application it outputs css warnings (lack of units assuming px etc). Can I disable this dreadful verbosity?

    example:

    $ gedit
    
    (gedit:19558): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:3:14: Not using units is deprecated. Assuming 'px'.    
    (gedit:19558): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:52:20: Not using units is deprecated. Assuming 'px'.
    (gedit:19558): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:72:19: Not using units is deprecated. Assuming 'px'.
    (gedit:19558): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:102:14: Not using units is deprecated. Assuming 'px'.
    (gedit:19558): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:102:16: Not using units is deprecated. Assuming 'px'.
    (gedit:19558): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:105:20: Not using units is deprecated. Assuming 'px'.
    (gedit:19558): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:129:16: Not using units is deprecated. Assuming 'px'.
    (gedit:19558): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:130:17: Not using units is deprecated. Assuming 'px'.
    (gedit:19558): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:141:20: Not using units is deprecated. Assuming 'px'.
    (gedit:19558): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:142:19: Not using units is deprecated. Assuming 'px'.
    (gedit:19558): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:149:14: Not using units is deprecated. Assuming 'px'.
    (gedit:19558): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:168:19: Not using units is deprecated. Assuming 'px'.
    (gedit:19558): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:169:20: Not using units is deprecated. Assuming 'px'.
    (gedit:19558): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:182:19: Not using units is deprecated. Assuming 'px'.
    (gedit:19558): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:196:20: Not using units is deprecated. Assuming 'px'.
    (gedit:19558): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:207:19: Not using units is deprecated. Assuming 'px'.
    
    • Admin
      Admin over 11 years
      Details? Please?
    • hytromo
      hytromo over 11 years
      Have you installed light-themes version 0.1.8.28.1 (at least) ?
    • Simon Landeholm
      Simon Landeholm over 11 years
      I don't use light-themes. I like it dark as a prowling panther. Why is there 99 light themes in Ubuntu and no dark ones? There is the dark ambiance, but i don't want f*cking beige backgrounds. The contrasts stings my eyes like a green laser! Anyway this is highly unrelated to the question i asked...
  • Simon Landeholm
    Simon Landeholm over 11 years
    I case there is no option for this i guess this answers my question... :(
  • January
    January over 11 years
    You can try also the option --gtk-no-debug all
  • Nicolas
    Nicolas over 11 years
    --gtk-no-debug all doesn't work. It doesn't hide the Gtk-WARNING
  • Robert
    Robert over 7 years
    This should be the accepted answer. It fixes the problem instead of working around it.
  • cayhorstmann
    cayhorstmann almost 5 years
    Sometimes, it can be tricky to find which gtk.css is the offending one. I got this problem with a .config/gtk-3.0/gtk.css that I had long forgotten. In my case, the complaint was about line 4, and I found the culprit by printing out line 4 of every gtk.css file: for f in $(locate gtk.css) ; do echo $f ; sed -n 4p < $f ; done