Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 10:58 01 Aug 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : LINUX: Equivalent of END TASK?

Author Message
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9610
Posted: 05:45am 17 Aug 2021
Copy link to clipboard 
Print this post

When you have an application crash in Linux, is there a secret hotkey you can use to bring up the equivalent of Task Manager, where you can then kill the crashed application?

I have had this happen a few times when a Linux application crashes, but then I have no way to get rid of it off the screen.  Cos it has crashed, none of the buttons work, and you can't move the windows etc.

In the past, I have simply restarted the Linux box, but surely there is some method to kill a crashed application?

I'm not as afraid of the Linux console as I once was, so if I can do it that way, that would be OK too.
Smoke makes things work. When the smoke gets out, it stops!
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2640
Posted: 07:09am 17 Aug 2021
Copy link to clipboard 
Print this post

Many versions of Linux X support multiple desktops (4 is common). Unless Linux its self has frozen, it may be possible to switch to another desktop and shut it down from there. Does not always work.
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5089
Posted: 07:09am 17 Aug 2021
Copy link to clipboard 
Print this post

Many Linux variants allow for <ctrl>-t to bring up a terminal window. The "sudo su" to become root. Then list the tasks (I don't have a linux box here, so I have to check what command that is) and kill the one that has crashed by typing "kill nnnn". nnn is the PID of the task.

Volhout
PicomiteVGA PETSCII ROBOTS
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7937
Posted: 07:35am 17 Aug 2021
Copy link to clipboard 
Print this post

You'll probably find that, from a command line:
either sudo su to become root
or use a temporary root as sudo <command>
The latter is popular on Raspberry Pi systems as the root level is normally disabled.

sudo top lists *everything* about every process
sudo ps  shows a more abbreviated form

You need the pid for the process that's being a pain in the proverbial then
kill <pid>

If you get the process name from the listing you can use
killall <process_name>

Yes, I cheated. I've not had a linux box running for a while so I had to refresh the old brain cells. :(  I did remember bits of it though. :)
https://www.linux.com/training-tutorials/how-kill-process-command-line/
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10310
Posted: 07:37am 17 Aug 2021
Copy link to clipboard 
Print this post

ps -aux to get the list of active tasks
sudo kill -9 task_number
Edited 2021-08-17 17:38 by matherp
 
cs41
Newbie

Joined: 08/08/2016
Location: Australia
Posts: 27
Posted: 08:25am 17 Aug 2021
Copy link to clipboard 
Print this post

Another very  useful command to kill a stalled program is " xkill "

If you can bring up a terminal window, type xkill and press enter.
Then put the cursor on the offending program and enter

Usually that works...  just occasionally it's not enough so then probably will need a restart.

cs
 
Rado
Regular Member

Joined: 27/11/2020
Location: Croatia
Posts: 59
Posted: 09:02am 17 Aug 2021
Copy link to clipboard 
Print this post

xkill is your tool of the choice. :)
 
Rado
Regular Member

Joined: 27/11/2020
Location: Croatia
Posts: 59
Posted: 09:05am 17 Aug 2021
Copy link to clipboard 
Print this post

You can also run

xprop _NET_WM_PID

from a terminal, click on the window, and get PID of the application in terminal.

Then simply

kill -9 PID

to close it and hopefully not leave any zombie processes.
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5089
Posted: 12:32pm 17 Aug 2021
Copy link to clipboard 
Print this post

Hi Grogster,

I remember you are running Puppy Linux.

In Puppy Linux (I tested a few versions, not sure what you are running exactly) the generic way to open the task manager is the PC "Affengriff": <ctrl> <alt> <delete>.

Since you are ROOT in Puppy Linux, you can kill whatever you want immediately.

Success,

Volhout
Edited 2021-08-17 22:32 by Volhout
PicomiteVGA PETSCII ROBOTS
 
LeoNicolas

Guru

Joined: 07/10/2020
Location: Canada
Posts: 504
Posted: 01:19pm 17 Aug 2021
Copy link to clipboard 
Print this post

Try this:

alt + F2 -> type xkill and press enter

Click on the frozen app

You can also define a new shortcut to open the System Monitor or run directly the xkill command.

I like to install the System Monitor plugin on my desktop. This plugin has a quick access to it.

For Gnome 3:
https://extensions.gnome.org/extension/120/system-monitor/
 
Bizzie
Senior Member

Joined: 06/07/2014
Location: Australia
Posts: 192
Posted: 11:07pm 17 Aug 2021
Copy link to clipboard 
Print this post

I don't like xkill!
Just nuked more than I wanted by clicking the wrong window!
I would use kill -9 <PID>
Rob White
 
LeoNicolas

Guru

Joined: 07/10/2020
Location: Canada
Posts: 504
Posted: 02:29am 18 Aug 2021
Copy link to clipboard 
Print this post

You can also use killall <process name>
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9610
Posted: 04:53am 18 Aug 2021
Copy link to clipboard 
Print this post

Lots of replies!
Thanks, chums.  
I will try some of those out.
Smoke makes things work. When the smoke gets out, it stops!
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025