People,

This command exits the chrome process tree gracefully, in all window managers:

  pkill --oldest chrome

but it is not what I want to do - when Chrome goes mad and the whole system starts grinding to a halt (I know from experience it is Chrome) I want to try and work out what specific Chrome tab or window is the problem. Chrome has its own task manager:

  SHIFT ESC

but you can't kill a window with all its tabs from there.

Using:

  ps aux | grep "beta\/chrome"

seems to indicate individual tabs?

Using:

  xprop _NET_WM_PID

and clicking on the different windows always give the same id.

I wrote the script below using wmctrl and xkill to allow me to kill the Chrome windows in reverse order of creation but killing the first Chrome window kills all Chrome windows. The xkill man page says the "program is very dangerous" and:

  -id resource

This option specifies the X identifier for the resource whose creator is to be aborted.

- so it looks like aborting "creator" gets rid of everything.

Any suggestions about fixing my script to selectively kill single Chrome windows?

Thanks,

Phil.


#!/bin/bash

wins=`wmctrl -l | sort -r`
IFS=$'\n' # bash 4
readarray -t winsarr <<< "$wins"

for win in "${winsarr[@]}"
do
    IFS=' ' read id junk1 junk2 name <<< $win
    echo "$id  $name"
    echo -n "Kill?: "
    read junk
    if [ "$junk" == "Y" ]; then
        xkill -frame -id "$id"
    fi
done


--
Philip Rhoades

PO Box 896
Cowra  NSW  2794
Australia
E-mail:  p...@pricom.com.au
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org

Reply via email to