X

Convenient sharing services for troubleshooting OS X

Sometimes when troubleshooting OS X, you may not be able to use the keyboard or mouse, or even see what's happening on the screen. Here are some ways to work around this.

Topher Kessler MacFixIt Editor
Topher, an avid Mac user for the past 15 years, has been a contributing author to MacFixIt since the spring of 2008. One of his passions is troubleshooting Mac problems and making the best use of Macs and Apple hardware at home and in the workplace.
Topher Kessler
3 min read

When managing problems in OS X we sometimes limit ourselves to using the input methods we see in front of us: the monitor, the keyboard, and the mouse. If a problem happens on the system such as a hanging program, we will try to force-quit the program using the Option-Command-Esc hotkey, or even use Activity Monitor or the Terminal to do the same thing.

This approach to fixing problems assumes that your keyboard, mouse, and monitor inputs are working properly; what do you do if they aren't? A common solution is to force the system to restart by holding the power button; however, this may result in damage to the system and can also cause unsaved data to be lost.

Sharing system preferences
Enable the Remote Login and Screen Sharing services to help in troubleshooting. Screenshot by Topher Kessler

Sometimes when OS X hangs or has problems where you cannot see what is being shown on the display, most of the system may still be running just fine but is experiencing a hardware or software problem that is blocking access via the standard input. This may seem like an impossible hurdle, but you may be able to overcome it by keeping a couple of Apple's sharing services enabled, namely Remote Login and Screen Sharing.

These services, available in the Sharing system preferences, will allow you to connect to your system remotely and possibly manage it in the event the computer's input or screen is not working. For instance, if your computer's display is black but it sounds like your hard drive is chattering normally, then the backlight of the display might be broken. In this case, if you have screen sharing enabled, then you should be able to view your computer's screen from another Mac, and be able to copy needed files or shut it down safely.

In other instances, you may have a non-functional USB bus where both built-in keyboards and external ones do not work properly. In this case, screen sharing should also allow you to use the system and restart it without a hard reset.

To connect to a system with Screen Sharing, you can either select the system in the Finder sidebar, or use the Finder's "Connect to Server" option in the Go menu and enter the following address, substituting "computername" with the name of your system, which in my case is "Tophers-Laptop" (see the screenshot above):

vnc://computername.local

The Screen Sharing service is a visual interaction with the system, and as a result is likely more intuitive to people, but if you are familiar with the Terminal, then another option is to keep the Remove Login service active, which will allow you to log in to the system using the "ssh" (secure shell) command from another computer's terminal in the following manner:

ssh username@computername.local

Connecting with SSH
You can use the computer's name on a local network instead of a URL or IP address to connect to it. Screenshot by Topher Kessler

As with Screen Sharing, while you can use the computer's IP address instead of "computername.local" as the server address, Apple's use of Bonjour networking should allow you to only memorize the computer's network name, especially since IP addresses can change.

When connected to the system, you can use various Terminal commands to check on your system if you know how to use them, but if not, then you can at least shut down your system more cleanly than a hard reset by entering the following command:

sudo shutdown -h now

After entering your password, this command will tell the system to halt immediately, and will force-quit applications and services in order to do so. It's not as good of an option as using Apple's built-in Shutdown command from the Apple menu, but it is better than a hard reset.



Questions? Comments? Have a fix? Post them below or e-mail us!
Be sure to check us out on Twitter and the CNET Mac forums.