Need to have the process of command typically an update to be shown using yad and at the same time log all the output to a given log file set up.
This is what I have
apt-get update | yad --width=400 --height=300 \
--title="Updating debian package list ..." --progress \
--pulsate --text="Updating debian package list ..." \
--auto-kill --auto-close \
--percentage=10
The above command creates a pulsating indicator for the process and closes on finish but I need to have it log all the output it gives I have tried
apt-get update >>${logfile} 2>&1 | yad --width=400 --height=300 \
--title="Updating debian package list ..." --progress \
--pulsate --text="Updating debian package list ..." \
--auto-kill --auto-close \
--percentage=10
but that gives me an error and hangs from there on no dialog and no logging just freezing. Here is the error
GLib-CRITICAL **: g_source_remove: assertion `tag > 0' failed
Help appreciated
Best Answer
The error is because you are redirecting all output to
$logfile
so there is no output foryad
to process. The tool you're looking for istee
:So, you could do: