Bug#787566: shutdown-at-night: fails to shut the system down if gdm is used
    Wolfgang Schweer 
    wschweer at arcor.de
       
    Tue Jun  2 20:24:04 UTC 2015
    
    
  
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/debian-edu-pkg-team/attachments/20150602/804274f3/attachment.sig>
    
    
More information about the Debian-edu-pkg-team
mailing list