Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(387)

Unified Diff: scripts/xdg-screensaver

Issue 7453013: Bring xdg-utils up to date with upstream repository. (Closed) Base URL: http://src.chromium.org/svn/trunk/deps/third_party/xdg-utils/
Patch Set: '' Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « scripts/xdg-open ('k') | scripts/xdg-settings » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/xdg-screensaver
===================================================================
--- scripts/xdg-screensaver (revision 84895)
+++ scripts/xdg-screensaver (working copy)
@@ -392,14 +392,33 @@
# see https://bugs.freedesktop.org/show_bug.cgi?id=34164
unset GREP_OPTIONS
- if [ x"$KDE_FULL_SESSION" = x"true" ]; then DE=kde;
- elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then DE=gnome;
- elif `dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager > /dev/null 2>&1` ; then DE=gnome;
- elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=xfce;
- elif xprop -root 2> /dev/null | grep -i '^xfce_desktop_window' >/dev/null 2>&1; then DE=xfce
+ if [ -n "${XDG_CURRENT_DESKTOP}" ]; then
+ case "${XDG_CURRENT_DESKTOP}" in
+ GNOME)
+ DE=gnome;
+ ;;
+ KDE)
+ DE=kde;
+ ;;
+ LXDE)
+ DE=lxde;
+ ;;
+ XFCE)
+ DE=xfce
+ esac
fi
if [ x"$DE" = x"" ]; then
+ # classic fallbacks
+ if [ x"$KDE_FULL_SESSION" = x"true" ]; then DE=kde;
+ elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then DE=gnome;
+ elif `dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager > /dev/null 2>&1` ; then DE=gnome;
+ elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=xfce;
+ elif xprop -root 2> /dev/null | grep -i '^xfce_desktop_window' >/dev/null 2>&1; then DE=xfce
+ fi
+ fi
+
+ if [ x"$DE" = x"" ]; then
# fallback to checking $DESKTOP_SESSION
case "$DESKTOP_SESSION" in
gnome)
« no previous file with comments | « scripts/xdg-open ('k') | scripts/xdg-settings » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698