Make Xorg-xhost optional.

This commit is contained in:
lemniskett 2021-01-20 15:17:45 +07:00
parent 21f8ee644e
commit 0baced681a
2 changed files with 5 additions and 3 deletions

View File

@ -9,7 +9,7 @@ Ever since I'm running some niche distros like Void, Solus, I had a problem find
- Wget
- Tar
- Desktop-file-utils
- Xorg-xhost
- Xorg-xhost (Optional: allowing users in Archbox to access X server)
- Zenity (Optional: for .desktop entry manager GUI)
### Installing Archbox
It's pretty easy, just run ```install.sh``` as root.

View File

@ -17,8 +17,10 @@ asroot(){
storeenv() {
echo "# This will be sourced when entering Archbox" > /tmp/archbox_env
[[ ! -z $WAYLAND_DISPLAY ]] && echo "WAYLAND_DISPLAY=$WAYLAND_DISPLAY" >> /tmp/archbox_env
[[ ! -z $DISPLAY ]] && checkdep xhost && xhost +local: > /dev/null \
&& echo "DISPLAY=$DISPLAY" >> /tmp/archbox_env
if [[ ! -z $DISPLAY ]]; then
hash xhost >/dev/null 2>&1 && xhost +local: > /dev/null
echo "DISPLAY=$DISPLAY" >> /tmp/archbox_env
fi
echo "DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS" >> /tmp/archbox_env
echo "XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR" >> /tmp/archbox_env
}