[R] X11 connection error in web cgi mode only

About this list Date view Thread view Subject view Author view Attachment view

From: Adaikalavan Ramasamy (gisar@nus.edu.sg)
Date: Tue 18 Mar 2003 - 00:42:40 EST


Message-id: <024D6AEFCB92CB47BA1085751D184BB80105F22D@MBXSRV03.stf.nus.edu.sg>

Dear all,

I am trying to create a web interface using Perl-CGI to call R plots and
to display them.
The following codes works perfectly fine when I copy and paste into the
console directly or if I save it into script.file and then R --no-save <
script.file producing the graphs.

jpeg("graph.jpeg", width=400, height=400)
plot(rnorm(100))
dev.off()

Now, I put the line system("R --no-save < script.file > log_file") from
inside my cgi and then process it from client side, I get the following
error message:

Error in X11(paste("jpeg::", quality, ":", filename, sep = ""), width,
:
        unable to start device JPEG
In addition: Warning message:
unable to open connection to X11 display`'
Execution halted

Why do I get this error and how can I fix it? Many thanks in advance.

Regards, Adai.

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Tue 01 Jul 2003 - 09:11:25 EST