You could use X Virtual Framebuffer. On Debian, it's the xvfb package. The following is from the package description:
Xvfb provides an X server that can
run on machines with no display
hardware and no physical input
devices. It emulates a dumb
framebuffer using virtual memory. The
primary use of this server was
intended to be server testing, but
other novel uses for it have been
found, including testing clients
against unusual depths and screen
configurations, doing batch processing
with Xvfb as a background rendering
engine, load testing, as an aid to
porting the X server to a new
platform, and providing an unobtrusive
way to run applications that don't
really need an X server but insist on
having one anyway.
This package also contains a
convenience script called xvfb-run
which simplifies the automated
execution of X clients in a virtual
server environment. This convenience
script requires the use of the xauth
program.
More information about X.Org can be
found at:
http://www.X.org
http://xorg.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg
This package is built from the X.org
xserver module.