Producing PNG on Debian Linux (was the false bug report, Re: [Rd] png output requires X connection (PR#1165))
On Sun, 18 Nov 2001, Dirk Eddelbuettel wrote:
"Brian" == Brian D Ripley <Prof> writes:
Brian> Already done in R-devel:
Thanks!
Brian> NB: on our servers there is an X11 display available to cron jobs.
Hm. I just added x11() to the script snipped of yours:
edd@sonny:~> cat /tmp/R.sh
#!/bin/sh
echo | R -q --no-save <<EOF
bitmap("test.png")
plot(1:10)
graphics.off()
x11()
EOF
but starting this under at(1)
edd@sonny:~> echo /tmp/R.sh | at now
warning: commands will be executed using /bin/sh
job 57 at 2001-11-18 08:31
yields an error:
From: Dirk Eddelbuettel <edd@debian.org>
To: edd@eddelbuettel.com
Subject: Output from your job 57
Date: Sun, 18 Nov 2001 08:31:59 -0600
bitmap("test.png")
plot(1:10)
graphics.off()
x11()
Error in X11(display, width, height, pointsize, gamma, colortype, maxcubesize) : unable to start device X11 Execution halted How does Solaris do this, and how can we get Linux to do the same?
Don't know: suspect it is a permissions / Xauth thing. To be precise,
I've only ever tested my Solaris server (ex my desktop machine).
I tried
auk% cat /tmp/R.sh
#!/bin/sh
echo | R -q --no-save <<EOF
png("/tmp/test.png")
plot(1:10)
graphics.off()
EOF
auk% echo /tmp/R.sh | at now
and it worked and wrote test.png.
Brian
Brian D. Ripley, ripley@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._