Closing a GUI window from the command line

cinnamoncommand linegui

I often run scripts to transform a CSV file which I then preview in LibreOffice. I often open the CSV with xdg-open file.csv. However, if I run that command when the file is already open, LibreOffice simply focuses that window – it doesn't reload the file from disk.

Is there a way, from the command line, that I can specify a window to close in the GUI? I can't just kill the process, since LibreOffice shares a single pid for all its windows. I'm running the latest version of Cinnamon on Mint 17.1.

Best Answer

You could use xkill, xdotool or wmctl.

type xkill on the terminal and then click on the window you want to close.

Related Question