cat<<'EOF' | sudo tee /usr/local/sbin/refresh-rosetta-binfmt >/dev/null#!/usr/bin/env bashset -euo pipefailfor i in $(seq 1 120); do if [ -x /media/psf/RosettaLinux/rosetta ]; then systemctl restart systemd-binfmt exit 0 fi sleep 1doneecho "Rosetta interpreter not found: /media/psf/RosettaLinux/rosetta" >&2exit 1EOFsudochmod+x/usr/local/sbin/refresh-rosetta-binfmt
cat<<'EOF' | sudo tee /etc/systemd/system/refresh-rosetta-binfmt.service >/dev/null[Unit]Description=Refresh Rosetta binfmt after shared folders are readyAfter=multi-user.target[Service]Type=oneshotExecStart=/usr/local/sbin/refresh-rosetta-binfmt[Install]WantedBy=multi-user.targetEOFsudosystemctldaemon-reload
sudosystemctlenable--nowrefresh-rosetta-binfmt.service
#!/bin/bash."`dirname \"$0\"`/setupEnv.sh"# Set XILINX_VIVADOXILINX_VIVADO=`dirname"$RDI_BINROOT"`exportXILINX_VIVADO
exportRDI_DEPENDENCY="XILINX_VIVADO_HLS:XILINX_HLS"export_RDI_NEEDS_PYTHON=True
exportRDI_USE_JDK11=True
RDI_LAUNCH_MODE="gui"while[$#-gt0];doif["$1"="-mode"]&&[$#-ge2];thenRDI_LAUNCH_MODE="$2"breakfishiftdoneif[-n"${HOME:-}"];thenmkdir-p"$HOME/.Xilinx/Vivado/2022.2/data/layouts"2>/dev/null||truefiexportGDK_BACKEND=${GDK_BACKEND:-x11}exportSWT_GTK3=${SWT_GTK3:-0}exportLIBGL_ALWAYS_SOFTWARE=${LIBGL_ALWAYS_SOFTWARE:-1}if["${XDG_SESSION_TYPE:-}"="x11"];thenexport_JAVA_AWT_WM_NONREPARENTING=0elseexport_JAVA_AWT_WM_NONREPARENTING=1fiexportXLNX_USE_NATIVE_DECORATION=${XLNX_USE_NATIVE_DECORATION:-1}if["$RDI_LAUNCH_MODE"="gui"];thenif[-n"${HOME:-}"];thenrm-f"$HOME/.Xilinx/Vivado/2022.2/data/layouts/application/default.layout"2>/dev/null||truefiexport_VIVADO_STABLE_JAVA_OPTS="-Xint -XX:+UseSerialGC -Dsun.java2d.xrender=false -Dsun.java2d.opengl=false -Dsun.awt.disablegrab=true -Dsun.java2d.uiScale=1.0 -Dawt.useSystemAAFontSettings=on"export_JAVA_OPTIONS="$_VIVADO_STABLE_JAVA_OPTS"exportJAVA_TOOL_OPTIONS="$_VIVADO_STABLE_JAVA_OPTS"exportJDK_JAVA_OPTIONS="$_VIVADO_STABLE_JAVA_OPTS"elseexport_VIVADO_STABLE_JAVA_OPTS="-Dsun.java2d.xrender=false -Dsun.awt.disablegrab=true"[-z"${_JAVA_OPTIONS:-}"]&&export_JAVA_OPTIONS="$_VIVADO_STABLE_JAVA_OPTS"[-z"${JAVA_TOOL_OPTIONS:-}"]&&exportJAVA_TOOL_OPTIONS="$_VIVADO_STABLE_JAVA_OPTS"[-z"${JDK_JAVA_OPTIONS:-}"]&&exportJDK_JAVA_OPTIONS="$_VIVADO_STABLE_JAVA_OPTS"fi# CR-1074520: Disable bmalloc memory allocator and use the system default one # instead. This prevents WebKit from overindulging in virtual memory on high# memory machines. https://trac.webkit.org/wiki/EnvironmentVariablesexportMalloc=1### Launch the loader and specify the executable to launch#### Loader arguments:# -exec -- Name of executable to launch##RDI_PROG=`basename"$0"`"$RDI_BINROOT"/loader-exec$RDI_PROG"$@"