Restore Screen Sharing buttons to 10.5.5

As I discussed in my deeper look at 10.5.5, our very-popular hint on adding more power to 10.5’s screen sharing mostly no longer works (only the Bonjour browser portion of the hint still works). Today, however, I’m going to explain how to bring back the missing functionality, in two different ways—one easy but potentially dangerous, the other more complicated (it requires you have Xcode installed) but completely safe.

The simple solution

First, the simple but potentially dangerous solution: just use the Screen Sharing application from OS X 10.5.4. The reason this is potentially dangerous is that if there were any security fixes for screen sharing, you’ll be giving up those fixes by reverting to the previous version. For that reason alone, I do not recommend this method, especially if you’ll be using screen sharing across the internet. For those working with a few Macs at home, behind a firewall, however, the risks are probably acceptable. But just to be certain you understand…if you implement the solution in this way and your machine is then compromised, the fault is entirely yours!

First, you’ll need to find a copy of Screen Sharing from 10.5.4; I can think of a few ways to legally obtain this file. First, if you’ve got a Mac you haven’t yet updated to 10.5.5, you can copy it from there. Second, if you use Time Machine and haven’t customized it to exclude system files, you’ll find a copy in your backups from before the 10.5.5 update. Finally, you can use a tool like Pacifist, which can extract system files from your OS X 10.5 installation DVD.

Regardless of the source, you’ll find the screen sharing application (named Screen Sharing) in /System/Library/CoreServices. Copy the file from that location, but on your 10.5.5 machine, do not put it in the same location. Instead, I recommend storing it somewhere in your user’s folder, or in the Applications folder. Because Screen Sharing is just an application, it can be run as needed—just drag a copy to the Dock, sidebar, or toolbar. When you want to connect to a another Mac, launch your 10.5.4 version of Screen Sharing, instead of using that Mac’s entry in your Finder’s sidebar. You can then connect using the Connection: New menu item, or by enabling the Bonjour browser from the original hint. By keeping your restored copy separate from the 10.5.5 version, you can run the current version whenever you want to, and you won’t have to worry about overwriting Apple’s current version with your old potentially-risky version.

Once you have the old version installed, you can use the Terminal commands in the original hint, and they’ll work as expected. I have tested this myself, and it works perfectly well. However, because of the possible security holes, I prefer the following more-complicated method.

The safer but more complex solution

The more complicated solution requires editing a file within the Screen Sharing application bundle. In order to do that, you need to have Xcode installed, but that’s really about the only prerequisite.

The editing you’ll do is going to add a new Full Screen menu option to Screen Sharing’s menus; once you activate full screen mode, a small floating toolbar appears, and on that toolbar, you’ll find all the buttons that were added by the original hint. Obviously, this requires that you work in full screen mode to gain access to the new buttons. As long as you’re only connecting to one Mac, this solution works really well. If, however, you often connect to many machines at once, you’ll only be able to use the more-powerful toolbar in one remote session at a time.

Start by making a copy of Screen Sharing, in the /System/Library/CoreServices folder—just drag the application out to your desktop, and the Finder will automatically copy it (as you don’t have rights to modify the source folder). Rename the copy to something like Power Screen Sharing, Control-click on the renamed application, and choose Show Package Contents from the pop-up menu. Now it’s time for some Xcode work—and thanks to a Macworld reader for sharing these instructions with me; I’m now sharing them with all of you

In the new window that opens, navigate into Contents/Resources/English.lproj (or the folder for your language of choice). In the English.lproj folder, double-click on MainMenu.nib. This will launch Interface Builder, part of Xcode tools. The MainMenu.nib file is, as you may have guessed, responsible for the main menu in Screen Sharing. Click once on the First Responder icon, then select Tools: Identity Inspector (or press Command-6). This will open the Identity Inspector; your screen should look something like the image at right (click it for the full-size version) when you’ve done this bit.

Just below the list of First Responder Actions in the Identity Inspector, click the plus sign to add a new action; you’ll see a new action named MyAction appear. Double-click this to edit the name, and change it to fullScreenClicked:. Note that the case matters, and the trailing colon is required. (Leave the Type column set to id, which is the default.) Press Return after editing the Action name to accept your changes.

image
Back in the MainMenu.nib window, double-click on MainMenu to open Screen Sharing’s actual menu bar. On that floating menu bar, click the Window menu so that it’s active, as seen in the image at right. Now select (from Interface Builder’s menu) Tools: Library to open the floating library palette. In the search box at the bottom, type NSMenuItem. As you type, the Library palette will change to show matches based on your search string.

image
When you’re done typing, the first match should be highlighted—a thin box with the word Item inside it. Click and drag this Item entry onto the open Window menu in the floating MainMenu window, and drop it just below the Zoom entry on that menu. When you drop the dragged object, you’ll see a new Item entry in the menu, as seen in the image at right. Now double-click on Item in the menu, and rename it to Full Screen.

Now for the somewhat-tricky portion of this operation—this is where the patient could die on the table, leaving you with a broken patient and a malpractice suit. OK, really, it’s not that dangerous or tricky. But it is tricky enough that I’ve recorded a short movie (584x500, 476KB) of the process; if the following instructions aren’t clear enough, just watch the video. With the Full Screen entry in the menu still highlighted, select Tools: Connections Inspector from the Interface Builder menu (or just press Command-5).

image
In the Connections Inspector, you should see a section labeled Sent Actions—if you don’t, click on your Full Screen menu item again to be sure it’s active. In the Sent Actions section, you’ll see the word ‘selector,’ and a small circle out to the right. Click and drag on that circle, and a line will start following your mouse. Drag over into the MainMenu.nib window, and drop the line on the First Responder icon—it should look roughly like the image at right.

When you drop the dragged line, a pop-up menu will appear, listing the possible connectors. Select fullScreenClicked from that pop-up menu. Congratulations, you’ve just created a new menu item and connected it to some code that will actually make it do something! The last step is to press Command-S to save your changes, and then quit Interface Builder.

Test the new solution

image
To test your modified screen sharing application, launch Power Screen Sharing (or whatever you called it), and then connect to another Mac. You can use the Bonjour browser tip from the original hint, or use the Connection: New menu and enter the remote Mac’s address. Once connected, the standard toolbar will look as it always has. Click the Window menu in Screen Sharing, choose the new Full Screen option, and watch as the remote Mac takes over your entire screen—complete with the toolbar as seen at right.

If, for some reason, Power Screen Sharing won’t launch, or the menu doesn’t work, you can just delete the modified program and start over with a fresh copy of the original.

While full screen mode may not be as convenient as windowed mode, it works fine for me, and I appreciate having my useful buttons back—at least until Apple releases that five-Mac version of Apple Remote Desktop 3 or realizes that regular users want more fine-grained control, too.

Subscribe to the MacWeek Newsletter

Comments