[sf-lug] Simple Question
rick at linuxmafia.com
Fri Nov 16 11:45:12 PST 2007
Quoting Blake Haggerty (Blake.Haggerty at Sapphire.com):
> My mouse is still controlling the window inside the game only and I
> cant click on anything outside of the game.
Well, that sucks.
> Is there a command to get my mouse out of this window ?
Ctrl-Alt-F1 will take you out of the virtual console running X11
(which is usually #7, such that Ctrl-Alt-F7 take you back into that).
You're now at a virtual console login, and can login to your machine,
putting you at its text-mode command line. (If you loathe text-mode
command lines, you can regard that as fair warning, or whatever.)
At that point, you can run the "ps" command, e.g. "ps auxw", to see
what's running. You can then use kill or killall to kill just the
offending process, after determining (using ps) what you want to kill.
"kill" need you to identify a single process by its process ID (PID)
number. By contrast, "killall" lets you supply the process name,
instead, but with the side-effect (advantage or disadvantage, depending
on your intentions) of killing all such processes.
Without any options specified, "kill" or "killall" does a soft, polite
kill request, by sending it a "TERM" signal, which means "Excuse me, Mr.
Process, would you please consider dying for me?" The TERM signal can
end up getting blocked because of other related processes that aren't
going to die so easily. (That's not quite accurate, but I'm trying to
keep this short.) So, there's also a non-polite signal called KILL that
you can send, instead. Metaphorically, this is saying "You, asshole!
Die! Now! I don't give a damn about child processes that are depending
on you. Expire, pronto." There are several ways to specify KILL rather
than TERM; the most commonly used is the -9 option. Thus:
kill -9 <process ID>
killall -9 <process name>
> ...or is there a command I can hit to just kill the open program?
If you _did_ have the ability to run a program from within X11, what
you'd do is start a program called "xkill". What that does is change
the mouse cursor to a tiny skull-and-crossbones, and the next window you
click on will cause the owning process to get sent a KILL signal (I
> Is there a command I can hit to open all my running processes and then
> select the game to kill it?
By "open" do you mean "list"?
If so, the most obvious way to do that I know of is the method I
describe above, of going to a different virtual console (to get around
your problem of being trapped inside a malfunctioning window in X11),
logging in there, and then using ps and kill/killall.
You didn't say what graphical environment (GNOME, KDE, whatnot) you are
in, nor what you might have attempted _without_ your mouse to activate
your desktop environment or window manager's doohickeys / menus /
whatnot. (I might not be able to advise you with such things, anyway.)
More information about the sf-lug