Posted by: Odzangba | November 19, 2008

Leash Runaway Applications

Often, firefox just hangs on me (when I’m forced to use it) and sometimes brings the entire machine to a grinding halt. I’d rather not start a rant about how bloated firefox is… it’s not worth the breathing exercises I’d have to do. Usually, when an application becomes unreasonable, it’s quite easy to kill it and get on with other things. My favorite method is to add the Force Quit widget to the gnome panel. This way, all I have to do is click on the widget, click on the misbehaving  window and problem solved.

There’s also the xkill command. Hold down Alt + F2 to bring up the Run dialog, or bring up a terminal, type in xkill ( the mouse pointer should turn into a skull and crossbones) and click on the offending window… it should die immediately.

There’s always the trusty command line option. On a terminal, type

killall application_name

To kill firefox this way, you’d type

killall firefox

The killall command is ‘merciful’ as it allows the offending application to end gracefully. However, it doesn’t always work … some apps are really stubborn. To kill firefox without giving it a chance to clean up, try

kill -9 `pidof firefox` (those are back ticks, people… located on the ~ key)

Of course you could go the long hard way: use the ps aux command to find the pid of the app (let’s say 6849) and do kill -9 6849 but I prefer the easier method. It’s also possible to bring down the entire X server and hope the hung program will die too (in my experience, firefox is immune to this sometimes… it becomes an “uninterruptible” service.) To restart the X Server:

press Ctrl+Alt+Backspace

I haven’t used them before but the magic sysrq keys are quite interesting. Apparently, if you get really desperate, you can talk directly to the kernel. This would be quite useful if your box totally stopped responding and none of the earlier methods worked. They have to be compiled into the kernel first though. To check if they are, do:

cat /boot/config-`uname -r` | grep CONFIG_MAGIC_SYSRQ (again, back ticks)

You should get something like this:


Also, do:

cat /proc/sys/kernel/sysrq

to make sure they are not disabled. You should get


To safely reboot your box without data loss during hangs, this is the method suggested on Wikipedia’s Magic SysRq key page.

  1. Press Ctrl+Alt+F2 to switch to a terminal window. Sometimes, this is not possible.
  2. Press Alt+SysRq+R to get the keyboard
  3. If pressing Ctrl+Alt+F2 before failed, try it again now.
  4. Press Alt+SysRq+S to sync your disks.
  5. Wait for OK or Done message.
  6. Press Alt+SysRq+E to term all processes.
  7. Press Alt+SysRq+I to kill all processes.
  8. Press Alt+SysRq+U to umount all disk drives.
  9. Wait for OK or Done message.
  10. Press Alt+SysRq+B to reboot.

Finally, if all else fails turn off the power to the computer and hope you don’t do any permanent damage to the system. 🙂


  1. Were can i register my new zain number .Please which website can i do that

  2. please i want to register 0262669966

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: