Score:0

Close only one window of a hanging program

rs flag

I've had two separate windows of gedit. In one of them I've tried to open some file and this has made gedit hang giving me the typical choice of "Force quit" or "Wait". Continuous clicking on "Wait" didnt help, the choice window continued to pop up. Clicking on "Force quit" would close ALL gedit windows, and I had some unsaved text in the other window (which became unresponsive, too, of course). The wmctrl tool couldnt close the hanging window by its numeric ID or name (as suggested in How to close only one window of an application?). Neither xkill does the desired, it would close one selected window only in the case of a non-hanging program. So, I was forced to click on "Force quit" and lose the unsaved text in the other window. Is there really no way to close only one particular window of a hanging program?

Will avatar
id flag
The easy way is using xkill: Open a terminal (Ctrl-Alt-T), type xkill and enter. You can then click on the rogue window to close it. I’m sure there are better ways - ie identifying the hung process and terminating that in a more elegant way, but this is probably what you need for a stick fix. If that’s what you want I can convert this to an answer.
nobody avatar
gh flag
I use xkill for that.
SergiusPro avatar
rs flag
@Will xkill does in effect exactly the same as "Force quit", it closes ALL windows of a program. Once again, I'm talking about a **hanging** program, this is the crucial difference. xkill would close one selected window only in the case of a non-hanging program.
Will avatar
id flag
@SergiusPro - thank you - I've learned something! Might be worth editing your question to say that xkill doesn't have the desired action (just to avoid someone putting that as an answer if these comments disappear).
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.