Bug 88991 - xdg-open calls Nautilus with all arguments quoted together
Summary: xdg-open calls Nautilus with all arguments quoted together
Alias: None
Product: Portland
Classification: Unclassified
Component: xdg-utils (show other bugs)
Version: 1.1.0 rc3
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Portland Bugs
QA Contact:
Keywords: regression
Depends on:
Reported: 2015-02-05 09:35 UTC by Russell Haley
Modified: 2015-07-18 15:41 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Description Russell Haley 2015-02-05 09:35:14 UTC
Steps to reproduce:

  1. Set org.gnome.Nautilus.desktop as the default handler
     for inode/directory, such that:

       $ xdg-mime query default inode/directory

  2. Where org.gnome.Nautilus.desktop's Exec line is:

       Exec=nautilus --new-window %U

  3. Create a directory /tmp/test/directory.

  4. Run:

       xdg-open /tmp/test/directory

Actual behavior:

  1. Terminal prints:

       START /usr/bin/nautilus --new-window /tmp/test/directory
       Unknown option --new-window /tmp/test/directory

  2. Firefox opens a tab with an index page for the url
     "file:///tmp/test/directory/".  This probably depends on
     the fallback mechanism in my particular configuration.

Expected behavior:

  1. Nautilus opens, showing the directory /tmp/test/directory.

Additional information: Distribution is Fedora 21.  gvfs-open does the right thing, when called like xdg-open.  I am not running the Gnome DE, though I am using gnome-settings-daemon and Nautilus.
Comment 1 Peter 2015-07-18 14:59:35 UTC
Same issue, but with libreoffice:

 $ xdg-open somedocument.docx 
START /usr/bin/libreoffice --writer somedocument.docx
LibreOffice 40m0(Build:2)

Unknown option: --writer somedocument.docx

Usage: soffice [options] [documents...]

--minimized    keep startup bitmap minimized.
[skip help]

Remaining arguments will be treated as filenames or URLs of documents to open.

Same version 1.1.0_rc3_p20150119 (Gentoo)
Comment 2 Peter 2015-07-18 15:10:21 UTC
This is regression. I've emerged 1.1.0_rc2 and it worked as it should:

 $ xdg-open ~/Downloads/Описание\ функциональной\ схемы\ ГС.DOC 
Selected DE generic
Running file --mime-type "/home/peter/Downloads/Описание функциональной схемы ГС.DOC"
Checking /home/peter/.local/share//applications/mimeapps.list
Checking /usr/local/share/applications/defaults.list and /usr/local/share/applications/mimeinfo.cache
Checking /usr/local/share/applications/defaults.list and /usr/local/share/applications/mimeinfo.cache
Checking /usr/share/applications/defaults.list and /usr/share/applications/mimeinfo.cache
START /usr/bin/libreoffice --writer "/home/peter/Downloads/Описание функциональной схемы ГС.DOC"
[application run sucessufuly]
Comment 3 Peter 2015-07-18 15:40:50 UTC
And the following commit already fixed that:

ommit 13d9b0cac97e438bf7dc06452ee7fb3480907d88
Author: Rex Dieter <rdieter@math.unl.edu>
Date:   Fri Feb 20 15:54:46 2015 -0600

    xdg-open: safer xdg-open (BR89130)
    inspired by patch from Vincent Bernat <bernat@debian.org>

So I guess this is Gentoo specific bug at the moment. I'll ope
Comment 4 Peter 2015-07-18 15:41:09 UTC
Reported downstream: https://bugs.gentoo.org/show_bug.cgi?id=555272

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.