Lines 300-305
detectDE()
Link Here
|
300 |
{ |
300 |
{ |
301 |
if [ x"$KDE_FULL_SESSION" = x"true" ]; then DE=kde; |
301 |
if [ x"$KDE_FULL_SESSION" = x"true" ]; then DE=kde; |
302 |
elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then DE=gnome; |
302 |
elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then DE=gnome; |
|
|
303 |
elif [ x"$XDG_CURRENT_DESKTOP" = x"LXDE" ]; then DE=lxde; |
303 |
elif xprop -root _DT_SAVE_MODE | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=xfce; |
304 |
elif xprop -root _DT_SAVE_MODE | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=xfce; |
304 |
fi |
305 |
fi |
305 |
} |
306 |
} |
Lines 355-360
su_gnome()
Link Here
|
355 |
fi |
356 |
fi |
356 |
} |
357 |
} |
357 |
|
358 |
|
|
|
359 |
su_lxde() |
360 |
{ |
361 |
LXSU=`which beesu 2>/dev/null` |
362 |
if [ $? -ne 0 ] ; then |
363 |
LXSU=`which gksu 2>/dev/null` |
364 |
fi |
365 |
if [ $? -eq 0 ] ; then |
366 |
if [ -z "$user" ] ; then |
367 |
$LXSU -c "$cmd" |
368 |
else |
369 |
$LXSU -u "$user" -c "$cmd" |
370 |
fi |
371 |
|
372 |
if [ $? -eq 0 ]; then |
373 |
exit_success |
374 |
else |
375 |
exit_failure_operation_failed |
376 |
fi |
377 |
else |
378 |
su_generic |
379 |
fi |
380 |
} |
381 |
|
358 |
su_generic() |
382 |
su_generic() |
359 |
{ |
383 |
{ |
360 |
if [ -z "$user" ] ; then |
384 |
if [ -z "$user" ] ; then |
Lines 427-432
case "$DE" in
Link Here
|
427 |
su_gnome |
451 |
su_gnome |
428 |
;; |
452 |
;; |
429 |
|
453 |
|
|
|
454 |
lxde) |
455 |
su_lxde |
456 |
;; |
457 |
|
430 |
generic) |
458 |
generic) |
431 |
su_generic |
459 |
su_generic |
432 |
;; |
460 |
;; |