Page 1 of 1

How to deal with not responding programs

Posted: Fri Oct 27, 2017 2:24 pm
by Kyowash
Rarely a process/program will not respond and the only way to fix it is to terminate it.
First you must know the process PID, an unique number to identify processes. Run the following command to show all currently running processes to find out its PID:

Code: Select all

ps aux
The process' PID is the second column. Now imagine that Firefox stopped working and its PID is 1234. To kill it, run:

Code: Select all

kill 1234
This sends a TERM signal to the process which asks it to close. However, if it's really, really not responding and it doesn't close, you must force the process to terminate sending it a KILL signal, which can be done running the following command:

Code: Select all

kill -9 1234
There are more signals you can send to a process and their behavior is explained in the signal manual page.

Re: How to deal with not responding programs

Posted: Fri Oct 27, 2017 9:24 pm
by catweazel
A simpler way is:

Code: Select all

pkill <name>
No esoteric numbers required.

For example, pkill firefox.

Re: How to deal with not responding programs

Posted: Sat Oct 28, 2017 12:38 am
by phd21
Hi "Kyowash" and "Catweasel",

Thanks for posting this for those that do not already know this.

FYI-1: My KDE systems have always had a key combination to Kill an unresponsive applications, Ctrl+Alt+Esc. This changes the cursor to the Kill application cursor (Pirate cursor) and you just click on the Titlebar (anywhere in the application window really) of the application you want to stop. If I am not mistaken, all Linux Mint editions can assign a Key combination to do the same thing. Hit ESC to not kill anything...

FYI -2: There are other posts on this in this forum already.

[SOLVED] Close Unresponsive Programs
viewtopic.php?f=47&t=218738&hilit=pirat ... r&start=20

Force Quit Keyboard Shortcut (You can use pkill or xkill, etc...)
https://community.linuxmint.com/tutorial/view/30

FYI-3: If your system is locked up, hold down "Alt+PrintScreen" and type reisub and your system still will restart immediately. hold down "Alt+PrintScreen" and type reisud and your system still will shutdown immediately.

7 Different Ways To Kill Unresponsive Programs in Linux
http://www.makeuseof.com/tag/6-differen ... -in-linux/



Hope this helps ...

Re: How to deal with not responding programs

Posted: Sat Oct 28, 2017 1:17 am
by catweazel
phd21 wrote:Hi "Kyowash" and "Catweasel",

Thanks for posting this for those that do not already know this.

FYI-1: My KDE systems have always had a key combination to Kill an unresponsive applications, Ctrl+Alt+Esc.
Try that and accidentally click the desktop instead of an application :mrgreen:

Re: How to deal with not responding programs

Posted: Sat Oct 28, 2017 2:31 am
by Faust
I've always liked the xkill command .... heck , I even like the name of it !

Line up the culprit in the cross-hairs and pull the trigger !

( Actually , it's just point and click , but that doesn't sound nearly so exciting , does it :D )

Re: How to deal with not responding programs

Posted: Sat Oct 28, 2017 7:48 am
by aes2011
Faust wrote:I've always liked the xkill command .... heck , I even like the name of it !

Line up the culprit in the cross-hairs and pull the trigger !

( Actually , it's just point and click , but that doesn't sound nearly so exciting , does it :D )
I like xkill as well and assigned Super+Delete as a keyboard shortcut to bring up the skull and crossbones :)

Re: How to deal with not responding programs

Posted: Sat Oct 28, 2017 4:16 pm
by Kyowash
I decided to explain how to do it via CLI just in case the desktop environment froze, so you can go to the virtual console with Ctrl + Alt + F1. Of course, there are also multiple ways to do it from the GUI. Anyway, I must say some of them were unknown to me, glad to see people providing simpler ways.