Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'How to restart only the graphical side of OS X' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
How to restart only the graphical side of OS X
Authored by: Johnny bison on Dec 05, '07 08:29:45AM

This is silly. If the graphical side of the OS needs to be relaunched then a logout will suffice. The windowserver dies, and relaunches on logout. And your applications get quit cleanly.



[ Reply to This | # ]
Try reading
Authored by: luomat on Dec 05, '07 09:53:22AM

This can be helpful if the GUI is locked up. How do you intend to logout when the keyboard and mouse don't respond?

If you can ssh in from another computer or your jailbroken iPhone you can restart the GUI WITHOUT rebooting.



[ Reply to This | # ]
Try reading
Authored by: barefootguru on Dec 05, '07 10:28:10AM

When my GUI has died but I can still SSH in, I _want_ to reboot the whole system so I know there's no gremlins lurking. For this I use sudo reboot.



[ Reply to This | # ]
Not quite.
Authored by: mdeatherage on Dec 05, '07 09:54:02AM

Logging out does not kill WindowServer. That's why logging out isn't sufficient to make the "non-transparent menu bar" hint work; WindowServer lives on. (This is easy to see in Leopard's Activity Monitor when viewing all processes hierarchically: the system-wide occurrence of launchd owns windowserver, as well as one more instance of launchd for each logged-in user.) That's why we said this in MDJ/MWJ 2007.12.03, because we hadn't seen anyone else point this out.

I think you're thinking of loginwindow, which requires WindowServer to run (obviously, or it wouldn't be showing a window). Logging everyone out may relaunch loginwindow, but not WindowServer. You need to restart or, more daringly, quit WindowServer to get it to relaunch.



[ Reply to This | # ]
Not quite.
Authored by: Johnny bison on Dec 06, '07 06:20:15AM

Maye it is true in leopard, which I do not have yet, that the windowserver lives on as a process on logout. On previous systems the logout relaunches windowserver ( with no other users logged in, of course). In which case mark this as a leopard fix. In the older systems the relaunch of the loginwindow *also* causes the windowserver to relaunch. The paradigm is : logout cleanly ( handled by loginwindow), loginwindow quits, windowserver sees the loginwindow go down, windowserver quits, launchd( or init in previous systems) relaunches loginwindow which tickles the windowserver to relaunch. Fairly clean. Similarly the loginwinodow will exit cleanly ( unlike other applications) when the windowserver dies.

The problem with killing the windowserver is that you may leave dummy processes around, as the windowserver is ( or was pre-leopard for what I know) the parent process of all applications which present GUI. A busy process writing to disk will still be writing to disk, but invisible, after the windowserver is killed. The new windowserver has it's own session which preious sessioned applications cannot connect to, so no windows.

Even *if* the windowserver can catch the interupt and kill it's process this is by no means the safest way of exiting. ( I understand there is a difference between kill -hup and kill -9 which is way more dangerous since it is a kill, not an interrupt) as the other applications will be killed, or interrupted, and may not quit correctly, if at all. Carbon applications will probably behave badly, for instance.

As for the guy who suggested I *read* the comment. The original comment about the translucent menu fix did not mention ssh, and in any case for the reasons I mention killing windowserver makes it a bad idea in all cases.



[ Reply to This | # ]