fix bnc#582235
authorAndrea Florio <anubis@linux-y9ev.site>
Tue, 6 Apr 2010 13:02:15 +0000 (15:02 +0200)
committerMichael Andres <ma@suse.de>
Mon, 17 May 2010 13:00:33 +0000 (15:00 +0200)
tools/package-manager/package-manager-su

index 4ddf3b2..e1521f3 100755 (executable)
@@ -301,6 +301,7 @@ detectDE()
     if [ x"$KDE_FULL_SESSION" = x"true" ]; then DE=kde;
     elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then DE=gnome;
     elif xprop -root _DT_SAVE_MODE | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=xfce;
+    elif [ x"$DESKTOP_SESSION" == x"LXDE" ]; then DE=lxde;
     fi
 }
 
@@ -376,6 +377,15 @@ su_xfce()
     fi
 }
 
+su_lxde()
+{
+    if which gnomesu &>/dev/null ; then
+        su_gnome
+    else
+        su_generic
+    fi
+}
+
 [ x"$1" != x"" ] || exit_failure_syntax
 
 user=
@@ -441,6 +451,10 @@ case "$DE" in
     su_xfce
     ;;
 
+    lxde)
+    su_lxde
+    ;;
+
     *)
     [ x"$user" = x"" ] && user=root 
     exit_failure_operation_impossible "no graphical method available for invoking '$cmd' as '$user'"