I am running Xvfb now with

-fbdir /some/path and
-extension RANDR

but rgl.snapshot is still not working.

Any other idea? Since I can display the webGL successfully in firefox (so
comes out correct), I assume there should be some way of converting it on
the server side to some (vector) graphic file format?

Thanks
Andreas



On Tue, Sep 10, 2013 at 6:38 PM, Duncan Murdoch <murdoch.duncan@gmail.com>wrote:

> On 10/09/2013 10:58 AM, Andreas Maunz wrote:
>
>> Hi all,
>>
>> I have a shiny app, in which I want to use rgl's snapshot function. I am
>> running Xvfb on my server so that rgl works. I start my shiny app as
>> follows:
>>
>> echo "Checking for Xvfb..."
>> pgrep -U username Xvfb > /dev/null 2>&1
>>
>> if [ "$?" -gt 0 ]; then
>>    echo "Starting Xvfb..."
>>    Xvfb :7 -screen 0 1280x1024x24 &
>>    sleep 2
>> fi
>>
>> echo "...starting shiny"
>> export DISPLAY=":7"; R --no-save --no-restore -e "library('shiny');
>> runApp('/path/to/app', port=8101)"
>>
>> In the app, I do plot3d(), generate webGL and send the results to the
>> browser. But the rgl.snapshot or rgl.postscript functionality do not work,
>> i.e. they produce black or empty images. I assume this is due to Xvfb. Any
>> chance I can create snapshots?
>>
>
> rgl.snapshot requires the X server to maintain a frame buffer that it can
> read.   It looks as though something is going wrong with yours.  I don't
> use a system with Xvfb, so I can't really help, but you could try Googling
> to see if that turns anything up.
>
> rgl.postscript shouldn't need the X server, but it is limited in what it
> can display.
>
> Duncan Murdoch
>
>

	[[alternative HTML version deleted]]

