From ba8a401f4103af52e037b66eb6dcac1658de2e3d Mon Sep 17 00:00:00 2001 From: Srikant Patnaik Date: Fri, 20 Feb 2015 13:40:33 +0530 Subject: Added check for X server running status, this will help password function to switch to ncurses when run from console --- patcher.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/patcher.sh b/patcher.sh index c9d1b4a..a3e737d 100755 --- a/patcher.sh +++ b/patcher.sh @@ -161,8 +161,8 @@ function sudo_access() { sudo -K # The only place 'easybashgui' fails. So adding separate functions for both tty(consoles) # and pts(terminals). If tty not found, it returns 1, and 'zenity' is used -tty | grep tty -if [ $? -eq 1 ]; then + +if [ ! -z $(pidof X) ] ; then while true do -- cgit