How can a frozen/locked-up program/app be closed?

Press ALT+F2, type xkill. The mouse pointer on screen will change to a cross.

Then with it, you can simply click on the window you want to close.


This is my "linux emergency cheat sheet":

1. Non responsive application

SUPER --> type in System Monitor --> RETURN --> find process --> right click --> Kill Process

or

ALT + F2 --> type in xkill --> x marks the spot (or in this case frozen app)

or

CTRL + ALT + T --> type in top --> find process ID --> k PID where PID = process ID

Effect: This kills the program.


2. Non responsive desktop

CTRL + ALT + F1 --> type in sudo service lightdm restart

Effect: This kills the session and starts a new one.


3. Non responsive system

LAST RESORT. ONLY USE WHEN EVERYTHING ELSE FAILS:

Hold ALT + SysRq down and hit the following keys in the given order:

R --> E --> I --> S --> U -->B

This is where you find the magic SysRq key:

enter image description here

Effect: This restarts the system but only after performing the following actions:

unRaw      (take control of keyboard back from X),
 tErminate (send SIGTERM to all processes, allowing them to terminate gracefully),
 kIll      (send SIGKILL to all processes, forcing them to terminate immediately),
  Sync     (flush data to disk),
  Unmount  (remount all filesystems read-only),
reBoot.

Bonus mnemonic: Reboot Even If System Utterly Broken


Just open from your Start "Menu" > system > system monitor In there you will find the tasks that are running and you can close them.

You could also try ALT+F4

to close a running application in foreground.

Another possibility would be to use Ctrl+ALT+F4

You have to login there with your user account. Then you could run

top

If you want to "kill" a process you write down the "PID" Number. Then you type in top:

k number_of_PID

number_of_PID is the PID number you just wrote down. The process should then end.


Using Alt + F2, xkill is a good option for applications having a window to click on.

Sometimes an app crashes and there's no more a window showing but the application is still frozen in the background. In this case you could use "System monitor" to kill it.