Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Remote GUI login via Apple Remote Desktop' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Remote GUI login via Apple Remote Desktop
Authored by: cpbaldwin on Oct 14, '05 09:59:09AM

ah, figured it out! First, I have to include the path to the comand I want run. Second, there is problem sometimes with calling muliple commands, so I had to put the command in a string to get it to work.

#!/bin/bash

COMPUTERS=0
IPADDR="192.168.80."
STARTIP=2
COM1="/usr/bin/osascript -e 'tell application "System Events" to keystroke "USERNAME"';/usr/bin/osascript -e 'tell application "System Events" to keystroke tab';/usr/bin/osascript -e 'tell application "System Events" to delay 0.5';/usr/bin/osascript -e 'tell application "System Events" to keystroke "PASSWORD"';/usr/bin/osascript -e 'tell application "System Events" to keystroke return'"
i=0
clear

while [ $i -le "$COMPUTERS" ]
do

echo "Logging into..."$IPADDR$startip

ssh root@$IPADDR$STARTIP $COM1

i=$(($i+1)) #this is for the loop counter
startip=$(($startip+1)) #this sets the ip address

done

exit 0



[ Reply to This | # ]
Remote GUI login via Apple Remote Desktop
Authored by: cpbaldwin on Oct 14, '05 11:57:15AM

Oh, I forgot to change something for nukethis. the Variable COMPUTERS needs to be changed from 0 to 20 for the number of computers you have.



[ Reply to This | # ]