Package: shutdown-at-night
Version: 0.15
Severity: important
Tags: patch

gdm-simple-greeter seems to have been replaced with a special gnome 
session; so the xsession test now fails and the system keeps running.

While the greeter is running, an (empty) directory exists which goes away 
after someone logged in. So this could be used instead for the test.

The patch has been tested and will be committed to git as soon as the 
bug number has been obtained.

-----------------------------

diff --git a/shutdown-at-night b/shutdown-at-night
index 9411014..11a7840 100755
--- a/shutdown-at-night
+++ b/shutdown-at-night
@@ -123,8 +123,9 @@ is_xsession_used() {
         /var/run/xauth/* \
         /run/xauth/*; do
         if [ -e "$s" ] ; then
-            if XAUTHORITY="$s" DISPLAY=:0 xlsclients | egrep -q 
'kdmgreet|lightdm-gtk-greeter|razor-lightdm-greeter|lightdm-kde-greeter|gdm-simple-greeter'
 ; then
-                return 1
+            if [ XAUTHORITY="$s" DISPLAY=:0 xlsclients | egrep -q 
'kdmgreet|lightdm-gtk-greeter|razor-lightdm-greeter|lightdm-kde-greeter' ] \
+               || [ -d /var/run/gdm3/greeter ] ; then
+               return 1
             fi
         fi
     done

-----------------------------

Wolfgang

Attachment: signature.asc
Description: Digital signature

Reply via email to