mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-06-02 21:52:28 +00:00
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.
This commit is contained in:
parent
f6058dfdb4
commit
5c11231392
@ -14,3 +14,28 @@ dbus-send --print-reply --session --dest=com.canonical.SafeLauncher / com.canoni
|
|||||||
EOF
|
EOF
|
||||||
chmod 755 $PREFIX/usr/local/bin/xdg-open
|
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 <<EOF
|
||||||
|
[Desktop Entry]
|
||||||
|
Version=1.0
|
||||||
|
Name=Url Handler Script
|
||||||
|
Exec=/usr/local/bin/xdg-open %u
|
||||||
|
MimeType=x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/mailto;x-scheme-handler/help;
|
||||||
|
Type=Application
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# define xdg-open as the default handler for common types
|
||||||
|
cat >$PREFIX/usr/local/share/applications/mimeapps.list <<EOF
|
||||||
|
[Added Associations]
|
||||||
|
x-scheme-handler/http=xdg-open.desktop
|
||||||
|
x-scheme-handler/https=xdg-open.desktop
|
||||||
|
x-scheme-handler/mailto=xdg-open.desktop
|
||||||
|
x-scheme-handler/help=xdg-open.desktop
|
||||||
|
|
||||||
|
[Default Applications]
|
||||||
|
x-scheme-handler/http=xdg-open.desktop
|
||||||
|
x-scheme-handler/https=xdg-open.desktop
|
||||||
|
x-scheme-handler/mailto=xdg-open.desktop
|
||||||
|
x-scheme-handler/help=xdg-open.desktop
|
||||||
|
EOF
|
||||||
|
Loading…
x
Reference in New Issue
Block a user