> Apparently, there is no equivalent in X-Windows. When an X server Not the case > terminates, it just tears down all client connections, apparently. From an > application's point of view there may not actually be a way to detect if the > X connection went away because of a server crash, or the user logging off. At the lowest level X itself doesn't care about this. The toolkits and window managers do and there is a session management system implemented by the toolkit/desktop (eg by gnome-session). Programs are told politely to quit first (eg if you hit the window destroy button). Gnome then uses a dialog and asks the user if it can kill the window if nothing occurs within a timeout.