I want to view mplayer's normal terminal output, and also write it to a log.
That works fine when I run mplayer from the commandline, eg:
mplayer "$HOME/gdr01.wav" 2>&1 |tee $HOME/junk.log
However, I want to launch mplayer in it's own gnome-terminal window. Neither of the following commands write to the log, althought the terminal display works.
(gnome-terminal -e "mplayer $HOME/gdr01.wav 2>&1 |tee $HOME/junk.log" &) gnome-terminal -e "mplayer $HOME/gdr01.wav 2>&1 |tee $HOME/junk.log" &
What is at play here, and what is the trick to get it to work?
EDIT: The problem is that I get the terminal's mesages being written to the log (eg. an
ibus warning). However, although mplayer generates thousands of lines, none are written to the log.