Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

slanning (5049)

slanning
  (email not shown publicly)
http://search.cpan.org/~slanning/

Scott Lanning is currently working in Amsterdam at a hotel-booking company. The following interviews and commentaries are for entertainment only. The views and opinions expressed therein do not necessarily represent the views of his employer or even himself.

Journal of slanning (5049)

Thursday June 21, 2007
04:03 AM

headless gecko

[ #33566 ]

For several years I've wanted to be able to process HTML documents through a real web browser's HTML renderer (like Gecko in Mozilla/Firefox; one that can handle JavaScript), but without opening up a browser window. This is mainly for testing, since an invisible web browser doesn't really allow you to "browse" much.

Ben Hutchings had pointed me to his VideoLink project (was called WebDVD), where he embeds Mozilla using Xvfb to avoid opening a window. Great, I wanted to do something like that and integrate it with Mozilla::Mechanize (I really need to get a new version released....), but my C++/Mozilla/Xvfb skills weren't up to it (although his code is very nicely written, I still didn't understand how it all worked).

Yesterday I came across a shell script, xvfb-run (apparently packaged in several distros, but I got it with the xvfb package in Ubuntu), that handles all the details of running X clients in a virtual X server. It works, and finally my problem is nearly solved!

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.