Thanks for your detailed descriptions! I can now reproduce this, and I have an ugly workaround. I should be able to get a better workaround soon.

To reproduce:

Install the beta. (I did this when it was pushed to me.) It worked fine for me.

Install the previous version, 2.7.11.  Reboot the system.

Now running x11() in R causes the spinning beach ball.

The workaround:

Start R.  The DISPLAY environment variable will show the name something like

[1] "/private/tmp/com.apple.launchd.RuLLnvteCn/org.xquartz:0"

This is a socket, not a regular file.

Delete this, and set DISPLAY to ":0.0":

  unlink(Sys.getenv("DISPLAY"))
  Sys.setenv(DISPLAY=":0.0")

Now x11() is fine.

This is only a workaround. The unlink() is permanent, but setting the environment variable only lasts for the length of the R session. You'll need to enter Sys.setenv(DISPLAY=":0.0") again in future sessions, and I would guess the socket will be recreated the next time you restart the system (or maybe on login).

Duncan Murdoch








On 13/02/2021 4:21 p.m., Richard M. Heiberger wrote:
That is next.  Again a fresh session.


setwd('/Users/rmh/Rwd/')
Sys.setenv(DISPLAY=":0.0")
X11()
xcrun: error: invalid active developer path 
(/Library/Developer/CommandLineTools), missing xcrun at: 
/Library/Developer/CommandLineTools/usr/bin/xcrun
Error in .External2(C_X11, d$display, d$width, d$height, d$pointsize,  :
   unable to start device X11
In addition: Warning messages:
1: In system2("otool", c("-L", shQuote(DSO)), stdout = TRUE) :
   running command ''otool' -L 
'/Library/Frameworks/R.framework/Resources/modules/R_X11.so'' had status 1
2: In X11() : unable to open connection to X11 display ''



and the R session is still alive.


This rasies for me a different question.  Why should I want X11()?

When X11 was working it was very slow, and didn't allow paging back through
previous images.

In favor of X11, I think it uses the display space better.  X11() has better 
size and spacing for xlab, ylab, and main than quartz().  But that isn't a 
strong enough
reason to use it while develkoping a graph.  When I want it to look good,
I go directly to pdf() and get the spacing that I  think looks better.

________________________________________
From: Duncan Murdoch <murdoch.dun...@gmail.com>
Sent: Saturday, February 13, 2021 4:05 PM
To: Richard M. Heiberger; R-SIG-Mac
Subject: [External] Re: [R-SIG-Mac] [External] Re: [External] Please test R 
4.0.4 RC

Have you tried the change to DISPLAY, i.e.

Sys.setenv(DISPLAY=":0.0")

before running X11()?

Duncan Murdoch

On 13/02/2021 3:50 p.m., Richard M. Heiberger wrote:
I tried this.  It made no difference.  Both before and after running
sudo xcode-select —install
I ran (in both cases, in a brand new *R* sessio n)

X11()
xcrun: error: invalid active developer path 
(/Library/Developer/CommandLineTools), missing xcrun at: 
/Library/Developer/CommandLineTools/usr/bin/xcrun


My prior was that the xcode call was irrelevant is that X11() using XQuart 
8.0.3beta
worked with intel R_4.0.3 on the Mac M1.

________________________________________
From: Dr Eberhard W Lisse <e...@lisse.na>
Sent: Saturday, February 13, 2021 3:33 AM
To: Simon Urbanek; R-SIG-Mac; Richard M. Heiberger
Cc: e...@lisse.na
Subject: [External] Re: [R-SIG-Mac] [External] Please test R 4.0.4 RC

that has nothing to do with Xquartz but means you need to install the Command 
line tools

sudo xcode-select —install

—
Sent from Dr Lisse’s iPhone
On 13 Feb 2021, 06:13 +0200, Richard M. Heiberger <r...@temple.edu>, wrote:
Using the intel R_4.0.4RC on the Mac M1.

Based on your recommendation I reinstalled XQuartz 2.7.11 instead of the 
8.0.3beta.
X11() now does not work at all.

X11()
xcrun: error: invalid active developer path 
(/Library/Developer/CommandLineTools), missing xcrun at: 
/Library/Developer/CommandLineTools/usr/bin/xcrun
C-c C-c C-c C-c

Force-Killing XQuartz from the Activity Monitor doesn't help.
I have to Force-kill the R process.

________________________________________
From: R-SIG-Mac <r-sig-mac-boun...@r-project.org> on behalf of Simon Urbanek 
<simon.urba...@r-project.org>
Sent: Friday, February 12, 2021 6:50 PM
To: R-SIG-Mac
Subject: [External] [R-SIG-Mac] Please test R 4.0.4 RC

Dear macOS useRs,

please test the latest R 4.0.4 RC builds from

https://mac.r-project.org/

especially if you are running macOS Big Sur. The known issues introduced by Big 
Sur have been fixed, but I cannot replicate nor test the spurious touchbar 
warning.

Also a reminder to *not* install XQuartz betas even if XQuartz ask you to - 
they are betas for a reason (=unstable) and break things.

Cheers,
Simon

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

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

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



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

Reply via email to