Attaching a patch with MichaĆ's proposed fix, which works for me. I think it makes sense to use head -n1, the first Exec entry is likely to be a good pick -- if anyone adds a funny Exec entry, I'd expect it to not be the first one.
I've found the same bug through a different path -- I ran execsnoop to try and figure out what chromium was doing when it complained about not being the default browser, and it's actually invoking `xdg-settings check default-web-browser chromium-browser.desktop`, which, in my environment (identified as gnome3) calls the exact same desktop_file_to_binary ... function. ** Patch added: "Add head -n1 to grep for Exec inside .desktop file, so the next command doesn't get a multiline input." https://bugs.launchpad.net/ubuntu/+source/xdg-utils/+bug/1511154/+attachment/4516300/+files/xdg-settings.patch -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1511154 Title: xdg-settings set <anything> fails with status 2 because of a small glitch To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/xdg-utils/+bug/1511154/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs