Hello community,

here is the log from the commit of package xdg-utils for openSUSE:Factory 
checked in at 2017-06-02 10:29:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/xdg-utils (Old)
 and      /work/SRC/openSUSE:Factory/.xdg-utils.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "xdg-utils"

Fri Jun  2 10:29:49 2017 rev:45 rq:497767 version:20170508

Changes:
--------
--- /work/SRC/openSUSE:Factory/xdg-utils/xdg-utils.changes      2016-11-16 
13:46:00.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.xdg-utils.new/xdg-utils.changes 2017-06-02 
10:29:51.445364654 +0200
@@ -1,0 +2,15 @@
+Tue May 23 09:30:35 UTC 2017 - jsl...@suse.com
+
+- Update to version 20170508:
+  * xdg-open: Add "chromium" to fallback browsers
+  * changelog for prior commit
+  * xdg-mime: fails on encountering a list for x-scheme-handler (BR44163)
+  * common: implement vendor dirs in desktop_file_to_binary (BR44163)
+  * Add better support for Enlightenment and LXQt (BR98561)
+  * xdg-screensaver: Restore previous X11 screensaver timeout (BR#98509)
+  * adjust version for release/tag
+- removed common-vendor-dirs-in-desktop_to_binary.patch
+- removed fix-enlightenment-lxqt-support.patch
+- removed xdg-mime-return-existing-desktop-files.patch
+
+-------------------------------------------------------------------

Old:
----
  common-vendor-dirs-in-desktop_to_binary.patch
  fix-enlightenment-lxqt-support.patch
  xdg-mime-return-existing-desktop-files.patch
  xdg-utils-20160610.tar.xz

New:
----
  _servicedata
  xdg-utils-20170508.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ xdg-utils.spec ++++++
--- /var/tmp/diff_new_pack.4WDmXT/_old  2017-06-02 10:29:52.241252196 +0200
+++ /var/tmp/diff_new_pack.4WDmXT/_new  2017-06-02 10:29:52.241252196 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           xdg-utils
-Version:        20160610
+Version:        20170508
 Release:        0
 Summary:        Utilities to uniformly interface desktop environments
 License:        MIT
@@ -29,13 +29,8 @@
 Patch0:         install-some-more-scripts.diff
 # PATCH-FIX-UPSTREAM xdg-terminal-fix-gsettings.patch fdo#93231 
roni...@gmail.com
 Patch1:         xdg-terminal-fix-gsettings.patch
-# PATCH-FIX-UPSTREAM fix-enlightenment-support.patch fdo#88280 
si...@simotek.net
-Patch2:         fix-enlightenment-lxqt-support.patch
 # PATCH-FIX-UPSTREAM xdg-terminal-fix-terminal--x-arg.patch fdo#93231 
sor.ale...@meowr.ru -- https://bugs.freedesktop.org/show_bug.cgi?id=93231#c5
 Patch3:         xdg-terminal-fix-terminal--x-arg.patch
-# PATCH-FIX-UPSTREAM (2 patches) xdg-mime / xdg-open generic implementations 
only return 1 item sfl...@suse.de (boo#979265)
-Patch4:         common-vendor-dirs-in-desktop_to_binary.patch
-Patch5:         xdg-mime-return-existing-desktop-files.patch
 BuildRequires:  make
 # for xmlto to be able to generate text from html
 BuildRequires:  w3m
@@ -72,10 +67,7 @@
 %setup -q
 %patch0 -p1
 %patch1 -p1
-%patch2 -p1
 %patch3 -p1
-%patch4 -p1
-%patch5 -p1
 
 %build
 %configure

++++++ _service ++++++
--- /var/tmp/diff_new_pack.4WDmXT/_old  2017-06-02 10:29:52.277247110 +0200
+++ /var/tmp/diff_new_pack.4WDmXT/_new  2017-06-02 10:29:52.277247110 +0200
@@ -1,13 +1,14 @@
 <services>
-  <service mode="localonly" name="tar_scm">
+  <service mode="disabled" name="tar_scm">
     <param name="url">git://anongit.freedesktop.org/xdg/xdg-utils</param>
+    <param name="changesgenerate">enable</param>
     <param name="scm">git</param>
     <param name="filename">xdg-utils</param>
-    <param name="versionformat">%ad</param>
+    <param name="versionformat">%cd</param>
   </service>
-  <service mode="localonly" name="recompress">
+  <service mode="disabled" name="recompress">
     <param name="file">*.tar</param>
     <param name="compression">xz</param>
   </service>
-  <service mode="localonly" name="set_version"/>
+  <service mode="disabled" name="set_version"/>
 </services>

++++++ _servicedata ++++++
<servicedata>
<service name="tar_scm">
                <param 
name="url">git://anongit.freedesktop.org/xdg/xdg-utils</param>
              <param 
name="changesrevision">fb9ee8c69932feb716ad4db793a7941dd06b345c</param></service></servicedata>++++++
 xdg-terminal-fix-terminal--x-arg.patch ++++++
--- /var/tmp/diff_new_pack.4WDmXT/_old  2017-06-02 10:29:52.317241459 +0200
+++ /var/tmp/diff_new_pack.4WDmXT/_new  2017-06-02 10:29:52.317241459 +0200
@@ -1,3 +1,9 @@
+From: sor.ale...@meowr.ru
+Subject: Fixes -x argument, which is the default for {gnome,mate}-terminal
+References: fdo#93231
+
+---
+
 --- a/scripts/xdg-terminal.in
 +++ b/scripts/xdg-terminal.in
 @@ -65,11 +65,17 @@ terminal_gnome()

++++++ xdg-utils-20160610.tar.xz -> xdg-utils-20170508.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xdg-utils-20160610/ChangeLog 
new/xdg-utils-20170508/ChangeLog
--- old/xdg-utils-20160610/ChangeLog    2016-06-10 14:27:03.000000000 +0200
+++ new/xdg-utils-20170508/ChangeLog    2017-05-08 14:34:29.000000000 +0200
@@ -1,4 +1,21 @@
-=== xdg-utils 1.1.2 (unreleased) ===
+=== xdg-utils 1.1.3 ===
+
+=== xdg-utils 1.1.2 ===
+
+2017-02-28 Rex Dieter <rdie...@fedoraproject.org>
+   * xdg-open: Add "chromium" to fallback browsers (BR99366)
+   * xdg-mime: fails on encountering a list for x-scheme-handler (BR44163)
+   * xdg-screensaver: Restore previous X11 screensaver timeout (BR#98509)
+
+2016-12-12 Rex Dieter <rdie...@fedoraproject.org>
+   * Add gio tool support (BR99063)
+
+2016-11-23 Rex Dieter <rdie...@fedoraproject.org>
+   * xdg-open/xdg-email: add flatpack support (BR98824)
+
+2016-08-25 Simon Lees <sfl...@suse.de>
+   * Add support for LXQt
+   * Add enlightenment to xdg-email, xdg-settings
 
 2016-06-10 Rex Dieter <rdie...@fedoraproject.org>
    * xdg-open: prefer open_generic_xdg_x_scheme_handler over open_envvar 
(BR96472)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xdg-utils-20160610/autotests/t-xdg-open.sh 
new/xdg-utils-20170508/autotests/t-xdg-open.sh
--- old/xdg-utils-20160610/autotests/t-xdg-open.sh      2016-06-10 
14:27:03.000000000 +0200
+++ new/xdg-utils-20170508/autotests/t-xdg-open.sh      2017-05-08 
14:34:29.000000000 +0200
@@ -39,17 +39,28 @@
     assert_run textedit "$LABDIR/$1"
 }
 
-test_that_it opens a URL with gvfs-open in GNOME 2, 3, and Cinnamon
+test_that_it opens a URL with "gio open" in recent GNOME 3, and Cinnamon
+mock "gio open"
+test_open_url gnome3 "gio open"
+test_open_url cinnamon "gio open"
+
+test_that_it opens a URL with gvfs-open if "gio open" is missing in GNOME 3, \
+             GNOME 2, and Cinnamon
+mock_missing "gio open"
+mock gvfs-open
 test_open_url gnome3 gvfs-open
 test_open_url gnome2 gvfs-open
 test_open_url cinnamon gvfs-open
 
-test_that_it opens a URL with gnome-open if gvfs-open is missing in GNOME 2
+test_that_it opens a URL with gnome-open if "gio open" and gvfs-open are \
+             missing in GNOME 2
+mock_missing "gio open"
 mock_missing gvfs-open
 test_open_url gnome2 gnome-open
 
-test_that_it opens a URL with the generic method if gvfs-open is missing \
-             in GNOME 3 and Cinnamon
+test_that_it opens a URL with the generic method if "gio open" and gvfs-open \
+             are missing in GNOME 3, and Cinnamon
+mock_missing "gio open"
 mock_missing gvfs-open
 mock gnome-open
 mock_desktop_file mosaic %u
@@ -57,8 +68,9 @@
 test_open_url gnome3 mosaic
 test_open_url cinnamon mosaic
 
-test_that_it opens a URL with the generic method if gvfs-open and gnome-open \
-             are missing in GNOME 2
+test_that_it opens a URL with the generic method if "gio open", gvfs-open and \
+             gnome-open are missing in GNOME 2
+mock_missing "gio open"
 mock_missing gvfs-open
 mock_missing gnome-open
 mock_desktop_file mosaic %u
@@ -77,7 +89,9 @@
 test_that_it opens a URL with gvfs-open in MATE
 test_open_url mate gvfs-open
 
-test_that_it opens a URL with mate-open if gvfs-open is missing in MATE
+test_that_it opens a URL with mate-open if "gio open" and gvfs-open are \
+             missing in MATE
+mock_missing "gio open"
 mock_missing gvfs-open
 test_open_url mate mate-open
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xdg-utils-20160610/scripts/xdg-copy.in 
new/xdg-utils-20170508/scripts/xdg-copy.in
--- old/xdg-utils-20160610/scripts/xdg-copy.in  2016-06-10 14:27:03.000000000 
+0200
+++ new/xdg-utils-20170508/scripts/xdg-copy.in  2017-05-08 14:34:29.000000000 
+0200
@@ -43,7 +43,9 @@
 
 copy_gnome()
 {
-    if gvfs-copy --help 2>/dev/null 1>&2; then
+    if gio help copy 2>/dev/null 1>&2; then
+        gio copy "$1" "$2"
+    elif gvfs-copy --help 2>/dev/null 1>&2; then
         gvfs-copy "$1" "$2"
     else
         gnomevfs-copy "$1" "$2"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xdg-utils-20160610/scripts/xdg-email.in 
new/xdg-utils-20170508/scripts/xdg-email.in
--- old/xdg-utils-20160610/scripts/xdg-email.in 2016-06-10 14:27:03.000000000 
+0200
+++ new/xdg-utils-20170508/scripts/xdg-email.in 2017-05-08 14:34:29.000000000 
+0200
@@ -144,7 +144,10 @@
         run_thunderbird "$client" "$1"
     fi
 
-    if gvfs-open --help 2>/dev/null 1>&2; then
+    if gio help open 2>/dev/null 1>&2; then
+        DEBUG 1 "Running gio open \"$1\""
+        gio open "$1"
+    elif gvfs-open --help 2>/dev/null 1>&2; then
         DEBUG 1 "Running gvfs-open \"$1\""
         gvfs-open "$1"
     else
@@ -168,7 +171,10 @@
         run_thunderbird "$client" "$1"
     fi
 
-    if gvfs-open --help 2>/dev/null 1>&2; then
+    if gio help open 2>/dev/null 1>&2; then
+        DEBUG 1 "Running gio open \"$1\""
+        gio open "$1"
+    elif gvfs-open --help 2>/dev/null 1>&2; then
         DEBUG 1 "Running gvfs-open \"$1\""
         gvfs-open "$1"
     else
@@ -213,6 +219,21 @@
     exit_failure_operation_failed
 }
 
+open_flatpak()
+{
+    gdbus call --session \
+        --dest org.freedesktop.portal.Desktop \
+        --object-path /org/freedesktop/portal/desktop \
+        --method org.freedesktop.portal.OpenURI.OpenURI \
+        "" "$1" {}
+
+    if [ $? -eq 0 ]; then
+        exit_success
+    else
+        exit_failure_operation_failed
+    fi
+}
+
 open_generic()
 {
     local client
@@ -459,7 +480,11 @@
     open_xfce "${mailto}"
     ;;
 
-    generic)
+    flatpak)
+    open_flatpak "$url"
+    ;;
+
+    generic|lxqt|enlightenment)
     open_generic "${mailto}"
     ;;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xdg-utils-20160610/scripts/xdg-mime.in 
