GP-0: Launch headless scripts in headless mode to avoid macOS Dock

activity (Closes #6859)
This commit is contained in:
Ryan Kurtz 2024-10-11 07:11:32 -04:00
parent 65450ac705
commit 1929645373
3 changed files with 5 additions and 3 deletions

View File

@ -45,7 +45,7 @@ fi
OWNER="$(grep '^wrapper.app.account=' "${CONFIG}" | cut -d '=' -f 2)"
if [ -z "${OWNER}" -o "${OWNER}" = "$(whoami)" ]; then
VMARGS="-DUserAdmin.invocation=$(basename "${SCRIPT_FILE}")"
VMARGS="-DUserAdmin.invocation=$(basename "${SCRIPT_FILE}") -Djava.awt.headless=true"
"${SCRIPT_DIR}"/../support/launch.sh fg jre svrAdmin "${MAXMEM}" "$VMARGS" ghidra.server.ServerAdmin "${CONFIG}" "$@"
else
echo "Running svrAdmin with $SUDO as ${OWNER} ..."

View File

@ -18,7 +18,7 @@ DEBUG_ADDRESS=127.0.0.1:13002
# Limit the # of garbage collection and JIT compiler threads in case many headless
# instances are run in parallel. By default, Java will assign one thread per core
# which does not scale well on servers with many cores.
VMARG_LIST="-XX:ParallelGCThreads=2 -XX:CICompilerCount=2 "
VMARG_LIST="-XX:ParallelGCThreads=2 -XX:CICompilerCount=2 -Djava.awt.headless=true "
# Resolve symbolic link if present and get the directory this script lives in.
# NOTE: "readlink -f" is best but works on Linux only, "readlink" will only work if your PWD

View File

@ -8,6 +8,8 @@
# the physical memory available to the OS. Uncomment MAXMEM setting if non-default value is needed.
#MAXMEM=1G
VMARG_LIST="-Djava.awt.headless=true "
# Resolve symbolic link if present and get the directory this script lives in.
# NOTE: "readlink -f" is best but works on Linux only, "readlink" will only work if your PWD
# contains the link you are calling (which is the best we can do on macOS), and the "echo" is the
@ -15,4 +17,4 @@
SCRIPT_FILE="$(readlink -f "$0" 2>/dev/null || readlink "$0" 2>/dev/null || echo "$0")"
SCRIPT_DIR="${SCRIPT_FILE%/*}"
"${SCRIPT_DIR}"/launch.sh fg jdk Sleigh "$MAXMEM" "" ghidra.pcodeCPort.slgh_compile.SleighCompileLauncher "$@"
"${SCRIPT_DIR}"/launch.sh fg jdk Sleigh "$MAXMEM" "${VMARG_LIST}" ghidra.pcodeCPort.slgh_compile.SleighCompileLauncher "$@"