MD-Anderson-Bioinformatics / NGCHM-R

An R library for creating Next-Generation Clustered Heat Maps (NG-CHM)
http://bioinformatics.mdanderson.org/main/NG-CHM-V2:Overview
7 stars 3 forks source link

DISPLAY env in R studio #51

Closed marohrdanz closed 6 months ago

marohrdanz commented 6 months ago

The following issue and suggested fix was reported by @bmbroom . Investigate and resolve:

After loading NGCHMSupportFiles, the java process started and made some progress, but soon halted with the error “Can't connect to X11 window server using ':0' as the value of the DISPLAY variable”. This is due to a nasty interaction between the RStudio container setting the DISPLAY environment variable, even though it doesn’t have any display, and the Java environment detecting that DISPLAY is set and trying to contact the X11 server and failing. This bug is not easy to diagnose and fix (Sys.unsetenv(“DISPLAY”) but see below). I don’t think there’s any need to pass DISPLAY down to the Java command. Can you see if there’s a way to not pass it to the Java command? (I don’t think we want to unset it in the actual R environment, in case RStudio is connected to a real X11 display. It could break some other package’s expected behavior.)