Supertip: Optimize Screen Sharing – Mac Kung Fu, 2nd Edition

Tip 352Supertip: Optimize Screen Sharing

OS X includes a tool whereby you can use one Mac to remotely view the desktop of another Mac across a network or Internet connection. This can be useful if you want to do something on an iMac in your home office while using your MacBook in a downtown cafe, for example.

Getting a working Screen Sharing setup can involve modifying arcane network settings in order to make the remote Mac accessible from the Internet. However, with Back To My Mac offered as part of iCloud, Apple has created an idiot-proof setup, as follows:

  1. While sitting in front of it, enable Screen Sharing on the Mac you want to access while out and about—its checkbox is within the Sharing pane of System Preferences, which you’ll find on the Apple menu.

  2. Ensure you’re signed into iCloud on both computers using the same Apple ID, and then enable Back To My Mac on both computers—the remote Mac and the one you intend to use to access it remotely. This can be done within the iCloud pane of System Preferences. Back To My Mac invisibly creates a secure network connection between computers across the Internet, with no need to alter firewall settings or configure Internet routers.

You can then connect to the remote Mac while out and about by finding the remote Mac’s entry under the Shared heading within Finder and clicking the Share Screen button at the top right of the Finder window.

If you decide not to use Back To My Mac, the remote Mac will need to be Internet accessible. This can be done several different ways, such as configuring the demilitarized zone (DMZ) of the remote Mac’s Internet router to pass incoming Screen Sharing (also known as VNC) requests to the Mac. Alternatively, a popular choice is to use a third-party Dynamic DNS service like DNS2GO,[32] if the Internet router is compatible with it.

Note that the remote Mac’s firewall is automatically configured when you activate Screen Sharing to allow incoming connections. No modification or setup is necessary on the computer you want to use to connect to the remote Mac.

Once setup has been completed, here are some tips to make using Screen Sharing more productive.

No Need to Log In

There’s no need to leave the remote Mac logged into your desktop. In fact, although it needs to be left switched on, you can simply leave the remote Mac at the login screen. You’ll still be able to connect to the screen of the remote Mac, as described earlier. When you do, you’ll see the login screen of the remote Mac, where you’ll be prompted as usual to select a user account and then log in with the password. However, remember that—once you’re logged in—anybody able to view the remote Mac’s screen will see everything you’re doing.

Log In as a Different User

Let’s say the iMac in an office has two user accounts: one for Jane and one for Gary. Jane is using the iMac to do some word processing. Meanwhile, Gary is in a cafe on the other side of the city, with his MacBook Air in front of him, and would like to connect to his account on the iMac via Screen Sharing to check some files.

Even though Jane is using the iMac, there’s nothing stopping Gary from remotely logging into his desktop via Screen Sharing. If Gary specifies his own username and password, he’ll be asked if he wants to get permission to access Jane’s desktop or log into his own account and see his own desktop. If he selects the former, Jane will see a dialog box asking her to give him permission. If he clicks the latter, Gary will be shown the iMac’s login screen, where he can log in to his own desktop as if he’s sitting in front of it. Jane won’t be aware of any of this and can continue working (the desktop Gary sees is described as being virtual and only he can see it). In other words, Jane and Gary will be able to access their desktops on the iMac, simultaneously.

There are a few things to note, however. First, this won’t work if Back To My Mac is used when setting up Screen Sharing. It will work only if—as mentioned during the setup instructions earlier—the Internet router the iMac is connected to has been configured to allow incoming Screen Sharing connections. Gary will also need to connect to the iMac manually via the Screen Saver app—see the instructions in “Manually Connect to Screen-Sharing Computers.”

Second, this assumes that Gary has an administrator user account on the iMac. This is the default type of account, so he probably does. However, if he’s merely a standard user, on the iMac it’s necessary during screen-sharing setup to open System Preferences, click the Sharing icon, select Screen Sharing in the list on the left, and click the radio button alongside Allow Access for All Users.

