15

On Ubuntu 12.04 the default Movie Player has hanged on a frame while playing a (faulty?) mkv video. I tried to close it by right click > close but could not terminate it. It also does not start when I try to play a new video.

How can I kill the process from command line?

Wilf
  • 30,732
wbad
  • 461

3 Answers3

23

You should be able to use:

pkill totem

A generally helpful thing to find which processes are hogging the CPU is top: top screenshot then you can press k and type in the PID of the process, and then press Enter twice to kill it;

Another program that can do this is htop: htop screenshot This can also system resources being used, and processes can be killed by selecting them, pressing k, and then pressing Enter. Parent processes can also be found by pressing t to toggle tree view.

Wilf
  • 30,732
7

Easiest method:

killall totem

As is says: this will kill -all- instances named totem.

Alternative:

ps -ef |grep totem
rinzwind  3601  2236 14 21:05 ?        00:00:00 totem

and then kill the process

kill -9 3601

If totem is started as another user you will need sudo.

Rinzwind
  • 309,379
3

You can also use pstree -ps command to get a complete (tree-)list of running processes with sub-processes, like this:

    ├─mission-control(1689)  
    ├─modem-manager(912)  
    ├─mpd(1908)─┬─{mpd}(1909)  
    │           ├─{mpd}(1910)  
    │           ├─{mpd}(1911)  
    │           ├─{mpd}(1912)  
    │           └─{mpd}(1913)  
    ├─nmbd(1858)  
    ├─obex-data-serve(1652)

Then use terminals' search function cmd+shift+f to seek out the process in question, for instance; mpd followed by this command:

kill -9 1908
v2r
  • 9,707