Back to My Mac through iChat
Posted on Tuesday, November 6th, 2007 at 12:07 pm under Tutorials.Tags: leopard mac ichat

One of the new features of Mac OS 10.5, a.k.a. Leopard, is .Mac’s Back to My Mac, a way to connect to your computer at home remotely. Back to My Mac allows a user log into another Mac remotely via internet. This is a great feature but it is only available if you are a .Mac subscriber. However, the new iChat supports Screen Sharing, so the only thing to figure out is how to auto-accept a Screen Share invitation and how to do it securely. This quick tutorial will show you how set up iChat to do just that.
Requirements:
This set up requires that both computers run Leopard. If you don’t have it yet, here’s the Amazon link to buy it. It is well worth the price. You also need two separate iChat supported IM accounts, one for each computer. This could be AIM, .Mac or Jabber accounts.
Step 1: Limit Users
It is very important this step is not skipped. Not limiting the users will open up to anyone taking over your computer.
From your Mac at home, launch iChat and from the top menu select iChat > Preferences and from the Accounts tab select your account from the Accounts list on the left panel.
From the Security tab, select Allow Specific People and add the username of the ichat account you would like to allow to auto-connect.
Step 2: Set Up Auto Accept Screen Sharing
From the Alerts tab in the ‘iChat > Preferences’, select Audio Invitation from the Event pull down menu. Then check-mark Run AppleScript and select Auto Accept.applescript from the pulldown menu. You can close the Preferences window now.
Now, we’ll need to edit the Auto Accept script we selected in the previous step. Click on the desktop to go to the Finder and from a new Finder window, navigate to ‘Your Hard Disk/Library/Scripts/iChat/’. This is the folder that contains the iChat AppleScripts provided by Apple in Leopard. Double click the file Auto Accept.applescript to open in AppleScript Utility.
A Screen Sharing invitation is sent to iChat as an Audio chat with a Screen Sharing flag. We will need to locate the audio invitation section and comment out the screen sharing if statement by enclosing the lines with (* and *). See example bellow. Additions are marked in red.
on received audio invitation theText from theBuddy for theChat
(* if (screen sharing of theChat is none) then *)
accept theChat
(* end if *)
end received audio invitation
Save the document and quit AppleScript Utility.
Step 3: Set Home Computer To Stay Awake
Next, we need to set the home computer to stay stay awake, otherwise it will automatically go to sleep when not in use. From the top menu bar, select ‘Apple > System Preferences’ and click on the Energy Saver Preference Pane. From the Sleep tab, set the Computer sleep mode to never and check-mark the Put the hard disk to sleep option then quit System Preferences.
Step 4: Connect Remotely
Now we’re going to connect to our home Mac. From the other computer, add the username to the buddy list, select it and click the ‘Start Screen Sharing’ button on the bottom right of the buddy list window.
From the ‘Start Screen Sharing’ pull down menu, select ‘Ask to Share Username’s Screen…’ to begin the process.
iChat will ask permission on the Home account, but it will be automatically approved by our script there.
iChat will do it’s magic and your screen will shrink down to the corner as the remote Mac at home will go full screen.
Conclusion
I thought ‘Back to My Mac’ was going to be the .Mac feature that will make me renew my .Mac subscription, but the new iChat has proven more capable than the demo Steve made in his keynote.














