April 14, 2008 | In: Hardware, Linux, System

Unfreezing Your Linux Desktop

A friend of mine writes “…when I open some heavy sites with Firefox, my Ubuntu desktop gets freeze. I can’t close the Firefox so I find no other way than to restart my system. Aren’t there any other ways to unfreeze the system without restarting?”
Yes there are!


The most efficient way to unfreeze your system is to be patience. Don’t try to open other applications, when your system is not responding. Don’t press unnecessary keys. Go have a cup of coffee, get fresh and get back. You system might have already been unfrozen or a dialog box might be waiting for you to click on that Force Quit button. (I promise you won’t be greeted by BSOD!)

If you don’t have much patience or your system just can’t unfreeze automatically, then follow these steps:

  1. Hit Caps Lock or Num Lock keys to see if your keyboard is responding, if it isn’t than you’re out of luck.
  2. Press Ctrl+Alt+F2, you will be taken to a black&white terminal window. It will ask you for your username and password.
  3. Type the following command to get the PID (process ID) of the program that is not responding (in this example Firefox)
    ps -A | grep firefox
  4. It will display you the PID of firefox. You should get at least two PIDs something similar to:
    5961 ? 00:00:00 firefox-2
    5977 ? 00:01:12 firefox-2-bin
  5. Now issue the following command to kill the non-responding firefox (its PID is 5977 in this example)
    kill 5977
    [update: If you hate working with numbers you can also kill the non-responding program by issuing: killall firefox-2-bin]
  6. Re-check that you have successfully killed the non-responding program:
    ps -A | grep firefox
  7. If it doesn’t show you anything, then you are done. To exit and get back to your Graphical System, press Ctrl+Alt+F7

No related posts.

5 Responses to Unfreezing Your Linux Desktop

Avatar

anon

June 5th, 2008 at 12:52 pm

you can run pidof to get the pid of a program too -
pidof firefox

and if something won’t die you can run kill with the 9 option to make sure it’s killed -
kill -9 xxxx

the main difference between killall and using the pid is killall kills all running instances of the program

you can run xkill too and click on the program you want to kill. ctrl-c cancels it

pkill firefox will kill everything with firefox in the name, so if you can’t remember firefox-bin, but know it has firefox in the name you can use that, but you have to be careful incase you kill stuff you don’t want to!

Avatar

Mike Tyrell

June 5th, 2008 at 6:29 pm

hey there I am a new user
cant you just type in terminal killall firefox-bin ?
it works for me

Avatar

brodie

July 1st, 2008 at 4:15 am

you are my hero. i’ve had issues in the past where the ctrl-alt-backspace doesn’t work and I can never remember the alt-sysrq combo. this is much easier, thank you

Avatar

bob

October 15th, 2008 at 8:35 am

for i in `ps -ef | grep firefox | grep -v grep | awk ‘{ptint $2}’`; do kill $i; done

Avatar

Chady

October 26th, 2008 at 3:46 am

Compiz has some issues on my system too sometimes.
It locks up the desktop, the mouse moves, but the keyboard doesn’t work and the desktop is frozen.
The course of action I take is to ssh in from another machine and kill/restart compiz.
You’re out of luck if you don’t have another machine on the same network though.

Comment Form

Categories

Send Your Tips

If you have any Tips you like to share, send an email to tips@quicktweaks.com

Your Ad Here

Looking for a place to put your ad? You have come to the right place. We have this place empty just to hold your ads.

Tweaks by Dates

April 2008
M T W T F S S
    Aug »
 123456
78910111213
14151617181920
21222324252627
282930