2020-12-28 05:22:53 +00:00
|
|
|
#!/usr/bin/env bash
|
2020-10-27 06:12:14 +00:00
|
|
|
|
|
|
|
source /etc/archbox.conf
|
2021-01-13 05:47:53 +00:00
|
|
|
source /tmp/archbox_env
|
2020-10-28 16:06:06 +00:00
|
|
|
|
2021-01-13 05:47:53 +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 "
|
2020-10-29 06:07:50 +00:00
|
|
|
|
|
|
|
ENV="$REQ_ENV $ENV_VAR"
|
2020-11-11 03:51:06 +00:00
|
|
|
COMMAND="$@"
|
2021-03-06 05:51:01 +00:00
|
|
|
chroot $CHROOT /bin/su -c "env $ENV $COMMAND" $USER
|