"Just let the spinning wheel spin,
and let your life begin!" - Arch Enemy
*/5 * * * * /usr/bin/who | /bin/grep -E "dave *tty1" 2>&1 > /dev/null && /usr/bin/xfdesktop --display=:0 --reload 2>&1 > /dev/null
If I'm logged in, I get a tty. The grep -E matches what comes back from the who command. If the grep fails, I'm not logged in and the result is "false" so the && short circuits and fails without executing the right side of the &&. If I'm logged in, the grep succeeds and the right side of the && has to be evaluated.