Android
android
All
all
Windows
windows
Web
web
Linux
linux
Others
others

Different Ways to Kill Unresponsive Programs in Ubuntu

| Comments

Ubuntu

Ubuntu is a quite responsive operating system for our daily use. But beyond that, there could be situations that might fall you into trouble when testing, running heavy-weight programs and facing exceptional situations when changing system settings. Ubuntu has an in built method to handle such situations. But what if it couldn’t? Hence, it’s always quite handy to know the proper ways of killing unresponsive programs to save your time.

With years of experience with Ubuntu I’m going to show you 3 easy ways to achieve this goal.

  1. X Kill

This is the most easiest way of killing unresponsive programs individually.

  • Press Alt+F2 and you’ll be presented with the Run Application box. Type xkill in it and press Enter.

  • Now your mouse pointer will be changed to a cross or a skull.

  • Click on the program window you want to close.

Xkill in Run

  1. The Command Line Way - with ps Command!

Okay, here’s the scenario. Let’s say that you are developing a program or a 3D animation and it uses a heavy amount of resources. Now with the time your UI might get laggy and you want to clear up some unwanted resources which are running in the background (which you normally can’t see!).

  • It’s pretty simple. Just open up a terminal and enter this command.
1
2
3
4
5
6
7
8
9
10
ps -A[/bash]

  
  * This will show up each and every program that runs on your computer.

  
  * Now check the list it shows up to find the program you want to close.

  
  * Run this command in the same terminal.
1
kill -9 <process id of the program>

Note: replace ”” with the process id you found.

Kill Command

  • Or if you know the program you want to close and you just want to search for its id you can use the grep command as follows:
1
ps -A | grep program_name
  • Replace program name with the program you want to kill.

  • For an example, let’s say we want to find the process IDs of Transmission. The command would be:

1
ps -A | grep transmission
  1. Killing the X Server

This is a handy feature, but for some odd reason they have disabled the key sequence of Ctrl+Alt+Backspace in Ubuntu 10.04/10.10 to kill and restart the X Server.

  • To enable it, open up a terminal and enter the following command:
1
gconftool-2 --type Boolean --set /desktop/gnome/interface/menus_have_icons True

Enabling Ctrl+Alt+Backspace

That’s it! Now if somehow your Ubuntu box gets stuck you can always use Ctrl+Alt+Backspace to kill and restart the X Server.

Hope this post will save a lot time of our readers! We would be glad to hear your comments.

Comments