Step 1. Find “process ID” of the program
Each program/application in Ubuntu has a process ID. type the following command to get it’s process ID. In the example, I’m assuming the program is “jdownloader”
ps aux | grep -i jdownloader
Now you’ll get an output like the following image. Look at the process ID (marked by yellow background):
Step 2. Kill it!
Once you’ve grabbed the process ID, you can close it by this command:
kill -9 process-id-of-the-program
So, for our example where process id is 19641, we should issue following command in the terminal:
kill -9 19641

another handy way to kill unresponsive program is to issue “xkill” comand in terminal and click (unresponsive) window you wish to kill….
Yeah, you’re right. But that involve some kind of GUI (clicking) activity
unfortunately
it does
thank you. minecraft never closes when i hit X
Many thanks!! Very useful method!!