This was made as a part of another project, so may or may not be of any use.
I use it inside other scripts, as an easy way to change the default apps, if required.

Changes the executed commands in the /usr/local/bin/default*** files, via simple commands in the terminal console..

Changelog:

version 0.2

- changes are only made if both the default*** exist and the new command given is executable
- the full path is not required for commands - `which` is now used to find the full path
- all messages output in terminal

Example usage, (type in console):

Code:

defaults-changer [browser|etc|wordprocessor] command

1. Get help:

Code:

defaults-changer -h

2. Some specific examples of how to change default apps:

Code:

defaults-changer browser opera
defaults-changer draw /path/to/gimp

NOTE: full path and double quotes ("") are optional for the final command