1

I'm having trouble with desktop sharing crashing while during remote sessions. Is there a way to set cron to check and restart, if necessary, the desktop sharing application with a bash script?

1 Answer 1

1

Script:

#!/bin/bash
if [ "`pgrep vino-server`" = "" ]; then
   DISPLAY=:0.0 /usr/lib/vino/vino-server --sm-client-disable >/dev/null 2>&1 &
fi

Don't forget to give it execute permission: chmod +x /path/to/script. Then run crontab -e and add this line:

* * * * * /path/to/script
1
  • Thank You! This really helped. Otherwise, I'd have to ssh in and restart it manually..
    – JClar
    Jun 29, 2013 at 2:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .