add check for X session

This commit is contained in:
root 2016-10-02 23:10:35 +03:00
parent 037ac05e99
commit 0adb4fae32
1 changed files with 5 additions and 0 deletions

View File

@ -13,6 +13,11 @@ if [[ $EUID -ne 0 ]]; then
exit 1
fi
if [ -z "${DISPLAY:-}" ]; then
echo -e "\e[1;31mThe script should be executed inside a X (graphical) session."$transparent""
exit 1
fi
clear
##################################### < CONFIGURATION > #####################################