HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //snap/chromium/current/bin/daemon.wrapper
#!/bin/sh

set -e

real_xdg_runtime_dir=$(dirname "${XDG_RUNTIME_DIR}")
real_wayland=${real_xdg_runtime_dir}/${WAYLAND_DISPLAY:-wayland-0}

# Permissions applying to the deepest directory is fine
#shellcheck disable=2174
mkdir -p "$XDG_RUNTIME_DIR" -m 700

ln -sf "${real_wayland}"      "$XDG_RUNTIME_DIR"
ln -sf "${real_wayland}.lock" "$XDG_RUNTIME_DIR"

unset DISPLAY

# Chromium creates a file with a unique name which indicates whether or not the
# requested profile is in-use by some other chromium process. Chromium is
# supposed to clean up after itself, but sometimes this lock file persists.
# Because we are running Chromium as a kiosk, it is safe to manually remove this
# file - the profile should not be in use.
if [ -e "$SNAP_USER_COMMON/chromium/SingletonLock" ]; then
    unlink "$SNAP_USER_COMMON/chromium/SingletonLock"
fi

exec "$@"