jump to navigation

Unfreezing Your Linux Desktop April 14, 2008

Posted by askgel in Hardware, Linux, System.
Tags: , , , , ,
trackback

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!

[ad]
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

[ad]

Advertisements

Comments»

1. anon - June 5, 2008

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!

2. Mike Tyrell - June 5, 2008

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

3. brodie - July 1, 2008

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


Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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: