Adding a new program to alternatives manually
I wanted to add the terminal st as an alternative for x-terminal-emulator. This makes it easier to use with the distribution version of dwm on Debian Jessie. The following command adds st as an alternative:
sudo update-alternatives --install /usr/bin/x-terminal-emulator x-terminal-emulator /usr/local/bin/st 1
And you can then select it as usual with:
sudo update-alternatives --config x-terminal-emulator