Silence Evince's warnings in Ubuntu

3

1

I'm getting loads of Evince warnings when running it from the terminal. E.g.

(evince:4599): GVFS-WARNING **: can't init metadata tree /home/nivaca/.local/share/gvfs-metadata/home: open: Permission denied

(evince:4599): GVFS-WARNING **: can't init metadata tree /home/nivaca/.local/share/gvfs-metadata/home: open: Permission denied

** (evince:4599): WARNING **: Error setting file metadata: can't open metadata tree

(evince:5001): Gtk-CRITICAL **: gtk_widget_show: assertion 'GTK_IS_WIDGET (widget)' failed

I've searched everywhere how to fix this problems, but I haven't been able to do so.

Thus, what I want now is to silence these warnings, as they unable me to see what's really going on with my other processes in the terminal.

Is there any way to do this?

NVaughan

Posted 2015-09-30T15:22:38.857

Reputation: 453

1It looks like the user under which evince runs is not allowed to create files in the directory .local/.... Try changing permissions to 777 for /home/nivaca/.local/share/gvfs-metadata and see whether this changes anything, chmod -R 777 directory... – MariusMatutiae – 2015-09-30T16:05:04.180

Thanks. That cleared up the first three warnings, but not the last one. – NVaughan – 2015-09-30T16:51:04.607

You mean Gtk-Critical? – MariusMatutiae – 2015-09-30T16:53:07.067

Yes, that one... – NVaughan – 2015-09-30T18:44:26.560

You should read this question, http://unix.stackexchange.com/questions/230238/starting-x-applications-from-the-terminal-and-the-warnings-that-follow and especially the accepted answer.

– MariusMatutiae – 2015-09-30T18:55:23.017

Thanks. I added "export NO_AT_BRIDGE=1" to \etc\environment but the warnings keep popping up. – NVaughan – 2015-09-30T19:12:27.123

Not what I meant. The guy says the GTk-critical error is irelevant,and you can leave it at that. – MariusMatutiae – 2015-09-30T20:00:23.973

Yes, I know is not critical. But in my workflow these messages are annoying: I'm LaTeXing and these warnings scroll up the messages that do matter. – NVaughan – 2015-09-30T23:18:23.643

Answers

1

I don't necessarily recommend this course of action, but you could put something like:

alias evince='evince 2>/dev/null'

which will remove all standard error from evince. I think that the minor annoyance of seeing them is better than the one time evince will actually fail and won't tell you why, but it is an option.

You could also do something fancier if you use bash, like:

alias evince='evince 2> >( grep -v "evince.*WARNING" >&2 )'

to filter out specific lines from standard error. This may be more safe, but I'm not necessarily endorsing it.

Erik

Posted 2015-09-30T15:22:38.857

Reputation: 126