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

Side by Side Diff: scripts/xdg-desktop-icon

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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « README.chromium ('k') | scripts/xdg-desktop-menu » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/sh 1 #!/bin/sh
2 #--------------------------------------------- 2 #---------------------------------------------
3 # xdg-desktop-icon 3 # xdg-desktop-icon
4 # 4 #
5 # Utility script to install desktop items on a Linux desktop. 5 # Utility script to install desktop items on a Linux desktop.
6 # 6 #
7 # Refer to the usage() function below for usage. 7 # Refer to the usage() function below for usage.
8 # 8 #
9 # Copyright 2009-2010, Fathi Boudra <fabo@freedesktop.org> 9 # Copyright 2009-2010, Fathi Boudra <fabo@freedesktop.org>
10 # Copyright 2009-2010, Rex Dieter <rdieter@fedoraproject.org> 10 # Copyright 2009-2010, Rex Dieter <rdieter@fedoraproject.org>
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 458
459 #-------------------------------------- 459 #--------------------------------------
460 # Checks for known desktop environments 460 # Checks for known desktop environments
461 # set variable DE to the desktop environments name, lowercase 461 # set variable DE to the desktop environments name, lowercase
462 462
463 detectDE() 463 detectDE()
464 { 464 {
465 # see https://bugs.freedesktop.org/show_bug.cgi?id=34164 465 # see https://bugs.freedesktop.org/show_bug.cgi?id=34164
466 unset GREP_OPTIONS 466 unset GREP_OPTIONS
467 467
468 if [ x"$KDE_FULL_SESSION" = x"true" ]; then DE=kde; 468 if [ -n "${XDG_CURRENT_DESKTOP}" ]; then
469 elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then DE=gnome; 469 case "${XDG_CURRENT_DESKTOP}" in
470 elif `dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/D Bus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager > /dev/nul l 2>&1` ; then DE=gnome; 470 GNOME)
471 elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/nul l 2>&1; then DE=xfce; 471 DE=gnome;
472 elif xprop -root 2> /dev/null | grep -i '^xfce_desktop_window' >/dev/null 2> &1; then DE=xfce 472 ;;
473 KDE)
474 DE=kde;
475 ;;
476 LXDE)
477 DE=lxde;
478 ;;
479 XFCE)
480 DE=xfce
481 esac
482 fi
483
484 if [ x"$DE" = x"" ]; then
485 # classic fallbacks
486 if [ x"$KDE_FULL_SESSION" = x"true" ]; then DE=kde;
487 elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then DE=gnome;
488 elif `dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop /DBus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager > /dev/n ull 2>&1` ; then DE=gnome;
489 elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/n ull 2>&1; then DE=xfce;
490 elif xprop -root 2> /dev/null | grep -i '^xfce_desktop_window' >/dev/null 2>&1; then DE=xfce
491 fi
473 fi 492 fi
474 493
475 if [ x"$DE" = x"" ]; then 494 if [ x"$DE" = x"" ]; then
476 # fallback to checking $DESKTOP_SESSION 495 # fallback to checking $DESKTOP_SESSION
477 case "$DESKTOP_SESSION" in 496 case "$DESKTOP_SESSION" in
478 gnome) 497 gnome)
479 DE=gnome; 498 DE=gnome;
480 ;; 499 ;;
481 LXDE) 500 LXDE)
482 DE=lxde; 501 DE=lxde;
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 rm -f "$x/$basefile" 661 rm -f "$x/$basefile"
643 fi 662 fi
644 done 663 done
645 664
646 ;; 665 ;;
647 esac 666 esac
648 667
649 exit_success 668 exit_success
650 669
651 670
OLDNEW
« no previous file with comments | « README.chromium ('k') | scripts/xdg-desktop-menu » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698