Server IP : 13.213.54.232 / Your IP : 216.73.216.30 Web Server : Apache/2.4.52 (Ubuntu) System : Linux ip-172-31-17-110 6.8.0-1029-aws #31~22.04.1-Ubuntu SMP Thu Apr 24 21:16:18 UTC 2025 x86_64 User : www-data ( 33) PHP Version : 7.1.33-67+ubuntu22.04.1+deb.sury.org+1 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /snap/lxd/current/bin/ |
Upload File : |
#!/bin/sh run_cmd() { CMD="$1" shift unset LD_LIBRARY_PATH export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" export HOME="${SNAP_REAL_HOME}" export USER="${USERNAME}" [ -z "${XDG_DATA_HOME:-}" ] && export XDG_DATA_HOME="${HOME}/.local/share/" [ -z "${XDG_CONFIG_HOME:-}" ] && export XDG_CONFIG_HOME="${HOME}/.config/" [ -z "${XDG_STATE_HOME:-}" ] && export XDG_STATE_HOME="${HOME}/.local/state/" exec unshare -U -r chroot "/var/lib/snapd/hostfs/" "${CMD}" "$@" } USERNS=1 [ -e /proc/sys/kernel/unprivileged_userns_clone ] && grep -qxF 0 /proc/sys/kernel/unprivileged_userns_clone && USERNS=0 [ -e /proc/sys/kernel/apparmor_restrict_unprivileged_userns ] && grep -qxF 1 /proc/sys/kernel/apparmor_restrict_unprivileged_userns && USERNS=0 [ -e /proc/sys/kernel/apparmor_restrict_unprivileged_unconfined ] && grep -qxF 1 /proc/sys/kernel/apparmor_restrict_unprivileged_unconfined && USERNS=0 find_and_spawn() { for path in / /usr/ /usr/local/; do if [ -e "/var/lib/snapd/hostfs/${path}bin/remote-viewer" ] || [ -e "${path}sbin/remote-viewer" ]; then run_cmd remote-viewer "${1}" fi if [ -e "/var/lib/snapd/hostfs/${path}bin/spicy" ] || [ -e "${path}sbin/spicy" ]; then run_cmd spicy --uri="${1}" fi done } [ "${USERNS}" = "1" ] && find_and_spawn "${1}" echo "LXD relies on either remote-viewer or spicy to provide VGA console access." echo "Those can't be bundled with the LXD snap and so need to be manually installed." echo "" echo " - \"remote-viewer\" usually comes in a package called virt-viewer" echo " - \"spicy\" usually comes in a package called spice-client-gtk" echo "" echo "Install either of those and they will automatically start." echo "Alternatively you may use another SPICE client using the following URI:" echo " ${1}" if [ "${USERNS}" = "0" ]; then echo "" echo "Your system has unprivileged user namespaces disabled, as a result, " echo "you will need to manually run one a SPICE client with the URI above." exec sleep infinity else while :; do find_and_spawn "${1}" sleep 5s done fi