new/xdg-utils-20170508/scripts/xdg-mime.in
--- old/xdg-utils-20160610/scripts/xdg-mime.in  2016-06-10 14:27:03.000000000 
+0200
+++ new/xdg-utils-20170508/scripts/xdg-mime.in  2017-05-08 14:34:29.000000000 
+0200
@@ -75,7 +75,10 @@
 
 info_gnome()
 {
-    if gvfs-info --help 2>/dev/null 1>&2; then
+    if gio help info 2>/dev/null 1>&2; then
+        DEBUG 1 "Running gio info \"$1\""
+        gio info "$1" 2> /dev/null | grep standard::content-type | cut -d' ' 
-f4
+    elif gvfs-info --help 2>/dev/null 1>&2; then
         DEBUG 1 "Running gvfs-info \"$1\""
         gvfs-info "$1" 2> /dev/null | grep standard::content-type | cut -d' ' 
-f4
     elif gnomevfs-info --help 2>/dev/null 1>&2; then
@@ -372,8 +375,17 @@
     }
 ' "$mimeapps_list" | cut -d ';' -f 1)
             if [ -n "$result" ]; then
-                echo "$result"
-                exit_success
+                # $result could be a ; separated list of .desktop files
+                # use the first on the system
+                IFS=\;
+                for app in $result; do
+                    IFS="$oldifs"
+                    exists=$(desktop_file_to_binary "$app")
+                    if [ -n "$exists" ]; then
+                        echo "$app"
+                        exit_success
+                    fi
+                done
             fi
         fi
     done
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xdg-utils-20160610/scripts/xdg-open.in 
new/xdg-utils-20170508/scripts/xdg-open.in
--- old/xdg-utils-20160610/scripts/xdg-open.in  2016-06-10 14:27:03.000000000 
+0200
+++ new/xdg-utils-20170508/scripts/xdg-open.in  2017-05-08 14:34:29.000000000 
+0200
@@ -144,7 +144,9 @@
 
 open_gnome3()
 {
-    if gvfs-open --help 2>/dev/null 1>&2; then
+    if gio help open 2>/dev/null 1>&2; then
+        gio open "$1"
+    elif gvfs-open --help 2>/dev/null 1>&2; then
         gvfs-open "$1"
     else
         open_generic "$1"
@@ -159,7 +161,9 @@
 
 open_gnome()
 {
-    if gvfs-open --help 2>/dev/null 1>&2; then
+    if gio help open 2>/dev/null 1>&2; then
+        gio open "$1"
+    elif gvfs-open --help 2>/dev/null 1>&2; then
         gvfs-open "$1"
     elif gnome-open --help 2>/dev/null 1>&2; then
         gnome-open "$1"
@@ -176,7 +180,9 @@
 
 open_mate()
 {
-    if gvfs-open --help 2>/dev/null 1>&2; then
+    if gio help open 2>/dev/null 1>&2; then
+        gio open "$1"
+    elif gvfs-open --help 2>/dev/null 1>&2; then
         gvfs-open "$1"
     elif mate-open --help 2>/dev/null 1>&2; then
         mate-open "$1"
@@ -195,6 +201,8 @@
 {
     if exo-open --help 2>/dev/null 1>&2; then
         exo-open "$1"
+    elif gio help open 2>/dev/null 1>&2; then
+        gio open "$1"
     elif gvfs-open --help 2>/dev/null 1>&2; then
         gvfs-open "$1"
     else
@@ -223,6 +231,21 @@
     fi
 }
 
+open_flatpak()
+{
+    gdbus call --session \
+        --dest org.freedesktop.portal.Desktop \
+        --object-path /org/freedesktop/portal/desktop \
+        --method org.freedesktop.portal.OpenURI.OpenURI \
+        "" "$1" {}
+
+    if [ $? -eq 0 ]; then
+        exit_success
+    else
+        exit_failure_operation_failed
+    fi
+}
+
 #-----------------------------------------
 # Recursively search .desktop file
 
@@ -392,7 +415,7 @@
     if [ x"$BROWSER" = x"" ]; then
         BROWSER=www-browser:links2:elinks:links:lynx:w3m
         if has_display; then
-            
BROWSER=x-www-browser:firefox:iceweasel:seamonkey:mozilla:epiphany:konqueror:chromium-browser:google-chrome:$BROWSER
+            
BROWSER=x-www-browser:firefox:iceweasel:seamonkey:mozilla:epiphany:konqueror:chromium:chromium-browser:google-chrome:$BROWSER
         fi
     fi
 
@@ -488,7 +511,7 @@
     open_xfce "$url"
     ;;
 
-    lxde)
+    lxde|lxqt)
     open_lxde "$url"
     ;;
 
@@ -504,6 +527,10 @@
     open_darwin "$url"
     ;;
 
+    flatpak)
+    open_flatpak "$url"
+    ;;
+
     generic)
     open_generic "$url"
     ;;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xdg-utils-20160610/scripts/xdg-screensaver.in 
