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

Make remote tech support as simple as possible Network
I help out a fair few people with computer problems, and there are times when long explanations over the phone of what is going on with the other person's computer can just get too tiresome. VNC is great, free, and fast (if a little limited compared to ARD or Timbuktu), and a sweet way of seeing and/or controlling the other party's screen. Trouble is, with most people behind a NAT router nowadays, getting the tech-challenged to configure a router to allow port forwarding from their side is not for the faint hearted or short tempered.

Even though there have been tales of screen sharing coming in Leopard with iChat, for those of us who need it now (and free), here is a method which you can use to automate the connection from the other person's computer, overcoming any and all router issues from their side (something iChat hasn't yet completely conquered yet), and making the connection a one-click process. Even better, as this solution uses an AppleScript, you will see that we can automate the whole process so that no user intervention is required, as long as the other computer has Mail running.

A somewhat related hint has been posted here before, but it required physical access to the machine you wished to control to complete the setup, or that too long talk-through of the router setup (assuming you even know what the router type is!)

Once you have completed this hint for one person, and thus have everything set up, the next person will be connected to you in around 30 seconds to a minute tops, from scratch, which is pretty good in my books. Once the zip file is expanded, all the user has to do is double-click a file. For today's cookery lesson, you will need:
  • A copy of the free Schnitz Remote Lite
  • The free Chicken of the VNC (CotVNC from here on)
  • Script Editor (for the juicy automation parts), found in /Applications » AppleScript
  • Working knowledge of your router, and how to effect port forwarding on it, or at the very least, temporarily put your computer in the DMZ.
Read on for the detailed instructions...

Step One:

Fire up Script Editor.app, and type the following into the editor:
tell application "Finder"
  activate application "Schnitz Remote Lite"
  tell application "System Events" to keystroke 
   "xxx.xxx.xxx" & tab & tab & return
