[nSLUG] MPlayer problem in PCLinuxOS

Jack Warkentin jwark at eastlink.ca
Tue Nov 29 17:43:39 AST 2005

Hi Everyone

Third application.

The message below did not get sent properly - it somehow got 
truncated. Here is what it should have been.

Hi Réjean

On November 23, 2005 12:05 pm, you wrote:

>  2. I am never able to close MPlayer, MPlayer-Video and the Error
>  window. I can minimize them but cannot close them. I can open new
>  ones but they just add up to the previous ones.  
>  Someone told me that if I do a Start=>Run and type Kill and click
>  on an open window I can force a close but it doesn't work. 

Here is a general method of killing processes that will work for *any* 
UNIX-like OS.

First, open a terminal window and read the man pages for the 'ps' and 
'kill' commands to obtain some background.

'ps' lists processes and 'kill' allows you to kill them, if you have 
the necessary permissions.

'ps' has many options that will select which processes to list and 
what format to list them in. I always use the '-e' option to list 
*all* processes, because sometimes the one you want happens to be 
owned by some username other than yourself. Also, the items of 
interest to me are the username, the process id, the parent process 
id and the command used to invoke the process. So I use the command

ps -e -o uname,pid,ppid,cmd c

(The 'c' on the end just provides the name of the command instead of 
the full command line used to start the process.) Note that your 
version of ps may behave slightly differently. In almost all cases, 
though, ps -ef will give you the information you need, and then some.

Once you have the list of processes, look down the list, probably 
towards the end, because the process or processes you want to kill 
will usually be quite recent ones. Use the command name to identify 
which processes are the ones you want to kill. Then check the 
username to see if it is the one by which you are logged in. If it 
is, you can kill the processes using the kill command directly.

For example, here is a partial list obtained by the above ps command 
on my system just now:

root         1     0 init
root         2     1 migration/0
root         3     1 ksoftirqd/0
jcw       9874  7256 acroread
jcw      10549  7256 konsole
jcw      10550 10549 bash
jcw      10632  7256 konsole
jcw      10633 10632 bash
jcw      10902  9813 ispell

Suppose the Acrobat Reader is causing a problem. I would try to kill 
it using

kill 9874

where 9874 is the process id (from the PID column) of the acroread 
process. (acroread is the command used to invoke the Acrobat Reader.)

I then check using ps to see if it has been killed. Sometimes it won't 
be, because the process 'catches' the signal sent by the kill command 
and doesn't terminate itself. In that case,

kill -9 9874

should do the job.

If the process is owned by some user other than you, then use the 'su' 
command to acquire root permissions and then use the above to kill 
the necessary processes.

Hope this helps.



Jack Warkentin, phone 902-404-0457, email jwark at eastlink.ca
39 Inverness Avenue, Halifax, Nova Scotia, Canada, B3P 1X6


More information about the nSLUG mailing list