Given that Totem is the default media player in Ubuntu, one can set VLC as default media player by replacing every instance of "totem.desktop" in the file /usr/share/applications/defaults.list by "vlc.desktop" as follows.
1. sudo cp /usr/share/applications/defaults.list /usr/share/applications/defaults.list.backup
2. sed 's/totem.desktop/vlc.desktop/g' /usr/share/applications/defaults.list > tempfile
3. sudo mv tempfile /usr/share/applications/defaults.list
References: VLC wiki page