Chrome on Linux - query the browser to see what tabs are open?

Rory picture Rory · Feb 11, 2011 · Viewed 13k times · Source

I am running Chromium (the open source chrome version) on Ubuntu Linux. Can I write a programme to see what tabs I have open? I would like to write a programme to monitor how much time I'm spending on things. Is there a command line programme, some way to invoke the chromium-browser command, or some dbus incantation that will tell me what tabs I have open and what URL each tab is at?

Answer

Maus picture Maus · Mar 16, 2011

Indeed there is a command line option which can open the door to a running chrome (chromium) process --remote-shell-port. Through this "debugging back-door" you may be able the get the list of open tabs.

UPDATE:

Chrome DevTools is deprecated and not supported anymore since Version >17.0.950.* See WebKit-Protocol manual if the new Debug-Framework provides similar manners to accomplish the task.