Observed on Ubuntu with xdg-open 1.0.2 I created a custom .desktop, placing it in ~/.local/share/applications and associated it to a few filetypes that I'm interested in. For the sake of simplicity lets say the custom launcher is just supposed to echo the name of the file it is handed, adding a fixed parameter: Exec: echo BOO When I attempt to open my custom file (which is resolving the desktop correctly): xdg-open myfile.fommil # EXPECTED BOO myfile.fommil # OBSERVED myfile.fommil http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#exec-variables says that Exec takes arguments that are space separated. # WORKAROUND One must create a script that takes no parameters and adds all the extra fixed parameters (e.g. a script that calls 'echo BOO $*')
wow, I just read the source and found out that open_generic_xdg_mime intentionally drops everything other than the first word in the Exec: command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | first_word`" so this behaviour is by design, and completely ignores the spec. I guess another workaround is to install exo-open or something.
Just got bitten by this, took a while to figure out. Is anyone working on this? Would a patch be accepted?
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xdg/xdgmime/issues/7.
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.