#!/bin/sh
set -eu

# electron-builder's default launcher silently adds --no-sandbox when user
# namespaces are restricted. Keep Chromium's sandbox enabled and let startup
# report an unsupported host configuration instead.
app_dir=${APPDIR:-$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)}
export LD_LIBRARY_PATH="$app_dir/usr/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
# Ozone must be selected before Electron starts, not from the main module.
# Global selection coordinates require X11 (XWayland on Wayland desktops).
exec "$app_dir/luciqa" "$@" --ozone-platform=x11
