From 5c11231392485a38f8d41b5c35393c1df2c3e464 Mon Sep 17 00:00:00 2001 From: Sebastien Bacher Date: Wed, 3 Aug 2016 17:00:58 +0200 Subject: [PATCH] Create a desktop entry and some mimetype associations for xdg-open in ubuntu-core. That way interacting with web, email and documentations urls in a snap should do the right thing. --- .../hooks/500-create-xdg-wrapper.binary | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/live-build/ubuntu-core/hooks/500-create-xdg-wrapper.binary b/live-build/ubuntu-core/hooks/500-create-xdg-wrapper.binary index f6b480fe..a1a4fcf1 100755 --- a/live-build/ubuntu-core/hooks/500-create-xdg-wrapper.binary +++ b/live-build/ubuntu-core/hooks/500-create-xdg-wrapper.binary @@ -14,3 +14,28 @@ dbus-send --print-reply --session --dest=com.canonical.SafeLauncher / com.canoni EOF chmod 755 $PREFIX/usr/local/bin/xdg-open +# corresponding .desktop entry, needed for mimetype registration +mkdir -p $PREFIX/usr/local/share/applications +cat >$PREFIX/usr/local/share/applications/xdg-open.desktop <$PREFIX/usr/local/share/applications/mimeapps.list <