6

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'.
Kevin Bowen
  • 19,615
  • 55
  • 79
  • 83
Simon Landeholm
  • 163
  • 1
  • 4
  • Details? Please? –  Oct 02 '12 at 10:28
  • 1
    Have you installed light-themes version 0.1.8.28.1 (at least) ? – hytromo Oct 03 '12 at 12:38
  • 1
    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 Oct 03 '12 at 15:31
  • This is part of a series of well known GTK theme bugs. While workarounds or patches may exist, discussion on bugs is off topic on AU. If an update to the most recent theme version doesn't help, please take the time and report the bug if nobody else did so far. – David Foerster Oct 19 '14 at 20:36

2 Answers2

6

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!

αғsнιη
  • 35,660
Swashy
  • 61
  • 1
  • 2
  • This should be the accepted answer. It fixes the problem instead of working around it. – Robert Oct 30 '16 at 16:03
  • 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 – cayhorstmann Aug 27 '19 at 09:37
0

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

gapp 2>/dev/null

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

January
  • 35,952