On 22/06/2025 19:59, Duncan Murdoch wrote:
On 2025-06-22 2:37 p.m., Carl Witthoft wrote:
Hi,
I'm running into some MacOS - Sequoia problems with XQuartz, and it
occurred to me to ask whether it's actually needed for successful
completion of the command

  >> R CMD check --as-cran [packagename]

That command at some point causes XQuartz to launch -- at least on my
system -- so now I'm wondering if that is normal?


It depends on the package.  Most packages won't need XQuartz.  You could configure R to use it as a default graphics device by setting `options(device=X11)` but normally most packages don't use it.  Your startup script might do that though.

Some packages do use it.  If the package calls X11(), that will open XQuartz.  If it uses the rgl package, it will default to opening XQuartz, but can be told not to.

I use RGL_USE_NULL=true in the environment.

I don't know of other examples, but I wouldn't be surprised if there are some.

The most common user of X11 is package tcltk (with the Tcl/TK distribution which is part of the binary R distribution).

I don't see why launching XQuartz is of itself a problem: it will sit in the doc and only Tk widgets and X11 windows will be visible as part of 'check'. If that is annoying (and it can be when they grab focus), you could use a virtual X11 server: I normally use something like

Xvfb -screen 0 1280x1024x24 -ac :5 &

and the set DISPLAY=:5 when running 'check'.


--
Brian D. Ripley,                  rip...@stats.ox.ac.uk
Emeritus Professor of Applied Statistics, University of Oxford

_______________________________________________
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac

Reply via email to