重启OSX的图形界面部分 | How to restart only the graphical side of OS X

I see a lot of hints, such as the one to remove 10.5's translucent menu bar, that tell you to restart your computer for the changes to take effect. However, you only really need to restart the WindowServer, which handles the graphical part of the system. I just do that in Terminal, with this command:

Warning: All your opened programs will quit immediately! This is like a restart, but of only the graphical part of the system. Quit your open programs first! You have been warned. Here's what happens:

  • kill is a program to send signals (terminate or just "signals") to Unix programs — and in OS X, all programs are Unix programs. killall is the same, but you can use the name of the program instead of its process ID (pid). The dark side is that if you have more than one program with the same name, all programs will receive the kill signal.
  • -HUP is a signal that usually says to the process that configuration files are changed and the process must be restarted.
  • WindowServer is the program that manages the graphical side of OS X.

You can see all the available signals by typing kill -l, but play with care!

 

from:http://hints.macworld.com/article.php?story=20071121154033749

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注