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.logHowever, 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.    
No output to log from tee when starting mplayer as an arg to gnome-terminal
io redirection;mplayer;gnome terminal
What's going on is that gnome-terminal's command line parsing is funky. You're running mplayer with  /home/ferer/gdr01.wav, 2>&1, |tee and /home/ferer/junk.log as arguments. If you wait for the end of the audio file, you'll see error messages about these nonexistent files for a microsecond before the terminal closes.Either figure out gnome-terminal's intricate rule. Or, what I recommend: yse the -x option instead of -e and invoke a shell explicitly.gnome-terminal -x sh -c 'mplayer $HOME/gdr01.wav 2>&1 |tee $HOME/junk.log'