Package: alpine
Version: 2.11+dfsg1-3
Severity: wishlist

alpine is missing a .desktop file. Such a file would be nice for example
to have an alpine window pop up when clicking on mailto: Links in
iceweasel.

A mailcap entry for x-scheme-handler/mailto is also missing (evolution
and kmailservice both have one), but from testing with links and elinks
it does not seem like that mime type is used much anyway.

There is a .desktop file for mutt which might serve as a reference.

Here is an attempt to improve the situation. With a little work maybe it
could find its way into the package or upstream?

mkdir -p /usr/local/lib/alpine
cat <<'EOF' > /usr/local/lib/alpine/mailto-alpine
#!/bin/sh
if [ $# -ne 1 ] ; then
        echo >&2 "Usage: mailto-alpine <mailto: url>'"
        exit 1
fi
exec alpine -url "$1"
EOF

chmod +x /usr/local/lib/alpine/mailto-alpine

mkdir -p /usr/local/share/applications

cat <<'EOF' > /usr/local/share/applications/alpine.desktop
[Desktop Entry]
Name=alpine
Encoding=UTF-8
Comment=Simple text-based Mail User Agent
Comment[de]=Einfaches, Text-basiertes Mailprogramm
Type=Application
Exec=/usr/local/lib/alpine/mailto-alpine %u
Icon=utilities-terminal
Terminal=true
MimeType=x-scheme-handler/mailto;
Categories=Email;Office;Network
EOF

Finally, as a user when logged in graphically, set the default handler
for mailto urls. The following seems to work for gnome and should work
for other desktops, too:

xdg-settings set default-url-scheme-handler mailto alpine.desktop \
|| echo "Failed with exitcode $?"

Many regards,
Jens Stimpfle

Reply via email to