Avoid Sharing Your Clipboard When Screen Sharing

One caveat when using OS X’s Screen Sharing tool is that any items copied or cut to the clipboard on either computer are automatically transferred to the clipboard on the other computer. This includes not only text but also files, images, and so on.

This can be annoying, but turning it off is simple: when the Screen Sharing app is running and you’re connected to the remote computer, simply click EditDisable Shared Clipboard.

This will affect only the current screen-sharing session. To make the change permanent, click Screen SharingPreferences, and remove the check from Use Shared Clipboard.

Note that you’ll still be able to share clipboard contents after this if you need to—just click EditGet Clipboard to get the clipboard contents of the remote computer, or click EditSend Clipboard to pass your Mac’s clipboard contents to the remote computer. You can also click the buttons on the toolbar.

Drag and Drop Files While Screen Sharing

You can drag and drop files and folders onto the window showing the remote Mac in order to instantly transfer them to that computer. This works the other way too—you can drag files and folders out of the window to transfer them to the Mac at which you’re working.

Adjusting Image Quality

By default OS X will attempt to get the best image quality it can bearing in mind the speed of the Internet or network connection you’re using. It’s pretty good at this, and generally the image quality is excellent, but you can force Screen Sharing to always show you the best-quality image, often at the expense of making the connection jerky, by clicking ViewFull Quality. To switch back to OS X managing the image quality, select ViewAdaptive Quality.

Note too the Screen Sharing window can be resized in the usual way by clicking and dragging its edges, which will shrink the image. This can make it easier to access a remote Mac on a laptop, for example, although it can make text on the remote Mac a little more difficult to read.

You can switch the remote Mac’s image within Screen Sharing to grayscale using a secret command. I find this makes it easier for me to identify the remote Mac’s desktop and not confuse, say, a Finder window on the remote Mac with one on the Mac I’m using!

To switch to grayscale images, close Screen Sharing if it’s open, open a Terminal window (open Finder, select the Applications list, and then in the list of applications double-click Terminal within the Utilities folder), and type the following:

 
defaults write com.apple.ScreenSharing controlObserveQuality 2

To reactivate full-color connections later, quit Screen Sharing if it’s open, and then type the following into a Terminal window:

 
defaults delete com.apple.ScreenSharing controlObserveQuality

Manually Connect to Screen-Sharing Computers

Virtual Network Computing (VNC) screen sharing[33] is the technology that powers OS X’s screen-sharing feature, and it’s an open standard. This means OS X computers can both share their screens with users of non-Mac computers and connect to screens shared in this way.

To connect to a Mac, users of Windows or Linux will need to download an up-to-date VNC client like RealVNC,[34] for example, and specify the network address that was listed in System Preferences when Screen Sharing was activated. You might also have to configure your Internet router to allow VNC/screen-sharing connections, as mentioned during the setup instructions earlier—consult its documentation for more information.

To connect your Mac to a Windows or Linux computer running a VNC server (or to connect to another Mac that doesn’t have Back To My Mac configured), open a Finder window, and click GoConnect to Server. Then in the dialog box that appears, type vnc:// followed by the address. To connect to a computer located at 192.168.1.5, for example, I’d type vnc://192.168.1.5. You can also type this into the Safari URL bar rather than use Finder.

Whichever method is chosen, all that happens is that OS X’s hidden Screen Sharing app is activated—the same one that’s used for Mac-to-Mac screen-sharing sessions. It can be found in the /System/Library/CoreServices folder (open Finder, hit Shift+Command+G, and then type the address to browse to the folder). You can drag and drop this utility to the Dock for easy access—upon running, it will prompt for the network address of the remote computer and then, if it’s able to connect, for login and password details.

Adding Windows Screen-Sharing Support to Your Mac

Microsoft also offers for download a free client that allows Macs to connect to Windows computers running Remote Desktop Protocol (RDP), which is the Microsoft technology responsible for screen sharing on Windows computers.[35]