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

Click here to return to the 'Reverse Screen Sharing Grabber' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Reverse Screen Sharing Grabber
Authored by: aechadwick on Dec 04, '10 08:03:47AM
Asmus Vierck introduced the idea of using Keychain, an excellent point!

I made a new Keychain Item on Dr Cube named "ScreenSharingGrabber" (don't be mean, I just like to keep things simple)

then on Dr Cube, here is the most up-to-date version of the Applescript (v.3 at this point!)

tell application "Keychain Scripting"
	tell keychain 1
		set theKey to first key whose name is "ScreenSharingGrabber"
		set theUsername to (account of theKey) as string
		set thePassword to (password of theKey) as string
	end tell
end tell

if application "Screen Sharing" is running then
	do shell script "ps ax | grep " & (quoted form of "Screen Sharing") & " | grep -v grep | awk '{print $1}' | xargs kill -9"
	tell application "Screen Sharing" to open location "vnc://" & theUsername & ":" & thePassword & "@W89100AK7AP.local"
end if
saved as ""

I have been trying to keep this to free & built-in components. (I actually tried Remote Desktop via one of the work machines, but I could not automate "fullscreen," it always appeared as a window—the window had a "make fullscreen" button, but I could not find a term in Remote Desktop's AppleScript dictionary.)

My other goal is one-click operation—that's why the use of ApplecScript to make all the system calls. If operation isn't instant and foolproof, the effect is lost—and then I'm surrounded by people staring over my shoulder—only now they're slightly frustrated, because I failed at being clever!

[ Reply to This | # ]