new/xdg-utils-20170508/scripts/xdg-screensaver.in
--- old/xdg-utils-20160610/scripts/xdg-screensaver.in   2016-06-10 
14:27:03.000000000 +0200
+++ new/xdg-utils-20170508/scripts/xdg-screensaver.in   2017-05-08 
14:34:29.000000000 +0200
@@ -376,16 +376,29 @@
     esac
 }
 
+xset_screensaver_timeout()
+{
+  xset q | sed '/^Screen Saver:/,/^[^ ]/ { s/.*timeout: *\([0-9]*\).*/\1/; t 
}; d'
+}
+
 screensaver_xserver()
 {
     case "$1" in
         suspend)
-        xset s off > /dev/null
+        timeout=`xset_screensaver_timeout`
+        if [ "$timeout" -gt 0 ]; then
+            echo "$timeout" > "$screensaver_file.xset"
+            xset s off > /dev/null
+        fi
         result=$?
         ;;
 
         resume)
-        xset s default > /dev/null
+        if [ -f "$screensaver_file.xset" ] ; then
+            value=`cat "$screensaver_file.xset"`
+            xset s $value > /dev/null
+            rm -f "$screensaver_file.xset"
+        fi
         result=$?
         ;;
 
@@ -400,7 +413,7 @@
         ;;
 
         status)
