dennisw wrote:I just ssh -X into my Pi. In other words, I use X forwarding. There shouldn't be any need for a virtual frame buffer or something like xvnc. Please let me know if the following doesn't work for you.
In /etc/ssh/sshd_config on the Pi, change X11Forwarding to yes in order to enable it.
For your PC, ssh -X works from the command line in Linux. In Putty on Windows, set Enable X11 Forwarding in Connection > SSH > X11
This of course works, but is not practical if you want to run automated mathematica scripts that export graphics, which is what I wanted to do.
I will try with tightvncserver, some speedup from xvfb would be nice. However, xvfb also becomes faster if graphics are rendered more than once per session:
Code: Select all
In[1]:= p=DensityPlot[{Sin[Sqrt[x] + Log[y]]}, {x, 0, \[Pi]^2}, {y, 0, E^\[Pi]}]
Out[1]= -Graphics-
In[2]:= Export["testplot.png",p]//AbsoluteTiming
Out[2]= {43.213339, testplot.png}
In[3]:= Export["testplot.png",p]//AbsoluteTiming
Out[3]= {8.626120, testplot.png}
In[4]:= Export["testplot.png",p]//AbsoluteTiming
Out[4]= {8.615019, testplot.png}
In[5]:=
edit: tried with tightvncserver:
Code: Select all
In[1]:= p=DensityPlot[{Sin[Sqrt[x] + Log[y]]}, {x, 0, \[Pi]^2}, {y, 0, E^\[Pi]}]
Out[1]= -Graphics-
In[2]:= Export["testplot.png",p]//AbsoluteTiming
Out[2]= {143.703919, testplot.png}
In[3]:= Export["testplot.png",p]//AbsoluteTiming
Out[3]= {15.838517, testplot.png}
In[4]:= Export["testplot.png",p]//AbsoluteTiming
Out[4]= {4.204656, testplot.png}
In[5]:= Export["testplot.png",p]//AbsoluteTiming
Out[5]= {3.641392, testplot.png}
In[6]:=
It does get better eventually but for the first time xvfb is way faster.