Here is a part of my .fluxbox/startup
file
(a=($(grep "^1 " $HOME/Documents/4.n3u|awk '{print "/home/g" $2}'|sort -R|head -20)); \
xterm -e mpg123 -C ${a[@]} &>$HOME/Documents/mpg123.dat &)
As written, the redirection fails, all such output appearing in the xterm
instead. The man page for xterm
reads, in part,
-e program [ arguments ... ]
This option specifies the program (and its command line argu‐
ments) to be run in the xterm window. It also sets the window
title and icon name to be the basename of the program being
executed if neither -T nor -n are given on the command line.
This must be the last option on the command line.
mpg123
plays the content of array a as desired, and can be controlled through the keyboard as option -C
specifies, but xterm
seems to frustrate the redirect to file. Is that redirection possible in this context?
Alternatively, I can run it without the xterm
to contain mpg123
, in which case I get the redirect, but cannot control mpg123
thru the keyboard because it is running in some background subshell with no connections to the keyboard. Is there any way to establish that connection?