From 0adb4fae3234ad7d5bc698f56a1f631fa935fa46 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 2 Oct 2016 23:10:35 +0300 Subject: [PATCH] add check for X session --- fluxion | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fluxion b/fluxion index 1e9bc2b..5654834 100755 --- a/fluxion +++ b/fluxion @@ -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 > #####################################