i’ve been testing alot of apps lately looking for a good mediaserver on my iMac to stream photos, videos and tunes into my PS3 using my private local network. i finally got everything working fine (check the list of apps i use). the problem was that my iMac was freezing at times during the testing process and the hard restart option bothered me a bit, what i did was enabling sshd[1] and securing it (AllowUser directive[2]) so that when i was hit by a system freeze i could ssh into the iMac and kill -9 the freezing factor from the console (terminal) and if nothing worked kill Finder and/or WindowServer to restart the GUI without hard reboot. it works like a charm.
# kill/force quit an application
$ sudo kill -9 {pid of the buggy app}
# kill/force quit/might restart Finder
$ sudo killall Finder
# kill/might restart the GUI
$ sudo killall WindowServer
# reboot system
$ sudo reboot
[1] System Preferences - Sharing - Remote Login -> On
[2] edit /etc/sshd_config and add new line AllowUser example:
AllowUser rdd@192.168.1.15
where rdd is my iMac user account and 192.168.1.15 the local IP of the machine I’ll be using to ssh into the iMac