Archives for June2011

Sharing a Mac screen via Live Meeting

For those of you using a Mac in a largely Windows-based company, you may have times where you need to present content on your Mac from a PC running Live Meeting.

One fairly simple way to achieve this is by enabling Screen Sharing via System Preferences:

Once Screen Sharing is enabled, you can run UltraVNC on your PC to connect to your Mac using the URL shown in the Screen Sharing window.

Now in Live Meeting, share your Desktop (or just share the UltraVNC window).

Note: it is also possible to do this from inside a virtual machine on your Mac using VMWare Fusion or Parallels. However, the Mac Screen Sharing feature will share all of your screens, including the one where VMWare is running, meaning once you get VNC running in your virtual machine, you will want to use Cmd-H to immediately hide the virtual machine or get an infinitely recursing window tunnel!

Alternatively, Simon Guest informs me that RealVNC Server for the Mac will let you specify which monitor is shared. You would want to use RealVNC Server in place of Mac Screen Sharing if you are going to try it this way. (You’ll get errors trying to use both on the same Mac as they would both be trying to use the same ports.

If you are doing this using a separate PC talking to your Mac, don’t forget you are simply sharing your Mac screen, so the Mac keyboard and mouse can be used to control the action, making it more responsive than trying to use the PC keyboard and mouse via VNC.

You can download UltraVNC here: http://www.ultravnc.com/

Location-aware mobile web testing in iOS5

One cool addition to Xcode 4.2 with iOS5 is the ability to test your location-aware application directly from inside Xcode through the same Edit Scheme screen you use to set up Environment Variables and command line arguments.

One current limitation is you can’t directly leverage this to test your mobile web sites, although the Simulator does provide some boilerplate locations built in.

A workaround is to create a small Universal iOS app in Xcode, and tell it to load your mobile web site’s URL during applicationDidFinishLaunching.

- (BOOL)application:(UIApplication *)application
        didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    NSURL* url = [NSURL URLWithString:@"http://www.google.com/"];
    [application openURL:url];
 
    exit(0); // remove this to keep the debugger running!
 
    return YES;
}

I can now use Edit Scheme to set my location, or create multiple schemes each for a different location. When I run this application, the GPS will be initialized with my prescribed location, then Safari will be invoked to open the URL I provided.

(Notice how in the second image Google is providing the “See Places Near” using the London location I provided).

By removing the exit(0) statement, it should even be possible to leverage the GPS automation capabilities provided by the new version of Instruments to automate the location over time and have Safari pick that up, though I haven’t had time to test this.