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:

/System/Library/Core Services

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.

Comments

Anonymous said…
You don't have to open the Screen Sharing application first to connect. It's possible to initiate a screen sharing session from the Finder by selecting menu Go>Connect to Server... (or command-K) then type "vnc://" followed by the remote IP number or computr name. E.g. vnc://remote-machine.local or vnc://192.168.1.x

Lee.
Robert said…
There's something about remoting into a machine that's just satisfying in general. It's such a cool feeling. For me, the magic feeling still hasn't died and I've been doing it on and off for ~7 years. It's like the first time you get to use a multi-monitor configuration. You just feel cooler somehow.[/end nerdgasm]
David Alison said…
@Robert: Nerdgasm - love it.

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.
SD said…
Hint: you can add more useful control buttons to the ScreenSharing app
http://www.macosxhints.com/article.php?story=20071127183240696
MagerValp said…
You can also just select the computer to the left in every finder window, under Shared. There's a little Share screen button above the list of shared folders. I'm not sure which computers show up, but I'm guessing it's just macs with Rendezvous enabled.
Anonymous said…
After a workout this week I was able to figure out how to remote screen share from my Windows machine into my Mac Pro. Very cool seeing the crisp OS X interface on an old IBM Thinkpad!

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.
David Alison said…
@Buckley: Great stuff! Thanks for adding that in.
Anonymous said…
Have you tried SSH with X-forwarding (ssh -X user@host)? Replaced screen sharing for me most of the time, as I can run windowed programs from the shell as long as I know the executable name.
Anonymous said…
Hi David,

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

then type:

killall Dock

Cheers.
N45800 said…
For ubuntu, try installing FreeNX ( https://help.ubuntu.com/community/FreeNX ).
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.)
Anonymous said…
does this work from a computer running leopard to a computer running Tiger? if yes how?
Anonymous said…
does the VNC command work to go from a Mac to a PC?
David Alison said…
@Pardo: Yes, though you will need to install a VNC server on your Windows machine. There are plenty of free ones available for that.
David Alison said…
@Anon: Not sure if this is supported in Tiger as all of my machines are Leopard based. Anyone?
Devin said…
You can control a Tiger machine, you just have to make sure Remote Desktop is enabled under the Tiger Machine's sharing preferences. I think most of the stuff under Access Privileges doesn't even apply unless you're using Apple's "Remote Desktop" program. I just enabled myself under the users and on the right checked the box allowing myself to control the Tiger machine. I've only tried this all in about the past hour since reading this post.
N45800 said…
You have a VNC Server on Tiger (System Prefs -> Sharing -> Apple Remote Desktop -> Settings (or something like that) -> VNC Users may connect with password). You also have a VNC server in leopard in the same place, as well as under screen sharing.

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)
Anonymous said…
you can even make wormholes with screen share!

http://www.flickr.com/photos/21207955@N03/2059981243/in/set-72157603303942491/
Anonymous said…
you can even make wormholes with screen share!
Anonymous said…
What magervalp said is why Screen Sharing hides out in the /System folder instead of /Applications. It was built around not even needing to manually run and type in a host, instead just pick the computer in Finder, then click Share Screen.

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.
Anonymous said…
As long as you have Remote Management (Leopard) or Apple Remote Desktop (Tiger) on and configured for VNC, you should be able to connect from either to the other.

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).

Lee.
Sean! said…
Well I was going to email this to you, but for reasons that will become clear, I'm short on my disposable $12.
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
Thanks,
sean
Hendrik said…
A tip regarding git:
Once you get setup with it I highly recommend the git Textmate bundle.
David Alison said…
@Sean: Wow man, I'm flattered. I've never had an ode written for me! I hope you enjoy your MacBook Pro as much as I do mine - it's a great machine.

@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.
Hendrik said…
I think you just need to set up a user account for everybody on your Linux machine and then you can use git over ssh (which I believe is the default network protocol for git).
David Alison said…
@Hendrik: That's so easy it may just work! Thanks man.
Anonymous said…
David,

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 bobby@glance.net and I'll provide you with more details.

Keep up the great blogging!

Popular posts from this blog

Finding Davey: A Father's Search for His Son in the Afterlife

Keyboard vs. Mouse

Some cool Firefox add-ons