Skip to content
Prev 6471 / 63424 Next

Producing PNG on Debian Linux (was the false bug report, Re: [Rd] png output requires X connection (PR#1165))

"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
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?

Dirk