Your message dated Sun, 8 Oct 2017 20:48:12 +0300
with message-id <[email protected]>
and subject line Re: xdg-utils: Problem with multiple Execs in the .desktop file
has caused the Debian Bug report #840985,
regarding xdg-utils: Problem with multiple Execs in the .desktop file
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
840985: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=840985
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: xdg-utils
Version: 1.1.0~rc1+git20111210-7.4
Severity: important
Tags: patch

Hello.
I stumbled upon a problem, which occurs when xdg-open tries to run a
desktop file that has multiple exec strings (i.e. for suboptions for
unity, like palemoon package has, I've attached the desktop file).

After some time digging through the code of xdg-open, I found out that
it greps for the all Exec strings in the desktop file. Apparently, this
is a bad idea, since 2nd and all next appearances of Exec options just
become arguments for the first one.

That's why I limited search results for the first occurence of Exec,
that must be the main one. See the attached patch for xdg-open. After
applying the patch, everything seems to work fine.

Thanks in advance!

-- System Information:
Debian Release: 8.6
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 3.16.0-4-686-pae (SMP w/1 CPU core)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

xdg-utils depends on no packages.

Versions of packages xdg-utils recommends:
pn  libfile-mimeinfo-perl  <none>
pn  libnet-dbus-perl       <none>
pn  libx11-protocol-perl   <none>
ii  x11-utils              7.7+2
ii  x11-xserver-utils      7.7+3+b1

Versions of packages xdg-utils suggests:
pn  gvfs-bin  <none>

-- no debconf information
--- /usr/bin/xdg-open	2015-02-20 18:30:32.000000000 +0300
+++ xdg-open	2016-10-16 19:12:47.355802630 +0300
@@ -547,7 +547,7 @@
             fi
 
             if [ -r "$desktop_file" ] ; then
-                set -- $(sed -n 's/^Exec\(\[[^]]*\]\)\{0,1\}=//p' "$desktop_file")
+                set -- $(sed -n 's/^Exec\(\[[^]]*\]\)\{0,1\}=//p' "$desktop_file" | sed 1q)
                 command_exec="$(which "$1" 2> /dev/null)"
                 if [ -x "$command_exec" ] ; then
                     shift
[Desktop Entry]
Version=1.0
Name=Pale Moon Web Browser
Comment=Browse the World Wide Web
Keywords=Internet;WWW;Browser;Web;Explorer
Exec=palemoon %u
Terminal=false
X-MultipleArgs=false
Type=Application
Icon=palemoon
Categories=Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;video/webm;application/x-xpinstall;
StartupNotify=true
Actions=NewWindow;NewPrivateWindow;

[Desktop Action NewWindow]
Name=Open a New Window
Exec=palemoon -new-window
OnlyShowIn=Unity;

[Desktop Action NewPrivateWindow]
Name=Open a New Private Window
Exec=palemoon -private-window
OnlyShowIn=Unity;

--- End Message ---
--- Begin Message ---
Version: 1.1.1-1

Hi,

Thank you for the patch!

The latest version of the xdg-open utility uses a get_key function to
parse .desktop files. And I hope your problem has been solved in a
little bit better way. But because the issue is not reproducible on the
package that available in the Debian archive, I've closing the bug.

On Sun, 16 Oct 2016 19:19:09 +0300 Krylov Michael <[email protected]> wrote:
> I stumbled upon a problem, which occurs when xdg-open tries to run a
> desktop file that has multiple exec strings (i.e. for suboptions for
> unity, like palemoon package has, I've attached the desktop file).
> 
> After some time digging through the code of xdg-open, I found out that
> it greps for the all Exec strings in the desktop file. Apparently, this
> is a bad idea, since 2nd and all next appearances of Exec options just
> become arguments for the first one.
> 
> That's why I limited search results for the first occurence of Exec,
> that must be the main one. See the attached patch for xdg-open. After
> applying the patch, everything seems to work fine.

--- End Message ---

Reply via email to