end tell
where xxx.xxx.xxx is your IP address, or if you are really smart, your DynDNS address, if you are not on a static IP. (I'm not sure if 'Enable access for assistive devices' needs to be checked in the Universal Access preference pane of the System Preferences for the automagical work to be done. But at the very least, this should type the IP address in.)

Check that it works by running the script. I've noticed that sometimes it doesn't hit the Connect button first time round, but on second attempt should do so. Whether this is due to the Finder locating the app for the first time I'm not sure. I don't think it's a deal-breaker.

Save this as a little application bundle. Name it something that you're support candidates will understand, like Double click me - vnc, which will also then show up in a later Spotlight search, and leave it in the oven to rise.

Step Two:

Go to your router, and configure it to allow port forwarding on port 5500 to your local address. With the gazillion routers that are out there, this step is achieved differently for different devices, but you may find some help here. For those who also sensibly have the Apple firewall engaged (System Preferences » Sharing » Firewall), you will also need to create a new rule allowing traffic in on port 5500.

If you want the traffic to come in on a different port, you need to set that in the script and firewalls too, of course.

Step Three:

Create a new folder, and neatly place your script application bundle and Schnitz Remote Lite.app in it, then zip it up. This is your gift to your geek-loving friends in need of help.

Step Four:

Start up CotVNC and then go to Connection » Listen For Server, or just hit Command-L. Make sure 'Local host only' is unchecked, then click Start. Remember, this is still secure as although the firewall is open and ports open to you, you are merely waiting for an invitation from someone else to look at their screen. Not even the spottiest script kiddie would be so dumb to try to attack you by letting you see their screen.

Step Five:

Now, email the zipped file which contains the Schnitz Remote Lite app and the script bundle to your soon-to-be-admiring friend in need, or send it over in iChat, and ask them to open the attachment. Ask them to double click the script. The point in Step One about it not engaging the connect button first time round could still apply, of course. However, all the main work is done (the inputting of the 'Listening Station' address), and so if the Connect button does not engage automatically first time round, they have but to hit it. The script has never failed to work fully on double-clicking a second time, and thenceforth runs perfectly.

You should now be connected to their computer, and looking at the mess which is their desktop. If you have been explaining this on the phone, you will now hear about how freaked out they are that the cursor is moving around by itself, and how cool you are for being able to do this from the other side of the world/town/country. Make it a one-click event by putting the folder you sent them in the Applications Folder, and then dragging the script to the Dock.

Now, in the future, when they need your help, you have only to open the port in your firewall, and look at Step Four again, and there are no more headaches trying to explain that the desktop is actually a part of the computer operating system, and not what the computer is often sat on. I could bore you with such tales of woe. But the fun doesn't stop there, oh no!

Since you now have control of their computer, head on over to their Mail.app, and open up the preferences. In the Rules section way on the right, add a new rule. Mine looks like this:

if ALL of the following conditions are met:
1. From Contains [your e-mail address]
2. Subject Contains startvnc (or whatever you want, just make it memorable)

Perform the following actions:
Run Applescript. Then choose the AppleScript you created that is now living with the Schnitz app in the user's Applications Folder. Give the rule some wacky name like startvnc and click OK. Go back to the General section in the Mail preferences, and make sure Check for new mail is set to Every minute.

Now, when your friend calls you pleading for help, and you send your them an e-mail with the phrase startvnc in the subject line, within 60 seconds you will be connected to their computer. This is useful for me on one computer I oversee, as the router to which the computer is attached frequently resets the port forwarding rules, denying me access. This used to result in a 20 minute conversation to talk the friend into putting his computer into the DMZ on his router. Now I don't even need his involvement to access his screen.

If you want to make sure that Mail is running, go get Cronnix -- a terribly nice little GUI for the cron tool for those of us who like pretty pictures instead of text -- and set it up to launch Mail every day. Or twice a day. Or ... you get the picture.

You can check your new Mail trigger is working whilst attached via VNC (even if you have quit the Shnitz app -- it leaves the VNC server app running in the background if you do not click Disconnect), as all that will happen is yet another instance of their desktop will appear.

You could set up a folder action too, and use Chax to download a sent file through iChat, or even have Cronnix open the script if you want to check in on the computer on a regular basis. Or, once you have access, of course, you can set up a proper VNC server, with all the port forwarding sorted, so that you can access their computer at will. CoTVNC has a very good little address list for this.

Obviously the potential for abuse here is large, so the usual caution about respecting other people's privacy applies.

I've used the Schnitz app, as it is a lovely neat little wrapper for the VNC server that performs just one function, but in a way that doesn't reduce the infirm to tears. You could (and I do) use another VNC server to do the same thing. Vine Server is very nice. But for those who like as few things as possible to screw up, I don't think the Schnitz app can be beat. The script has to be slightly rewritten for Vine server, and it goes thus:
tell application "Finder"
  activate application "Vine Server"
  tell application "System Events" to keystroke 
   tab & tab & "xxx.xxx.xxx" & return
end tell
This really has ended all my woes trying to connect to others' screens. On PCs, I recommend people use RealVNC, which leaves a little icon in the system tray that the user can click on and enter the IP address, and then connect. I'm sure there is some way to script that on a PC, but the mere thought of it makes me feel like I need a shower.

Hope this is of help to any of you who need to occasionally control another's computer for tech support, or whatever, and have better things to do than go through the pain of instructing someone else to set up firewalls or configure programs. For me, it's just nice to be able to give something back for once to this great community, from whom I've gleaned so many hints and good advice in the past.
    •    
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[42,564 views]  

Make remote tech support as simple as possible | 24 comments | Create New Account
Click here to return to the 'Make remote tech support as simple as possible' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A better method to awake the OSXvnc server
Authored by: wallybear on Mar 07, '07 09:12:14AM

There is a more robust method using OSXVnc or VineServer: calling the OSXvnc-server executable inside of them.

That's the script snippet:

do shell script "'/Applications/Vine Server.app/Contents/MacOS/OSXvnc-server' -connectHost " & kyour_ip & " -connectPort " & kPort & " -rfbwait 5000 &> /dev/null"

or

do shell script "'/Applications/OSXvnc.app/Contents/MacOS/OSXvnc-server' -connectHost " & kyour_ip & " -connectPort " & kPort & " -rfbwait 5000 &> /dev/null"

assuming that Vine Server (or OSXvnc) resides in the Applications folder.
kyour_ip is the ip to be connected to (i.e. your), kPort the port to be used (must be the same you set in your CoVNC window).

I use it almost daily with my clients with no problems at all.



[ Reply to This | # ]
A better method to awake the OSXvnc server
Authored by: meikokun on Mar 07, '07 10:56:27AM

Whilst I still prefer my approach for an initial contact with a new VNC user (all the instructions it takes to start the connection is "double click the zip; in that folder double click the startvnc icon" with a maybe "click connect") I like your shell script for the e-mail option.
However, if I use it and start a vnc session, then stop that session, I am unable to start one again without going to the terminal (or activity monitor) and terminating the OSXvnc-server process. If I don't do this, on a second launch of the applescript containing the shell script, it just hangs (does the same if I run it from script editor). Short of manually terminating the process in activity monitor or terminal, which would of course leave those windows open on vnc disconnect, how do you enable a system for take over without more end user intervention?
For some reason using the GUI to restart the vnc session [either manually or with an applescript] with either Vine Server or OSX VNC -or indeed Schnitz remote- doesn't cause this problem, even if the process is not terminated as it would be by hitting the 'Disconnect'/'Stop Server' button or whatever.



[ Reply to This | # ]
A better method to awake the OSXvnc server
Authored by: wallybear on Mar 07, '07 11:48:20PM

In effect I did a GUI wrapper to this solution, and so all the user has to do is click the "connect" button of my application (there is a choice of ports too, just in case; moreover, it's scriptable).
I didn't make that GUI public because i'm not sure about OSXvnc server license.

I see that Schnitz Remote Lite wraps OSXvnc server in it, so now I can think there are no licensing problems. Perhaps I'll post it.



[ Reply to This | # ]
A better method to awake the OSXvnc server
Authored by: v8media on May 10, '07 03:16:18PM

So for this method how do you enter the ip and port? I've tried replacing kyour_ip and kport to no success. It looks like they are being treated as variables.

I want to try this as when I try the above method the connect button doesn't get pressed by the applescript. I'm trying variations here too, but so far no luck.

Thanks, Ian



[ Reply to This | # ]
Make remote tech support as simple as possible
Authored by: corvus on Mar 07, '07 10:43:43AM
If your goal is simplicity, take a look at http://www.copilot.com which now supports Macs. Anyone try it yet?

[ Reply to This | # ]
Make remote tech support as simple as possible
Authored by: rloomans on Mar 07, '07 05:34:50PM

I have tried copilot to control my parents' WinXP machine from my Mac. Worked perfectly, but I would prefer to buy a solution outright rather than each time....



[ Reply to This | # ]
Use One Bundle
Authored by: datawrangler on Mar 07, '07 11:51:43AM

Here's an interesting variation on Step Three above. Instead of zipping up the script application bundle and Schnitz app, simply move the Schnitz app into the script's bundle - i.e., place it in the Contents/MacOS/ folder. Now your friends don't need to unzip anything - they receive one item only: your script application bundle, which works as a standalone double-clickable solution.



[ Reply to This | # ]
AS SIMPLE AS POSSIBLE?
Authored by: chally on Mar 07, '07 04:37:14PM
Doesn't sound that simple to me. I simply downloaded SpyMe. It worked so well, I paid the miniscule fee the day I downloaded it, and I've used it several times. It avoids NAT problems by having my supported individual's computer CALL MINE. Presto.

http://www.readpixel.com/spyme/

[ Reply to This | # ]
AS SIMPLE AS POSSIBLE?
Authored by: johnsawyercjs on Feb 16, '08 02:32:53AM

I think meikokun's method also solves the NAT, etc. issues by having the supported individual's computer, call the tech support person's computer, rather than the usual reverse approach. The tech support person knows his own router's settings, and can get/control/use them better than the supported individual can with his router.



[ Reply to This | # ]
Make remote tech support as simple as possible
Authored by: chally on Mar 07, '07 04:38:30PM

I should have indicated--by miniscule I meant $15--for a 3-server license. Go get it, eh!



[ Reply to This | # ]
Make remote tech support as simple as possible
Authored by: inetws on Mar 07, '07 05:16:07PM
Zugma is easy, cheap ($10 / month). I played around with VNC solutions like this after getting fed up with Webex.com's exhorbitant rates but found its turnkey ease and low price a great combo.

[ Reply to This | # ]
Make remote tech support as simple as possible
Authored by: xgeek on Mar 08, '07 05:06:35AM

Very nice and straightforward approach. What I get concerned about however is the security. There are various descriptions available of how to make vnc work using SSH. That would however, provide additional complexity for the user needing help if he initiated the tunnel. Have you given automating setting up the SSH tunnel from his end any thought?



[ Reply to This | # ]
Make remote tech support as simple as possible
Authored by: meikokun on Mar 08, '07 09:04:45AM

xgeek - the previous article I alluded to at the beginning of the piece describes pretty much exactly what you want to do, I think. It is far more secure - but then I don't know what the chances of (VERY) occasional vnc traffic being intercepted over port 5500 for the duration of a session.
To be honest, this little technique was designed more for simplicity than anything else I really like the option of using a shell script to automate the data entry that wallybear advocates, but that too requires locating apps in specific places before a script can be executed, whereas once the 'hard' work of making the script with your info is done, the app can be placed anywhere on the disk. Since most stuff is downloaded to either the desktop or documents folder, it doesn't even require wasting time instructing someone to find the 'Applications' folder. I help out some serious newbies, and for every step I can miss out, the easier I sleep at night. 'download zip, double click zip, double click folder, double click 'click me!'' is as easy as I can get it. But I'm very open to new ideas to make it even simpler (whilst making it free is a bonus). I thought datawrangler was on to something, but when I tried that, it seems the script cannot find the application within the bundle which is a shame - one less icon to possibly click on means a greater chance of hitting the right one, as well as being able to cut out two of the double clicks. I'm going to try to work on that one more.

chally, whilst this way means the user has to double click a couple more times the first time around, there is no unlimited license of $95 with my method. I support more than 10 users, and that's how much it will cost me, or you, to do it with spyme. That said, I'm going to have a look at it again (last time was when the app was in its infancy, I think, and it was sloooooooow), and see what advantages it has over ARD for more complex tasks. Thanks for the heads up.



[ Reply to This | # ]
Make remote tech support as simple as possible
Authored by: wallybear on Mar 08, '07 02:52:03PM
to call the application in your bundle (assuming you put it in Content/Resources):

set kVNCserver to quoted form of POSIX path of (((path to me) & "Contents:Resources:OSXvnc-server") as string)
do shell script kVNCserver & " -connectHost " & kyour_ip & " -connectPort " & kPort & " -rfbwait 5000 &> /dev/null

Where, as previously said, kyour_ip is your IP address, and kPort the port to be used.

Doing so, you can put your app everywhere you like and your client has only to double-click it.

This is how my wrapper app looks like: http://www.jaw.it/img/rass.jpg
As said, I won't post it until I'm sure about vnc licensing.

[ Reply to This | # ]
Make remote tech support as simple as possible
Authored by: j-beda on Mar 09, '07 03:06:11PM
OSXvnc seems to be under the GPL, at least as listed at http://sourceforge.net/projects/osxvnc

I don't know if the GPL nature of OSXvnc requires one to release the code for any GUI wrapper for it.



[ Reply to This | # ]
Make remote tech support as simple as possible
Authored by: pgarrison on Mar 26, '07 10:59:39AM
I've tried this, and running the script never hits the Connect button for me. And, running the app again doesn't help. Running the app a third time causes the IP to overwrite the port number (because of tabbing to the wrong field. Any one know what's going on, and how to script the click of the Connect button more reliably? Happens on both my 10.4.8 and 10.4.9 systems.

[ Reply to This | # ]
Make remote tech support as simple as possible
Authored by: meikokun on Mar 28, '07 07:27:46PM

thanks to Phillip for pointing this out.
after much trial and error I found the cause of the problem. There seems to be a bug in the Schnitz wrapper for OSXvnc-server that only allows you to use system events to type 19 total characters in the address field. Sounds crazy I know, but it isn't a bug in applescript (as I first thought) since I was able to get the appropriate script to work in Vine Server just fine. It was just dumb luck that I used the particular DNS name that I did, as in conjunction with the .homedns.org bit that I use, it makes 19 characters. The full stops (periods) also count as a character, by the way.

Both of the following will work:

tell application "Finder"
activate application "Schnitz Remote Lite"
tell application "System Events" to keystroke "123456789.12345.org" & tab & tab & return
end tell


or


tell application "Finder"
activate application "Schnitz Remote Lite"
tell application "System Events" to keystroke "123456.123.12345678" & tab & tab & return
end tell

clearly the IP address option isn't going to work

This now leaves you with two options:
1) you use vine server, and the appropriate script. Vine server is great, and I use it on my machine, but I *really* like how simple the interface is for schnitz.
2) you get a DNS name that conforms to the 19 characters xxxxxxxx.dyndns.org, or xxxx.xxxxxxxxxx.xxx etc, etc.

sorry about this; who knew there would be a conflict between a very simple applescript and a wrapper for a small app, AND that I would happen upon the only combination that would work for it? Blessed or cursed, you decide ;)



[ Reply to This | # ]
Make remote tech support as simple as possible
Authored by: petieg on Apr 13, '07 07:14:22AM

Personally, i think having the end-user hit the Connect button is better because it gives them some sort of control. This way they'll see the button change to Disconnect and thus (maybe) put the idea of how this application works into their brain. Adding the Schnitz Remote app to the Script bundle just made my support capabilities that much easier -- thanks for that tip!!



[ Reply to This | # ]
Make remote tech support as simple as possible
Authored by: pgarrison on Mar 28, '07 10:37:57PM

It would be great if you can post this (depending of course on licensing issues) - would make providing remote support really easy. The Schnitz solution doesn't quite work.



[ Reply to This | # ]
The fix.
Authored by: jbobdobbs on Jun 25, '07 06:43:09PM
The Applescript works if you simply insert a pause before pressing return.

tell application "Finder"
	activate application "Schnitz Remote Lite"
	tell application "System Events" to keystroke 
		"xxx.xxx.xxx" & tab & tab
	delay 1<br>
	tell application "System Events" to keystroke 
		return
end tell
[code]


[ Reply to This | # ]
Whoops...let's try that again.
Authored by: jbobdobbs on Jun 25, '07 06:46:35PM
Sorry...some cruft crept into that post. Try this:

tell application "Finder"
	activate application "Schnitz Remote Lite"
	tell application "System Events" to keystroke 
		"xxx.xxx.xxx" & tab & tab
	delay 1
	tell application "System Events" to keystroke 
		return
end tell


[ Reply to This | # ]
10.5 bug
Authored by: macdavid on Dec 27, '07 12:11:13AM

With Mac OS 10.5, I experience a problem. The text (server address X.X.X.X) is not typed in because the schnitz remote window is not the frontmost window.

The same script works fine with 10.4.x Does anyone have a solution ? Maybe a line to add to the script to activate the front window.



[ Reply to This | # ]
10.5 bug
Authored by: jiclark on Jan 25, '08 04:17:13PM

I'll add my plea for help with this. Just did a quick test on a leopard machine, and the AScript fails. Don't know enough about it myself to try and fix it...

Anyone out there still watching this thread, and possibly able to figure it out??

Thanks!
John



[ Reply to This | # ]
Schnitz is not the active window problem
Authored by: ookymacdookles on Feb 15, '08 02:14:05AM

Graceful suggestion to save time on Tech Support, thank you, but I'm having trouble.
I have tried to implement this script in Leopard and it fails for the following reason: upon opening the Schnitz Remote Lite application, the Schnitz application window is not selected for input. No amount of tabbing allows the cursor to arrive at the input field. All I hear are system beeps from my keystrokes indicating an error. No IP address is entered into the input field, nor the clicking of the Connect button.
When I test this on my own machine if I manually click the Schnitz window it becomes active and the cursor is waiting in the input field. Tabbing is now possible. This is no good on the remote machine as I am not there to manually click on the window to make it active.
I am a beginner to Applescript - is there a command I can include in your script to make Schnitz active before the IP address and tabbing takes place?



[ Reply to This | # ]