-        timeout=`xset q | sed '/^Screen Saver:/,/^[^ ]/ { s/.*timeout: 
*\([0-9]*\).*/\1/; t }; d'`
+        timeout=`xset_screensaver_timeout`
         result=$?
         if [ "$timeout" -gt 0 ]; then
             echo "enabled"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xdg-utils-20160610/scripts/xdg-settings.in 
new/xdg-utils-20170508/scripts/xdg-settings.in
--- old/xdg-utils-20160610/scripts/xdg-settings.in      2016-06-10 
14:27:03.000000000 +0200
+++ new/xdg-utils-20170508/scripts/xdg-settings.in      2017-05-08 
14:34:29.000000000 +0200
@@ -852,7 +852,7 @@
     dispatch_specific xfce "$@"
     ;;
 
-    generic)
+    generic|lxqt|enlightenment)
     dispatch_specific generic "$@"
     ;;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xdg-utils-20160610/scripts/xdg-su.in 
new/xdg-utils-20170508/scripts/xdg-su.in
--- old/xdg-utils-20160610/scripts/xdg-su.in    2016-06-10 14:27:03.000000000 
+0200
+++ new/xdg-utils-20170508/scripts/xdg-su.in    2017-05-08 14:34:29.000000000 
+0200
@@ -78,6 +78,49 @@
     fi
 }
 
