CefSettings (@NotNull JCefAppConfig config) { CefSettings settings = config.getCefSettings(); settings.windowless_rendering_enabled = isOffScreenRenderingModeEnabled(); settings.log_severity = getLogLevel(); settings.log_file = System.getProperty("ide.browser.jcef.log.path", System.getProperty("user.home") + Platform.current().fileSeparator + "jcef_" + ProcessHandle.current().pid() + ".log"); if (settings.log_file.trim().isEmpty()) settings.log_file = null; //todo[tav] IDEA-260446 & IDEA-260344 However, without proper background the CEF component flashes white in dark themes //settings.background_color = settings.new ColorType(bg.getAlpha(), bg.getRed(), bg.getGreen(), bg.getBlue()); int port = Registry.intValue("ide.browser.jcef.debug.port"); if (ApplicationManager.getApplication().isInternal() && port > 0) { settings.remote_debugging_port = port; } settings.cache_path = ApplicationManager.getApplication().getService(JBCefAppCache.class).getPath().toString(); if (Registry.is("ide.browser.jcef.sandbox.enable")) { LOG.info("JCEF-sandbox is enabled"); settings.no_sandbox = false; if (SystemInfoRt.isWindows) { String sandboxPtr = System.getProperty("jcef.sandbox.ptr"); if (sandboxPtr != null && !sandboxPtr.trim().isEmpty()) { if (isSandboxSupported()) settings.browser_subprocess_path = ""; else { LOG.info("JCEF-sandbox was disabled because current jcef version doesn't support sandbox"); settings.no_sandbox = true; } } else { LOG.info("JCEF-sandbox was disabled because java-process initialized without sandbox"); settings.no_sandbox = true; } } else if (SystemInfoRt.isMac) { ProcessHandle.Info i = ProcessHandle.current().info(); Optional<String> processAppPath = i.command(); if (processAppPath.isPresent() && processAppPath.get().endsWith("/bin/java")) { // Sandbox must be disabled when user runs IDE from debugger (otherwise dlopen will fail) LOG.info("JCEF-sandbox was disabled (to enable you should start IDE from launcher)"); settings.no_sandbox = true; } } else if (SystemInfoRt.isLinux) { String linuxDistrib = readLinuxDistribution(); if ( linuxDistrib != null && (linuxDistrib.contains("debian") || linuxDistrib.contains("centos")) ) { if (Boolean.getBoolean("ide.browser.jcef.sandbox.disable_linux_os_check")) { LOG.warn("JCEF sandbox enabled via VM-option 'disable_linux_os_check', OS: " + linuxDistrib); } else { LOG.info("JCEF sandbox was disabled because of unsupported OS: " + linuxDistrib + ". To skip this check run IDE with VM-option -Dide.browser.jcef.sandbox.disable_linux_os_check=true"); settings.no_sandbox = true; } } } } return settings; }