Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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...

share|improve this question

migrated from stackoverflow.com Apr 29 '11 at 11:02

This question came from our site for professional and enthusiast programmers.

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

2 Answers 2

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.

share|improve this answer

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!

share|improve this answer
    
Sounds like a too time consuming procedure for now. Thanks for the effort... –  Yotam Jun 29 '11 at 13:18

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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