Author Topic: Suppress Output  (Read 2772 times)

pqwoerituytrueiwoq

  • Newbie
  • *
  • Posts: 4
    • View Profile
Suppress Output
« on: May 08, 2013, 20:13:40 »
Is there a way i can make it not fill up my ~/.xsession-errors file with my libary
i tried this, but it still fills it up
gmusicbrowser -play 1>&2 /dev/null

Quentin Sculo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1100
    • View Profile
Re: Suppress Output
« Reply #1 on: May 09, 2013, 02:41:14 »
Adding ">/dev/null 2>&1" should work (the order matter) or "&>/dev/null" if using bash.
Actually I think gmb only use the standard error output, so simply "2>/dev/null" should work.
I guess I could add a command-line option, though it wouldn't work with some messages, in particular the "*** GPerl asked to invoke callback from a foreign thread; handing it over to the main loop" that comes from the glib perl binding.

TBeholder

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Suppress Output
« Reply #2 on: October 29, 2013, 17:56:15 »
It doesn't work.
"bash -c gmusicbrowser >$HOME/.gmusicbrowser_out.txt 2>&1" works correctly in  terminal, but does nothing if used in a launcher, except creating the specified file with one line:
Quote
Found a running instance (using '/home/[...]/.config/gmusicbrowser/gmusicbrowser.fifo')
Naturally, there's no gmusicbrowser in process list, and ~/.config/gmusicbrowser/gmusicbrowser.fifo does not exist before or after the run.
For that matter, the parent process shown is init, not bash - it looks like gmusicbrowser relaunches itself, losing those redirections in process?
Strangely enough, the same line does work with sh instead of bash:o
« Last Edit: October 29, 2013, 18:01:48 by TBeholder »