Difference between revisions of "ARDOverSshForwardScriptExample"

From Wurst-Wasser.net
Jump to: navigation, search
Line 11: Line 11:
 
:open <nowiki>/Applications/Remote\ Desktop.app</nowiki> &
 
:open <nowiki>/Applications/Remote\ Desktop.app</nowiki> &
 
:sleep 10
 
:sleep 10
:kill -1 `ps -wwaux | grep <nowiki>ARDAgent.app</nowiki> | grep -v grep | awk '{printf $2}'`
+
:kill -1 `ps -wwwaux | grep <nowiki>ARDAgent.app</nowiki> | grep -v grep | awk '{printf $2}'`
:kill -1 `ps -wwaux | grep <nowiki>AppleVNCServer.bundle</nowiki> | grep -v grep | awk '{printf $2}'`
+
:kill -1 `ps -wwwaux | grep <nowiki>AppleVNCServer.bundle</nowiki> | grep -v grep | awk '{printf $2}'`
 
:sleep 2
 
:sleep 2
 
:ssh -L 3283:remotehostethernetip:3283 -L 5900:remotehostethernetip:5900 user@remotehost
 
:ssh -L 3283:remotehostethernetip:3283 -L 5900:remotehostethernetip:5900 user@remotehost
 
</tt>
 
</tt>

Revision as of 20:42, 19 October 2005

#!/bin/tcsh
#
# Filename: doardforward.command
# Author: Heiko, as usual.
# History:
#2005-10-10, 09:21: ARD forward!
#
open /Applications/Remote\ Desktop.app &
sleep 10
kill -1 `ps -wwwaux | grep ARDAgent.app | grep -v grep | awk '{printf $2}'`
kill -1 `ps -wwwaux | grep AppleVNCServer.bundle | grep -v grep | awk '{printf $2}'`
sleep 2
ssh -L 3283:remotehostethernetip:3283 -L 5900:remotehostethernetip:5900 user@remotehost