July 4, 2026
This is a running collection of terrible things that can happen, and that happened to me. More importantly, what I did to prevent it in the future
An ImageMagick process was misbehaving and I wanted it gone. The quickest way to kill a window-bound process on X is xkill. You run it, your cursor turns into a skull-and-crossbones, you click the offending window, and the process is gone. I clicked the ImageMagick window and it died.
For some reason of which I do not know, it stayed armed. I tried to click one of my terminal windows (not sure why, usually I’d Alt+<arrow> but I guess my hand was on the mouse already) and it closed.
You might think a terminal window closing isn’t a big deal. Yeah, I agree; just one terminal window is not a big deal. The problem is I use xfce4-terminal, which by default creates a single process that manages all terminal windows. So every single one of my terminal windows closed. Today that meant basically everything I had open across a very large number of workspaces.
xfce4-terminal, by default, runs as a single daemon. The first window you open starts a background server process over D-Bus, and every window you open afterward is just another view registered with that one process, sharing one connection to the X server. It’s efficient — faster startup, shared configuration — and completely invisible until it isn’t.
xkill doesn’t kill a window. It kills the X client that owns the window you clicked. Because all my terminals were owned by the same daemon connection, severing it destroyed the resources for every window that connection owned. The daemon’s pseudo-terminals closed, every shell got a SIGHUP, and everything running inside them went down together. Scrollback — which lives only in RAM — was gone. One misclick, total loss.
xfce4-terminal has a flag that opts out of the daemon entirely: --disable-server. With it, each window is its own independent process with its own X connection. A stray xkill can then only ever take down the single window you actually clicked — the blast radius shrinks from “everything” to “the one thing.”
launch a standalone terminal# Each window is its own process; xkill can only hit the one you click. xfce4-terminal --disable-server
There’s no reliable persistent toggle for this in terminalrc, so the fix lives wherever you launch the terminal. On i3, that’s the keybinding — add the flag there and every window you open from then on is on its own:
~/.config/i3/configbindsym $mod+Return exec --no-startup-id xfce4-terminal --disable-server
The trade-off is trivial: each window is now a separate process, so marginally more memory and no shared single-instance behavior. In exchange, a slip of the mouse can’t erase your entire working session. That’s a deal worth taking. The lesson, as with most terrible things: the default optimized for the common case, and I only learned the shape of it by stepping on it.