Is there any way to identify whether a google chrome process is an incognito tab or not?
I couldn't find a single solution to this.
Is there any way to identify whether a google chrome process is an incognito tab or not?
I couldn't find a single solution to this.
Please see https://groups.google.com/a/chromium.org/d/msg/blink-dev/3ElZpfgkSdE/UPahDfCpUFQJ - while there might be hacks that happen to work, they're not guaranteed to, especially from the outside.
Note that the "tabs" extension API allows you to query whether a tab is incognito or not, see https://developer.chrome.com/extensions/tabs . It can also close a tab which will kill the process.
You can also pre-install an extension, see https://support.google.com/chrome/a/answer/188453?hl=en
A one liner that I have used to kill incognito tabs in ubuntu:
ps aux | grep chrom | grep 'disable-databases'| awk '{print $2}' | xargs kill -9
There might be a cleaner way but i have found grepping the process list for all chromium processes, getting the pid for ones with 'disable-databases' and then passing those along to kill -9 works fairly well (so well that I created an alias on my machine for it).
alias kill_incognito="ps aux | grep chrom | grep 'disable-databases'| awk '{print $2}' | xargs kill -9"