I'm writing a simple desktop initiation script which waits for disk idle, and then launches next external program (like Firefox, Skype or conky) using &
, like:
ps cax | grep conky > /dev/null
if [ $? -eq 0 ]; then
echo "Conky is already running."
else
wait-for-disk-idle sda
conky &
fi
That's easy.
The problem is that some programs spew a lot of debug output to the terminal, which gets mixed with the messages produced by my initialization script.
The question: Is there any way to asynchronously launch an external program so that its standard output is discarded?
What I already tried:
conky & >/dev/null 2>/dev/null
bash -c conky &
The correct answer:
bash -c "conky >/dev/null 2>/dev/null &"
systemd
andupstart
supplanting the traditionally serial sysV). However, reducing the speed/efficiency of initialization this way will give you the "bonus of better overall responsiveness of the system at that time", which is why I asked at first (sincerely), "If this isn't intentionally" so. If you appreciate the net effect, go with it!