+su_lxqt()
+{
+    LXQTSU=`which lxqt-sudo 2>/dev/null`
+    if [ $? -eq 0 ] ; then
+        if [ -z "$user" ] ; then
+             # -s option runs as su rather then sudo
+             $LXQTSU -s "$cmd"
+        else
+             # lxqt-sudo does not support specifying a user
+             su_generic
+        fi
+
+        if [ $? -eq 0 ]; then
+            exit_success
+        else
+            exit_failure_operation_failed
+        fi
+    else
+        su_generic
+    fi
+}
+
+su_enlightenment()
+{
+# Enlightenment doesn't have any reasonably working su/sudo graphical interface
+# but terminology works as a drop in replacement for xterm and has a matching 
theme
+    if which terminology >/dev/null ; then
+        if [ -z "$user" ] ; then
+            terminology -g 60x5 -T "xdg-su: $cmd" -e "su -c '$cmd'"
+        else
+            terminology -g 60x5 -T "xdg-su: $cmd" -e "su -c '$cmd' '$user'"
+        fi
+
+        if [ $? -eq 0 ]; then
+            exit_success
+        else
+            exit_failure_operation_failed
+        fi
+    else
+        su_generic
+    fi
+}
+
 su_generic()
 {
     if [ -z "$user" ] ; then
@@ -167,6 +210,14 @@
     su_xfce
     ;;
 
+    lxqt)
+    su_lxqt
+    ;;
+
+    enlightenment)
+    su_enlightenment
+    ;;
+
     *)
     [ x"$user" = x"" ] && user=root
     exit_failure_operation_impossible "no graphical method available for 
invoking '$cmd' as '$user'"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xdg-utils-20160610/scripts/xdg-terminal.in 
new/xdg-utils-20170508/scripts/xdg-terminal.in
--- old/xdg-utils-20160610/scripts/xdg-terminal.in      2016-06-10 
14:27:03.000000000 +0200
+++ new/xdg-utils-20170508/scripts/xdg-terminal.in      2017-05-08 
14:34:29.000000000 +0200
@@ -176,6 +176,32 @@
     fi
 }
 
