This also works on OS X, but there's a couple of wrinkles to be aware of:

1. The command line will not work unless you have started the X11 application first.
2. control+click doesn't bring up the context menu - use a mouse with two buttons or two fingers on the trackpad!