Saturday, September 09, 2006

How to restart the OSX Desktop...

Without loging out and back in.

Useful for when desktop "freezes" or you have artifacts (see Macbook) and don't want to kill off background processes.

1. Open up term app

2. ps -aux|grep Graphics

3. Find the following:
windowse 52 0.9 5.6 915688 57592 ?? Ss 11:02AM 0:20.62 /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Resources/WindowServer -daemon

4. then HUP the found process:
sudo kill -HUP 52

52 is the process id tht I found. Yours will be different.

This will restart the GUI, logging you out, but at least you won't have to reboot the whole machine.

3 comments:

Fito Gorv said...

Great. I didn't know that OSX had a graphics server, like other bsd/linux systems who make use of X server. So Windows remains as the only OS with the graphics server integrated to the kernel, isn't it?

Unknown said...

That is very neat thank you. But... is there a way to restart just the window manager or what it is called? Like in MS Windows, you can shoot down the Explorer process but all user applications will remain alive. This OSX desktop restart killed my applications too.
Or maybe that is possible in Windows more because of its flat process model vs. The Unix style tree one?

Olivia said...

Unfortunately, no. There isn't a way in OSX (That I am aware of) to restart the desktop session without closing open programs. Sorry.

Blast from the past (this blog entry). Heh.