Sunday, May 22, 2011

Guide to Closing Programs Without the Power Button (and Workspaces!)

Yep. I see you there. You installed something. Started that program and then got a screen that froze and now you have to hold the power button in until your computer turns off just so you can get back into Linux and try again. I figured I would cover Workspaces and ways to kill programs so that it isn't quite as annoying when one of those programs goes rogue and kills your machine.

First, thing I am going to do is teach you how to switch workspaces in the xserver (GUI) interface by default. This can help you maximize your working area and reduce clutter. You have 4 working areas (NW, NE, SW, and SE) and you start in the top left one. To move from one to the other, you hold down CTRL-ALT and use the directional pad on the keyboard to switch.

The text-based interface works much the same way. You have 6 interfaces that are accessed by holding CTRL-ALT and pressing F1-F6 to switch between the different workspaces. CTRL-ALT-F7 will bring you back to the xserver GUI that you're currently on. This is important to remember when you have a problem with the xserver GUI and need to remedy the issue.

Now, let's cover the issue of closing rogue programs. It might just be an annoying window that you keep clicking close on and the window won't disappear or a full-blown computer stroke. If you lose complete control of your system and you know what caused it, it can usually be very easy to fix.

Scenario: Your calculator went insane and told you pi was equal to 3.15 and then locked up.

What we know about this, is that it's the calculator causing a problem so we're going to use CTRL-ALT-F1 to find the error (I'm going to use terminal for screenshots, it'll look roughly the same) and try to kill the process by typing "top" in the terminal window once you've logged in. This part can be a little tricky and annoying, but not too bad.

I don't see anything in the first list that looks like a calculator, so I'm going to look through the list by using < and > (shift+, and shift+.) to scroll through the pages.

After a little searching, I found it. Now we have to kill the process. The hard part is over, note that my PID is 21852. So we want to press "k" to start to kill the process. You'll then be asked "PID to kill:" type 21852 (replace with your PID). One last prompt will appear saying: Kill PID 21852 with signal [15]: and you type "kill" to finish the process. Now press CTRL-ALT-F7 to return back to the GUI.

No comments:

Post a Comment