How to protect a window so that it won't be killed by chance

I’ve always killed some of my important windows, especially terminals wiht task running on remote hosts, I wonder if there is any operation that could protect a window temporarily by my request?


No, since the request to close the client might not always be to the terminal. That said, you could try something like:

Style foo !Closable

– Thomas Adam

Thanks, hope this feature could be implemented in the future…

I doubt it, since it would be a feature of the application you try to protect and not of the Window Manager.

You can remove all ways of closing a window with the window manager but still kill it by, for example, hitting exit in some menu (or ctrl+c in a shell) and there’s nothing the WM can do about this…

You can always unbind (or bind to Nop) the offending keystrokes only for a given application, for example, I use:

Key (FvwmKuakeTerm) F4 A 4 Nop

To avoid that binding in my self made kuake. But, that will only work if the application has FVWM-like binding. For example, as far as I know, there should be no problem (other than the obvious one) to bind to Nop the control+c combo in terminals. But (also as far as I know) there would be no way to bind to Nop other key combos, like emacs or vim ones, which are more complex than a simple keystroke.

There isn’t either a way to prevent closing windows if you click exit on a menu or button… As you already said, this is all application-side.