Operating Systems > Linux and UNIX
wine locked my X
voidmain:
emh is right. If you want to kill a process by name you have to use "killall". The kill command requires the PID (process ID number) of the process. If you run a program in wine that isn't behaving properly (it *is* a Windows program you are running) what I usually do is something like this:
$ ps auxwww | grep wine
which might return something like this:
--- Code: ---
--- End code ---
That last process is the grep command I just ran, ignore it. You can see that there are two wine processes running. Their PIDs are "27900" and "27902". You should first try and kill the processes with no special signals so as to try and let the process shut down normally with this command:
$ kill 27900 27902
Run the "ps" command again and see what wine processes are left. Try killing the other wine process. If nothing has changed when you run the kill and "ps" command add the "-9" signal to the kill command:
$ kill -9 27903
If this doesn't kill it then you might need to restart X but it should take care of the problem. You can restart X at the virtual console by:
# telinit 3
# telinit 5
KernelPanic:
Ctrl + Alt + F1
then
killall -9 wine
Usually works for me. Is that a correct way to do it?
voidmain:
Yeah, that's easier, I'm stuck in the old days. Actually you would want to try it without the "-9" first. It will allow the program to try and shut down normally, flushing and closing open file handles etc. Failing that, a "-9" should take care of it. If you are not careful killall might kill more than you want though. kill gives you a little more granularity. You can give killall the "-i" parameter so it will ask you before killing each process. Much better way to do it:
$ killall -i progname
failing that
$ killall -i -9 progname
You might want to look at the man page (man killall) as there are other inetersting and useful options.
"pgrep" and "pkill" are new commands I just ran across that is part of the procps package, see "man pgrep". Actually it appears they've been around for a couple of years now. So behind... But your mileage may vary when trying any of these commands on other *NIX systems. You can be sure "ps" and "kill" will be there.
[ November 21, 2002: Message edited by: void main ]
Navigation
[0] Message Index
[*] Previous page
Go to full version