2021-03-06 05:51:01 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2021-05-10 06:38:08 +00:00
|
|
|
source /etc/archbox.conf &>/dev/null
|
|
|
|
source /tmp/archbox_env &>/dev/null
|
2021-03-06 05:51:01 +00:00
|
|
|
|
|
|
|
REQ_ENV="DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS "
|
|
|
|
REQ_ENV+="XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR "
|
|
|
|
[[ ! -z $DISPLAY ]] && REQ_ENV+="DISPLAY=$DISPLAY "
|
|
|
|
[[ ! -z $WAYLAND_DISPLAY ]] && REQ_ENV+="WAYLAND_DISPLAY=$WAYLAND_DISPLAY "
|
|
|
|
|
|
|
|
ENV="$REQ_ENV $ENV_VAR"
|
|
|
|
COMMAND="$@"
|
2021-05-10 06:38:08 +00:00
|
|
|
chroot $CHROOT /sbin/env $ENV /bin/su $ARCHBOX_USER
|