Script to run scheduled restart of VNC Server?

I have the VNC server turned on on my Mac G5 (Leopard), and can connect to it from my phone to make changes/email myself files I forgot, etc...

The connection seems to fail on a pretty regular basis, which makes the connection locked out. When I'm not at my computer, this is pretty frustrating. A restart of the VNC server on my mac seems to fix the problem, but I can't do that when I'm away. Is there any applescript that could schedule a restart of the VNC server (ie. go into system preferences, sharing, turn off VNC, turn back on VNC, close) daily? or even better, multiple times daily? That way, if my connection craps out, I only need to wait for the next time it gets restarted to log back in.

I'm no programmer, and have no idea how to write applescript, etc... I heard of SSH commands for restarting the server, but I want it automatically done at the server computer so I don't have to do it manually.

That being said, could it be the built-in VNC server on the mac that's causing the problem? will I get a more reliable server if I use a third-party app like Vine VNC server or RealVNC?

Thank you!
 

Giaguara

Chmod 760
Staff member
Mod
Hm... if you have a direct connection to it and remote login enabled, kickstart should be enough to restart the VNC services when needed.
Or combine with cron or other tools as needed.
 
Yes, I think I read about this. The only problem is what I need is something to happen without my influence, something that restarts the VNC automatically based on a schedule. It looks like this requires me to actively restart via command line connection?

Thank you for your quick reply!
 
Top