Resolving stuck application issues without a restart

Dec 05, '02 09:00:07AM

Contributed by: sammysheep

This tip may come as a no-brainer to older UNIX gurus, but to the legion of old-school Mac fans, it's a pretty new concept. Suppose your CPU crashes while in full-screen mode. For example, your screensaver or game gets stuck in a loop and your GUI refuses to respond. This is usually not the problem of the system, but the program or module being run itself. In any case, there is an easy way to regain control of your computer if a program crashes while in full-screen mode. If the program isn't in fullscreen mode, then just use command-option-escape to quit the crashed program. This solution requires access to another machine that can be networked to the troublesome machine.

Step 1:
Go to your system preferences and under your sharing panel, make sure the "remote login" is on. You can also enable telnet to do remote login, but SSH is more secure. If you are unfamiliar with command line, write down the text that OS X gives you for logging in remotely when the Remote Login item is highlighted in the sharing panel. Enabling remote login must be done before your application crashes, obviously.

Step 2:
When your screensaver or game crashes, either plug in another Mac to your ethernet port or if you are on a LAN, go to a friend's computer on the network and log into your computer using SSH or telnet from the UNIX command line (if it is a windows CPU, type "telnet" from DOS-prompt). You should notice that though the GUI is stuck, the login shell is quite autonomous from the GUI's dilemmas. If remotely logging into your CPU is a foreign concept, try it before your computer crashes. There are plenty of tutorials on command line UNIX. Just remember that the UNIX layer uses the same password and username as Aqua does.

Step 3:
Next, find the bad thread and kill it. I like to use the "top" command to find the bad thread. When you figure out which program is bad (the names and usages are listed) take down the thread ID number (the PID column in 'top'). Type kill thread_ID_number and the bad process should terminate (a thread is a running program or process). Go back to your computer and notice that the offending application has quit. No restarting of your CPU is required; once again, everything just works.

[Editor's note: I thought we already had a basic hint published on remote login for troubleshooting purposes, but I can't seem to find it ... apologies if this is a duplicate.]

Comments (19)


Mac OS X Hints
http://hints.macworld.com/article.php?story=2002120506000761