+terminal_lxqt()
+{
+    if which qterminal &>/dev/null; then
+        if [ x"$1" = x"" ]; then
+            qterminal
+        else
+            qterminal -e "$1"
+        fi
+    else
+        terminal_generic "$1"
+    fi
+}
+
+terminal_enlightenment()
+{
+    if which terminology &>/dev/null; then
+        if [ x"$1" = x"" ]; then
+            terminology
+        else
+            terminology -e "$1"
+        fi
+    else
+        terminal_generic "$1"
+    fi
+}
+
 #[ x"$1" != x"" ] || exit_failure_syntax
 
 command=
@@ -232,6 +258,14 @@
     terminal_lxde "$command"
     ;;
 
+    lxqt)
+    terminal_lxqt "$command"
+    ;;
+
+    enlightenment)
+    terminal_enlightenment "$command"
+    ;;
+
     generic)
     terminal_generic "$command"
     ;;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xdg-utils-20160610/scripts/xdg-utils-common.in 
new/xdg-utils-20170508/scripts/xdg-utils-common.in
--- old/xdg-utils-20160610/scripts/xdg-utils-common.in  2016-06-10 
14:27:03.000000000 +0200
+++ new/xdg-utils-20170508/scripts/xdg-utils-common.in  2017-05-08 
14:34:29.000000000 +0200
@@ -50,7 +50,6 @@
 
 #-------------------------------------------------------------
 # map a .desktop file to a binary
-## FIXME: handle vendor dir case
 desktop_file_to_binary()
 {
     
search="${XDG_DATA_HOME:-$HOME/.local/share}:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}"
@@ -58,14 +57,33 @@
     IFS=:
     for dir in $search; do
         unset IFS
-        [ "$dir" ] && [ -d "$dir/applications" ] || continue
-        file="$dir/applications/$desktop"
-        [ -r "$file" ] || continue
-        # Remove any arguments (%F, %f, %U, %u, etc.).
-        command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | 
first_word`"
-        command="`which "$command"`"
-        readlink -f "$command"
-        return
+        [ "$dir" ] && [ -d "$dir/applications" ] || [ -d "$dir/applnk" ] || 
continue
+        # Check if desktop file contains -
+        if [ "${desktop#*-}" != "$desktop" ]; then
+            vendor=${desktop%-*}
+            app=${desktop#*-}
+            if [ -r $dir/applications/$vendor/$app ]; then
+                file_path=$dir/applications/$vendor/$app
+            elif [ -r $dir/applnk/$vendor/$app ]; then
+                file_path=$dir/applnk/$vendor/$app
+            fi
+        fi
+        if test -z "$file_path" ; then
+            for indir in "$dir"/applications/ "$dir"/applications/*/ 
"$dir"/applnk/ "$dir"/applnk/*/; do
+                file="$indir/$desktop"
+                if [ -r "$file" ]; then
+                    file_path=$file
+                    break
+                fi
+            done
+        fi
+        if [ -r "$file_path" ]; then
+            # Remove any arguments (%F, %f, %U, %u, etc.).
+            command="`grep -E "^Exec(\[[^]=]*])?=" "$file_path" | cut -d= -f 
2- | first_word`"
+            command="`which "$command"`"
+            readlink -f "$command"
+            return
+        fi
     done
 }
 
@@ -227,7 +245,7 @@
             ;;
 
             --version)
-            echo "@NAME@ 1.1.1+"
+            echo "@NAME@ 1.1.2+"
             exit_success
             ;;
         esac
@@ -273,6 +291,9 @@
          LXDE)
            DE=lxde;
            ;;
+         LXQt)
+           DE=lxqt;
+           ;;
          MATE)
            DE=mate;
            ;;
@@ -294,6 +315,7 @@
       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
       elif echo $DESKTOP | grep -q '^Enlightenment'; then DE=enlightenment;
+      elif [ x"$LXQT_SESSION_CONFIG" != x"" ]; then DE=lxqt;
       fi
     fi
 
@@ -332,6 +354,10 @@
       # but not in GNOME 3.x
       which gnome-default-applications-properties > /dev/null 2>&1  || 
DE="gnome3"
     fi
+
+    if [ -f "$XDG_RUNTIME_DIR/flatpak-info" ]; then
+      DE="flatpak"
+    fi
 }
 
 #----------------------------------------------------------------------------


Reply via email to