I've tried using ps -ef as suggested to find if rdesktop is running...but then I happened upon the following script which is working for me:
# Check if rdesktop is running
if pgrep rdesktop > /dev/null
rdesktop 192.168.100.100 -u Administrator
I've made my script executable and the the script will startup my rdesktop session when I double click on the script.
What I'd like to do now is run this script from a cron job every 10 minutes or so and have my rdesktop session reconnected. From my user command (not root) I've used crontab -e to add the following:
*/10 * * * * cd ~/scripts && check.sh>>~/scripts/check.log
But my script is not executing. Any ideas what I've done wrong?