Is there a way to snap the currently open tab(s) on Firefox (or any other browser) on Linux?

I have full user access to that machine...

  • 3
    What do you mean by "snap"? – Pekka Apr 28 '11 at 17:38

If by "snapping" you mean transferring one tab from one process on machine A, to another process on machine B, then no, you can't do that.


Here's a strategy:

  1. Get the X window id of the browser window containing the current tab that you want to snap. You can use wmctrl or xdotool for this.

  2. Use ImageMagick's import command to "snap" the currently open tab:

    $ import -windowid $window_id tabNNN.png

  3. Use some scripting to ask the browser to go to the next/previous tab in the list of open tabs. You can use xdotool to simulate the key presses or do a remote connection to the browser (chrome allows you to do this).

  4. Repeat from step 2.

Here's a one liner that captures all open windows in X:

$ for i in `xdotool search .`;do import -windowid $i $i.png;done

Good luck!

  • Sounds like a too time consuming procedure for now. Thanks for the effort... – Yotam Jun 29 '11 at 13:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.