I have in my
.xinitrc the line
dbus-launch --exit-with-session stumpwm. Occasionally, I'll want to kill everything that has to do with X, get back to a terminal, and start over.
ps aux | grep stumpwm and kill the StumpWM process, the window manager dies, but everything with x11 still works. I can type in the window that currently has focus but I can't change focus or do any other window management.
I also tried
sudo kill -9 startx, no effect. I noticed another "x" process,
xinit, and killing that also had no effect.