Screen sharing with Leopard
It was a beautiful day outside so I decided to grab the MacBook Pro and enjoy the delightful weather out on our screened in porch. I had some online reading to do as I am trying to get a handle on Git, the version control system I am going to be using.
While sitting here enjoying the breeze and working through the Git documentation I remembered that I had left Adium running on the Mac Pro downstairs. Many of my friends contact me through AIM and I usually put up an away message if I'm gone for a while. But I just sat down and got comfortable - getting up seemed like a lot of work to me. I decided that now was the perfect time to try out Leopard's Screen Sharing capability.
For some reason Apple decided to bury Screen Sharing down in the following location:
I navigated to that in Finder and then dragged it into my Dock to get easier access to it. Once I had that fired up I simply entered the name of my Mac Pro into the Host window and pressed Connect. I was immediately rewarded with my entire Mac Pro's screen, miniaturized and scaled to fit on my MacBook Pro:
Even my dual monitors were represented. I tried playing around a bit and found it to be quite responsive. I had the option of either viewing the screen in scaled mode or by scrolling it. I found the scaling worked better for what I needed to do. Granted, the menu bar was extremely tiny but I could make out the little Adium icon and quickly set my status to away.
One machine to rule them all
Having accomplished this little mission I thought to myself: I wonder if I can gain access to my Ubuntu machine from the comfort of my screened in porch too? It physically sits right next to the Mac Pro and resides on the same network. I use SSH all the time to remotely connect and run tasks but I had never tried accessing my Ubuntu machine using a remote screen sharing application.
Apple's Screen Sharing program is based on VNC, which I knew was available for Ubuntu. With this little hacking challenge on the table I decided to dig in. First I ran SSH and connected to my Ubuntu machine. Next I followed LifeHacker's nice little four step instructions for getting VNC up and running on Ubuntu—something that could be handled through my SSH connection.
Within a couple of minutes I had my Ubuntu machine ready to be accessed. I fired up Screen Sharing again and entered in the name of my Ubuntu workstation. I got a couple of warning dialogs but within a few seconds I was rewarded with my Ubuntu screen up and running on my MacBook Pro:
The performance of the connection was terrible compared to the performance I got from the Mac Pro, though it was functional. I didn't tweak it at all; I just did it because I could, so I'm sure there is room for optimization.
I don't know why but there is something tremendously satisfying about remotely controlling a machine, especially one you didn't have the ability to control when you sat down. With my little remote adventure out of the way and this blog entry written up I better get back to that Git documentation.
It's not reading itself.
The first time I used remote control was actually way back in the DOS days. PC Anywhere was amazing and opened an entirely new perspective on remotely controlling a machine in the years prior to the Internet's popularity. You would set up your machine with a modem and "dial in" to it, then gain control of that wonderful 80x25 window of textly goodness. From that point on I was hooked.
@Lee: Cool, I didn't realize you could access it from there as well. I also found a MacWorld article that has some terminal commands that make it easy to access machines by simply selecting them from a list.
Here are the steps that seemed crucial to getting this to work.
1. Download and install TightVNC, UltraVNC or RealVNC (I was able to get all working) on your windows machine
2. Go into "system preferences" on your Mac. Click the "Sharing" icon and then the "screen sharing" entry. Then click on the "Computer Sharing" button and make sure to set a password in the "VNC users may control screen with password" input box.
3. When you load up your VNC program on your windows machine make sure to
- Turn off Render Cursor Locally (set it to let the remote host handle it)
- Set color to full color (this is default in some programs but not all)
4. These are the only settings I needed to change from the default ones in all three VNC programs mentioned above. Then just enter the IP address or hostname of the MAC machine and hit "connect"
With the default settings all three VNC programs for windows showed the OS X interface nice and crisp and the TightVNC program seemed to be slight quicker than the other two. The IBM Thinkpad I was using had a lower resolution and different aspect ratio than my Mac so I had to scroll around the screen at first until I changed resolutions in the "system prefs" of the Mac through the remote connection.
Two things for you.
1) You should try out iChat, since your contacts are AIM. I have a feeling you're going to love it.
2) Type the following in Terminal (that's one line):
defaults write com.apple.dock no-glass -boolean NO
You can run the client on the Mac and it runs amazingly fast (I think it forwards X11 commands rather than a image of the screen like VNC does).
Also, the reason Screen Sharing.app is in CoreServices is because it is a system app that you access other ways inside the system. You can use "connect to server" to launch the app, or the preferred way of choosing the computer in the sidebar and choosing "share screen".
Other apps in this folder also work like this (you can open them, but you shouldn't need to run them directly), such as the Bluetooth Setup Assistant (run from Bluetooth Control Panel), Dock and Finder (runs on login), DiskImageAgent (Runs when you open a .dmg), Installer (runs when you open a .pkg), Network Diagnostics (when you click the Network Diagnostics button in safari when your internet isn't working), Archive Utility (when you open a .zip, .bz2, .tar, etc.)
You can download a VNC client (JollysFastVNC and Chicken of the VNC are both good ones) on either Tiger or Leopard, or you can use the built-in one on Leopard (in Finder, Go -> Connect to Server... -> vnc://ip.address.here)
This method also works if you have Back to my Mac working with the .Mac service. Then all your computers show up under Shared, even when they are in different locations. Same process to connect locally or remotely. It's a shame this feature is tied into a $99 a year service, since all Apple is providing is a DNS name and wide area bonjour support. Your Macs take care of opening the proper ports on uPNP enabled routers for the service, and establishing a VPN connection between the two.
I have Chicken of the VNC installed on my MacBook Pro (Tiger), but the Tiger Finder does not resolve the "vnc://" URL and no connection occurs.
However, I was able to use the "vnc://" URL in Safari to launch Chicken of the VNC to give a connection prompt similar to the Leopard Screen Sharing application. I was able to connect successfully to my iMac (Leopard).
I guess the old adage of "long time listener, first time caller" really applies to my comment.
I've recently purchased a macbook pro. You were no small aspect of this. I've just posted a blog article (for friends and family really) entitled "Ode to David Alison". It highlights some pros and cons, but more importantly it gives you credit for all of you great posts and hard work that goes into this blog. I hope you check it out @ http://seanlb.blogspot.com/2008/06/ode-to-david-alison.html
Once you get setup with it I highly recommend the git Textmate bundle.
@Hendrik: Thanks - I actually just installed that into Textmate yesterday. Really does make it easy. My first employee started yesterday (Jr. Software Engineer) and I'm trying to figure out the best way for us to leverage a remotely accessible Git repository. Github looks like it would make it easy though I think I'd like to host this on my Linux box.
Great writeup! Always glad to see people who like to get into the nitty-gritty side of screen sharing. I work for Glance Networks, where we produce Glance, a cross-platform screen-sharing program. We're currently offering a promotion to bloggers like yourself who are interested in screen-sharing, remote control, and the like, and we'd like to offer you a free subscription to Glance! If you're interested all you need to do is email me at email@example.com and I'll provide you with more details.
Keep up the great blogging!