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 - Wget
- Tar - Tar
- Desktop-file-utils - Desktop-file-utils
- Xorg-xhost - Xorg-xhost (Optional: allowing users in Archbox to access X server)
- Zenity (Optional: for .desktop entry manager GUI) - Zenity (Optional: for .desktop entry manager GUI)
### Installing Archbox ### Installing Archbox
It's pretty easy, just run ```install.sh``` as root. It's pretty easy, just run ```install.sh``` as root.

View File

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