Nov 6th, 2007 at 3:58 pm
This post has enlightened me to wonder if there is a good way for me to share my iTunes at home with my iTunes at work (because it is too big for an iPod and most portable drives don’t allow for syncing with ratings, playlists, etc). If anyone has found a good working solution, let me know.
Nov 6th, 2007 at 11:39 pm
Jessica, look into this:
http://www.simplifymedia.com/
Nov 7th, 2007 at 1:54 pm
Great idea — way to hook everything together. Note that you can login to more than one AIM account now with iChat, so you can create a custom AIM account just for this purpose.
Nov 7th, 2007 at 2:04 pm
Or you could hardcode the AIM user you want to accept from in your script.
Nov 7th, 2007 at 2:24 pm
This is a great solution, I knew there’d be something useful I’d get out of the “Run AppleScript” feature in iChat. I was going to sign up for .mac for this feature alone.
And yes, Jessica, try Simplify Media. I’ve been using it for the past few days and it is the perfect solution for sharing one iTunes library.
Nov 7th, 2007 at 2:41 pm
Hey, thanks a lot for this. Very cool, can’t wait to access my computer at home from work, and vice versa.
Thank you again for sharing this.
Nov 7th, 2007 at 6:34 pm
[...] is concerned, Apple presents it as a .Mac-only enhancement. Melvin Rivera pointed us to his blog post showing how to use Back to My Mac with iChat. This technique isn’t for the faint of heart. It [...]
Nov 7th, 2007 at 6:41 pm
Dont waste your money on .mac for back to my mac feature, I have never been able to get it to work and apple has been no help at all. This solution is just amazing!!! You have to leave your computer on for back to my to work anyway!
One question now, I will use my laptop with my G5 at home that has 2 screens, how can I get it to only show one on my laptop?
Nov 7th, 2007 at 7:07 pm
Cool I am going to try the simplify media. Thanks much, so far looks like a great solution!
Nov 7th, 2007 at 8:13 pm
You could easily modify the auto-accept applescript to only look for your iChat ID and accept the screenshare. That way you wouldn’t have to change your iChat preferences and it would only work for you.
Nov 7th, 2007 at 11:29 pm
GENIUS. Thank you for the easy-to-read tip! =)
Nov 8th, 2007 at 12:27 am
Hi,
I use Logmein (www.logmein.com). This allows secure screen sharing from Mac to Win to Mac. I have two Macs at home and access them via the internet from my business Vista.
Works well and is free - sure there is a version with support and some advanced file transfer features which costs money.
And because of this mix in wolds I use Skype for conferencing…
Regards
Horst
Nov 8th, 2007 at 12:37 am
I tried editing the script exactly as in the example above, but when I enable it and log in, I get an Applescript error -1708
Nov 8th, 2007 at 1:13 am
This is just truly awesome.
No need for Apple Remote Desktop!
Nov 8th, 2007 at 1:34 am
Security? As far as I know the AIM password is NOT encrypted, so EVERYone in your network can spoof your AIM password (its clear text, and all the tools to spoof a network are widely available and easy enough for an 11 year old to use) and then connect to your mac at home and have total and full admin/interface/root control. I do not think this is the brightest idea.
Nov 8th, 2007 at 1:52 am
Can you stream someone’s itunes through screen sharing?
Nov 8th, 2007 at 2:21 am
I have this nagging feeling that Macs are about to become targets for crackers and that the “sage” image will be lost forever. iChat is set to become a backdoor. Too bad.
Nov 8th, 2007 at 3:12 am
An easier method that also allows you to control of your Mac from a PC as well as other Macs is LogMeIn - there is a free version which works very well.
http://www.logmein.com
Nov 8th, 2007 at 4:42 am
Funny but what’s the benefit of this way (or logmein.com) instead of simply using VNC?
Nov 8th, 2007 at 5:22 am
[...] Source: allforces [...]
Nov 8th, 2007 at 5:39 am
Regarding the security question posed by fALk: I would suggest using Google Talk accounts instead of AIM - Google Talk accounts are secured using SSL.
Nov 8th, 2007 at 7:40 am
HI and thanks for your tip!
Q: When the instructions say to click on iChat PREFERENCES > ACCOUNTS tab > Security tab > and then click on the “Allow specific people”, doesn’t that limit the Buddies who can contact me to *only* me at my other Away-from-Home-Mac?
I want to make sure that I can still use my iChat regularly when I am at home — or even away on another Mac, and let all my Buddies contact me, though not for auto sharing of my Mac
Please advise.
Thanks!
- DG
Nov 8th, 2007 at 8:24 am
[...] I have been really looking forward to the new OSX 10.5 Leopard update. The new iChat features like screen-sharing make it all very compelling. Here’s a link to a tutorial to help us all learn how to re-connect to our mac when were away from home. Back to My Mac through iChat: [...]
Nov 8th, 2007 at 8:26 am
[...] AllForces have come up with a great tutorial - involving a little bit of AppleScript and tweaking - that gives you this for free. I can’t say if it works well or not because I haven’t got leopard, but give it a go, it seems like a bit “Stuff you!” to .mac. [...]
Nov 8th, 2007 at 10:36 am
DG, As stated above, you should use two different accounts. One specifically for the home computer. You can always enable/disable the second account when u are home.
Nov 8th, 2007 at 12:19 pm
This is great solution. Apple’s official Back-To-My-Mac support is not there. Never could get it to work.
For those of you who ask, VNC will only work for single Mac networks. If you have more than 1 mac behind a router, your are out of luck. Same with Apple Remote Desktop. Also, you can sign up for free .Mac account (for iChat only, no email, online services etc..), so no need for AIM accounts for this feature.
Nov 8th, 2007 at 12:27 pm
this is a great idea! Does anyone know if you can get files from the shared computer OR is it only screen sharing?
Nov 8th, 2007 at 8:20 pm
[...] İşte kimisi böyle güvenlik açığına vurgu yapıyor, kimisi de (bayi siteleri) .Mac hesabı olmadan bu özelliğin nasıl [...]
Nov 8th, 2007 at 11:11 pm
Roadwarrior
VNC can listen on any port you like.
You can map any port on your router to any port on any machine behind the router. So What is the problem???
Nov 9th, 2007 at 5:01 am
[...] Back to My Mac through iChat “Back to My Mac allows a user log into another Mac remotely via internet. This is a great feature but it is only available if you are a .Mac subscriber… This quick tutorial will show you how set up iChat to do just that.” [...]
Nov 9th, 2007 at 8:23 am
[...] Back to My Mac through iChat » All Forces One of the new features of Mac OS 10.5, a.k.a. Leopard, is .Mac’s Back to My Mac, a way to connect to your computer at home remotely. Back to My Mac allows a user log into another Mac remotely via internet. (tags: remote vnc desktopsharing) Share and Enjoy:These icons link to social bookmarking sites where readers can share and discover new web pages. [...]
Nov 9th, 2007 at 4:45 pm
[...] Back to My Mac through iChat » All Forces - One of the new features of Mac OS 10.5, a.k.a. Leopard, is .Mac?s Back to My Mac, a way to connect to your computer at home remotely. Back to My Mac allows a user log into another Mac remotely via internet. [...]
Nov 9th, 2007 at 7:30 pm
[...] Back to My Mac through iChat » All Forces - One of the new features of Mac OS 10.5, a.k.a. Leopard, is .Mac?s Back to My Mac, a way to connect to your computer at home remotely. Back to My Mac allows a user log into another Mac remotely via internet. [...]
Nov 11th, 2007 at 2:35 am
Awesome! Thanks for this, I was about to create a cron job to update me with the IP of my home machine, but this is taking it to the next level! Really appreciate you sharing :)
Nov 11th, 2007 at 3:22 am
I had to save a copy of the applescript to another location to edit it and for it to see the changes. Not sure if this will help anyone else.
Nov 13th, 2007 at 9:07 am
Hmm, I guess you can’t test this out locally as it is auto refusing my video invites. My work’s network doesn’t allow AIM either so unless I can reconfigure it slightly to work with an additonal ghat account I’m SOL on this method.
Nov 14th, 2007 at 7:47 am
[...] This one I’ve blogged about before. Currently OS X Leopard only, but I’m working to find a way around it. Free and simple VNC back home. http://allforces.com/2007/11/06/back-to-my-mac-through-ichat/ [...]
Nov 15th, 2007 at 9:34 am
BRILLIANT! Just the ticket for us AIM users. Many, many thanks.
Nov 15th, 2007 at 12:21 pm
I know it might be a little early to tell if this would work with Leopard 10.5.1? But could you let us know please if it is….Thanks!!
Nov 15th, 2007 at 9:34 pm
Can’t use Google Talk accounts with this method because they do not support the Security/Privacy settings that let you allow only specific buddies to contact your new IM account. (I just tried this). You have to use an AIM or a mac.com IM account.
Nov 15th, 2007 at 9:37 pm
Oh, one more thing…. ;-) The mac.com IM accounts do use SSL for login (the AIM accounts do not), so if you’re worried about password sniffing on public networks, the mac.com accounts are safe.
Nov 17th, 2007 at 1:37 pm
[...] Full details on how to do this located at Melvin Rivera’s blog [...]
Nov 18th, 2007 at 10:07 am
Nice work on the Back to My Mac Work around. I have had success using the built in VNC feature on a local network. It is awesome to see how simple and easy it is to manage within a network using the built in VNC service and Screen Sharing. However I think this will be awesome for those who want to take it to the next level when away from home and need the Back to my Mac feature.
Nov 24th, 2007 at 7:50 am
[...] Back to My Mac through iChat » All Forces - One of the new features of Mac OS 10.5, a.k.a. Leopard, is .Mac?s Back to My Mac, a way to connect to your computer at home remotely. Back to My Mac allows a user log into another Mac remotely via internet. [...]
Nov 24th, 2007 at 3:52 pm
Don’t I have to pay for .mac to use ichat? If there is an alternative way to use ichat other than paying for a .mac account, please let me know.
Nov 25th, 2007 at 4:35 pm
[...] Back to My Mac through iChat » All Forces - One of the new features of Mac OS 10.5, a.k.a. Leopard, is .Mac?s Back to My Mac, a way to connect to your computer at home remotely. Back to My Mac allows a user log into another Mac remotely via internet. [...]
Dec 9th, 2007 at 9:33 am
Help, this is an awesome idea but I am confused by the implementation. The instructions make it look like you are using the same .Mac account on both ends of the chat… one on the home computer and one on the remote. How can you chat with yourself? Following your instruction, I went to the remote computer and I tried adding my own .Mac account to my buddy list and nothing happened. Am I supposed to be using two separate IM accounts or what?
Dec 9th, 2007 at 10:45 am
Ok, I got this to work by using two accounts: my .Mac handle (argonaut) and my AIM handle (jyk1972). I set up argonaut to only allow connections with jyk1972. Then I left both running on the home computer.
From the remote computer, I logged in as jyk1972 and successfully initiated an automatic Screen Sharing session with argonaut. Wonderful!
But then I used the remote to log in as argonaut and requested Screen Sharing with jyk1972. This is the AIM account that has no restricted access list. I did not want this account to auto-accept requests… but it did!
When I looked at the Preferences pane, I realized that the Alerts tab applies to ALL IM accounts, not specific ones. This is a huge problem when using auto-accept screen sharing.
To work around it, I would have to log out of my public AIM account every time I stepped away from the computer. This doesn’t seem feasible.
Is there a solution to this that I’m overlooking?
Jason
Dec 27th, 2007 at 6:08 am
“However, the new iChat supports Screen Sharing, so the only thing to figure out is how to auto-accept a Screen Share invitation and how to do it securely. ”
Chax can be used to do this. And you can set it up to only auto allow via certain users (i.e. yourself)…
http://www.ksuther.com/chax/
Jan 2nd, 2008 at 2:43 pm
Is there a way to use this auto accept sript and be able to use your remote computer to wake your server computer from sleep to then screen share with it?
Jan 17th, 2008 at 6:22 pm
[...] but you don’t have a free simple gui to control applications on the other machine.. So… try this from Melvin Rivera.. and now you have the best gui ever.. the other desktop be it mac or pc without the associated [...]
Jan 22nd, 2008 at 4:17 pm
Great! Thanks for the help on getting this to work… I’d seen it work in the store where I bought my new iMac, but couldn’t figure out how to remotely log in… I’m going away this weekend and taking my Powerbook, but without the iMac at home automatically receiving the screen share I was stuffed! LoL
Thanks!
Jan 29th, 2008 at 8:16 am
help I can’t get it to work.
How do I rename it “BAck to mac.” Is that an important step.
It also tells me that I have been logged on to to places and asks me to get off.
What is going on?
Feb 16th, 2008 at 6:32 pm
Long story short. My parents are old and need computer help often. I’m leaving the country next week for a few years. My dad has dial-up. I will have DSL where I’m going. We both have Leopard. Can I use Back to my Mac to help him since he has dial - up?
Thanks for help.
Feb 17th, 2008 at 6:14 pm
@Randon: No, once a computer sleeps, the processor itself stops, and it can only be awoken by keyboard or mouse events, which are hardware-level.
Feb 18th, 2008 at 10:06 am
for those of you having the problem that any user is auto-accepted, modify the same Auto Accept applescript to the following, replacing YOUR_NAME_HERE with the IM name you want to be auto-accepted:
using terms from application “iChat”
on received text invitation theText from theBuddy for theChat
accept theChat
end received text invitation
on received audio invitation theText from theBuddy for theChat
if (the handle of theBuddy is “YOUR_NAME_HERE”) then
accept theChat
end if
end received audio invitation
on received video invitation theText from theBuddy for theChat
if (screen sharing of theChat is none) then
accept theChat
end if
end received video invitation
on received file transfer invitation theFileTransfer
accept theFileTransfer
end received file transfer invitation
end using terms from
Feb 23rd, 2008 at 1:46 am
Great suggestion on editing the applescript. I hadn’t even noticed it was there. If I can make an improvement on the process though-
duplicate the applescript renaming it autoaccept w-screenshare
and remove the if logic loops regarding screensharing
using terms from application “iChat”
on received text invitation theText from theBuddy for theChat
accept theChat
end received text invitation
on received audio invitation theText from theBuddy for theChat
accept theChat
end received audio invitation
on received video invitation theText from theBuddy for theChat
accept theChat
end received video invitation
on received file transfer invitation theFileTransfer
accept theFileTransfer
end received file transfer invitation
end using terms from
-this should auto accept text, audio, video, and file transfers whether or not they have screen sharing requests attached to them.
Then I would enable this script by specific user by using ’show info’ about a particular buddy in your buddy list and under ‘events’ select audio and/or video request and use the apple script option (autoaccept w-screenshare) that we just created.
Use selectively for very trusted people only.
Instead of enabling this globally for all users as would be done by enabling it via iChat preferences and restricting users that can access this account.
Hope this helps, I’ve had no luck with ‘back to my mac’ either
Apr 23rd, 2008 at 2:26 am
OK! What am I doing wrong?
I’m totally hip with y’alls success, and I can’t wait to get this working since I have to frequently remote access one of my IT client’s Macs.
I think I’ve followed all the script changes properly. I’m running iChat on an iMac and a MBP (both current Leopard and up to date).
This is the error message I keep getting: Failed to start Screen Shared because: Screen sharing could not be established.
Help, please.
Apr 23rd, 2008 at 2:32 pm
Great idea, I really love this. I too thought about signing up for .Mac for this feature alone.
However, when I try to connect I get a connection timed out error. This maybe due to I need to forward some ports on my router or the fact that I’m on my college’s network.
May 2nd, 2008 at 3:55 pm
With all the talk here about setting up a google talk account because of it’s better security levels (SSL), there does not appear to be a way to limit auto accepting screen sharing for gmail/jabber accounts like you can in AIM account preferences. Thus it appears to me that if you set this up as described above for a google chat account and have modified your autoaccept script, there is nothing limiting ANYONE form controlling your mac.
Could anyone explain for the rest of us if I am wrong here and how? Thanks!
May 3rd, 2008 at 10:04 am
So has anyone been able to solve the problem of the common script error that pops up with this concept? No matter which versions of the autoaccept script I try, I still get errors that require disabling the script.
Any solutions or explanations would be appreciated.
Thanks!
May 22nd, 2008 at 1:08 am
[...] still didnt work. i also tried restarting the process netauth, no joy! i also tried the ichat trick http://allforces.com/2007/11/06/back…through-ichat/ but that doesnt work [...]
Jun 4th, 2008 at 5:11 am
Has anyone who has updated to 10.5.3 begun getting connection errors when you try and connect from another computer now? Is this just coincidence that this begun for me right after i updated or are others dealing with this too?
Jun 24th, 2008 at 10:08 am
Mine still works after upgrading to 10.5.3.
I too had the good fortune of finding out that if my boy had his account up and I tried to contact home, whatever I initiated, chat, video, or screen sharing, it automatically accepted. I read the above posts and did what eteela suggested:
I disabled the auto run script in general alerts
“Then I would enable this script by specific user by using ’show info’ about a particular buddy in your buddy list and under ‘events’” (I used the Alerts tab) “select audio and/or video request and use the apple script option”. I am using the original script.
Now the only one who can automatically start screen sharing is my work account.
Jun 27th, 2008 at 1:07 pm
In this process, do you set up your own .Mac account on the computer you want to view? If yes, then do you connect via ichat using the same account?