To remotely enable or disable screen sharing in 10.5 execute the following commands on the desired computer from within /Library/Preferences
/Library/Preferences
to enable: echo -n enabled > com.apple.ScreenSharing.launchd
echo -n enabled > com.apple.ScreenSharing.launchd
to disable: rm com.apple.ScreenSharing.launchd
rm com.apple.ScreenSharing.launchd