Skip to content

Using sup to follow mailto: links

rthrd edited this page Nov 16, 2014 · 3 revisions

Following mailto:// links in HTML documents, the browser will call the mail client that it is configured to use with the email address as sole command line argument.

To follow these links with sup, we have to wrap sup in a little script to call it with a terminal emulator and fix the habit of some browsers to pass the mailto: prefix:

#!/usr/bin/env bash
# sup-wrapper -- shell script to wrap sup for browsers not able to use command
# line options like firefox
# usage:
#      sup-wrapper [email protected]

xterm -e sup --compose ${1#mailto:}

Of course everybody's invited to use their favorite terminal emulater instead of xterm.

Living outside of an graphical environment you would have to use a terminal multiplexer like screen or tmux, or open sup on another virtual terminal using openvt.

Now, your favorite browser can be configured to call sup-wrapper (don't forget making the script executable).

Configuring the browser:

Clone this wiki locally