add distro detection to avoid unnecessary crashes
This commit is contained in:
parent
036dc9b4c4
commit
835d190320
1 changed files with 9 additions and 2 deletions
|
@ -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
|
||||||
|
distro_id=$(lsb_release -i | awk '{print($3)}')
|
||||||
|
|
||||||
|
if [ "${distro_id}" == "Ubuntu" ] || [ "${distro_id}" == "Debian" ]; then
|
||||||
x-window-manager &
|
x-window-manager &
|
||||||
|
else
|
||||||
|
Xorg & #generic case (Fedora, Arch, etc)
|
||||||
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
windowmanagerpid=$!
|
windowmanagerpid=$!
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue