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

Exit XWindows cleanly from console mode UNIX
If you use the XDarwin implementation of the X Windows system from console mode (logging in as >console and bypassing Quartz), you might notice that (on my machine at least) exiting X gives you a blank screen and a spinning rainbow cursor. The computer looks frozen, but in fact is still accepting input: typing "exit" or "logout" at this point will bring you back to the login window after a brief pause.

If you find this a little less than smooth, as I do, you can preface your "startx" command line with the "exec" command like this:
exec startx [X startup options ...]
This little UNIX trick starts X while ending your logon shell, instead of just running X as a child process of your shell. The upshot is that when you exit X, you're immediately returned to the login window, instead of having to type unechoed characters to a beachball. A minor tip, to be sure, but it makes running X from the console a little more elegant.
  • Currently 2.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)

Exit XWindows cleanly from console mode | 2 comments | Create New Account
Click here to return to the 'Exit XWindows cleanly from console mode' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Spinning Cursor a feature, not a bug.
Authored by: Anonymous on Nov 23, '01 03:40:42PM

The following is unconfirmed.

I believe that whenever a window server of any sort shuts down, Mac OS X is smart enough not to drop you at the console. Why is this smart? Watch the system when it shuts down. After all the programs quit, and a few seconds of spinning beach ball, you get a blue screen beachball up in the upper-left corner... *exactly* like leaving XWindows. This is so that lusers don't get scared when the screen goes to white-on-black text.

What evidence do I have of this? Back in 10.0, if you booted in Verbose mode (holding down command-V), this *didn't* happen, and instead of blue screen, you saw the console, with the text "continuing ... done Processor halted." as the system shut down. (During a restart, instead of Processor halted, the text was MACH Reboot). Now I never managed to try XWindows console after a verbose boot, to *prove* this, but I'm sure that it will drop you normally back to the console, and I'll leave the proving of this as an exercise for the reader.

[ Reply to This | # ]
You're Right!
Authored by: cmccarthy on Nov 24, '01 11:28:05PM

Just tried rebooting in verbose mode, then running and exiting XDarwin from console mode. Sure enough: no beachball-on-blue-screen, just dropped me back to the good old Darwin prompt. Thanks for pointing out an interesting behavior; since I'm usually not booted in verbose mode, though, and I like dropping back to loginwindow instantaneously, I'll stick to exec'ing startx from the console.

[ Reply to This | # ]