[NBLUG/talk] Newbie questions :-)

Andrew argonaut at softhome.net
Thu Jan 29 07:46:02 PST 2004


jgarden2000 at juno.com wrote on Wed, 28 Jan 2004 18:23:57 -0800:

> Hi!
> 
> I'm a relatively new Linux convert and former Windows power
> user. I jumped into Linux with both feet about a month ago and
> am having a blast.:-)

Hi, William. Welcome to Linux and our group.

> If a full-screen application (like some of the games) locks up,
> (or at least appears to lock up either because I can't find the
> right keystrokes or it doesn't like my keyboard) how can I
> force-quit if I can't get to xkill? I know how to get back to
> the root console, but don't know what to do next other than try
> going to runlevel 3 and then back to runlevel 5, and to reboot
> if that doesn't work.

[Warning: extreme verbosity ahead, for your benefit (or
frustration), and that of other newbies who may come across this
thread.]

Well, switching runlevels, rebooting, or even force-killing the X
server (as Mark mentioned) is usually overkill. If your keyboard
hasn't locked up, you're golden. First, switch to a text console
by holding down the left CTRL and ALT keys and hitting one of the
"Function" keys (1 through 6 on most Linux systems; 1 through 4
on Knoppix). Log in to that console, if necessary. Then, if you
know the exact name of the locked program (for example "acroread"
or "chromium") and you don't mind killing (force stopping) ALL
instances of that program, you can just type "killall
<program_name>". Now, go back to your X session using CTRL-ALT-F7
(in most Linux installs; CTRL-ALT-F5 in Knoppix) and check that
the locked app is dead and gone. If not, you have to be a little
more forceful. Switch back to the text console and re-issue the
previous killall command, but this time include the "-9" option
with it. That option means "slaughter the app without mercy". The
first "killall" command was nicer; it simply told the app to
"please quit". Switch back to X. The offending app should be
gone. Any other apps you have running should be unaffected.

If, however, you don't know the program name, or you have
multiple instances of a program but only want to kill one of them
(for example, a misbehaving bash shell), then you'll need to use
the "ps" and "kill" commands. ps shows information about the
processes that are currently  running. Back at the text console,
type "ps -A" (some people like to use the very verbose "ps aux").
Look for the name of the offending program (hopefully it's not
too cryptic), using Shift-PageUp to scroll up if necessary. If
you want to kill one instance out of several of a program, you
may have to guess which one it is. Once you find it, get its PID
(Process I.D.) number (the number in the first column, if you use
ps -A) and use that with "kill". For example, if the PID is 123,
you'd type "kill 123". Switch to X and check your program. If
it's still there, switch back and type "kill -9 123". That should
do it.

Now, having said all that, you may be able to switch to another
application while still in X by using keyboard application
switching (like ALT-TAB in MS Windows). This is window
manager-dependent. I use the Sawfish window manager and I can
cycle through running applications by holding down the left
Windows key and hitting TAB. Other window managers are likely to
be different. If you have a terminal running in X, you may be
able to switch to it that way. Then, if you want to use xkill,
just type "xkill" at the prompt.

Finally, if your keyboard is locked, things get a little tougher.
Obviously you can't just switch to another console on that
computer. However, all is not lost IF that machine is networked
with another computer AND that other computer has an SSH (or
telnet) client AND the problematic box is running a SSH server
(or telnet server) AND the problematic box hasn't locked up from
head to toe. Go to the other computer and try connecting to the
sick box. If you can get a shell and log in, you may be able to
kill the offending program from afar and thereby set things
aright. If, however, you're not able to fix the problem, then you
may at least be able to do a proper shutdown and prevent possible
filesystem corruption. SSH is a good thing.

> Second, when I pull up a man page from the console (say, "man
> kill"), how do I get out of it other than just killing the
> console? (Not a good thing if you pull up a man page from the
> root console.)

As Mark said, "q" quits the man program. It'll also get you out
of "more", "less", "info", "top" and a fair number of other
command-line programs. And if that doesn't work, try CTRL-c.

> Finally, if I can't figure out how to bypass my cheap ISPs
> proprietary software, are there any local dial-up services
> under $15/month (we're used to paying $12/month) that support
> Linux and Windows?

Well, it's a little above your price point ($18.95/mo), but the
homegrown ISP 'round here is Sonic.net, and they are very
Linux-friendly.

I hope all that helped.

A.



More information about the talk mailing list