add distro detection to avoid unnecessary crashes

This commit is contained in:
Stefano C. Coronado 2019-12-28 13:36:57 -05:00
parent 036dc9b4c4
commit 835d190320

View file

@ -26,9 +26,16 @@ xephyrpid=$!
if command -v ratpoison; then if command -v ratpoison; then
sleep 1 sleep 1
ratpoison -d :$DNum & ratpoison -d :$DNum &
else # Use the default x window manager installed else # Use the default x window manager installed based on the host
DISPLAY=:$DNum DISPLAY=:$DNum
x-window-manager & distro_id=$(lsb_release -i | awk '{print($3)}')
if [ "${distro_id}" == "Ubuntu" ] || [ "${distro_id}" == "Debian" ]; then
x-window-manager &
else
Xorg & #generic case (Fedora, Arch, etc)
fi
fi fi
windowmanagerpid=$! windowmanagerpid=$!