ubuntu change default application code example
Example 1: set nemo as default ubuntu
xdg-mime default nemo.desktop inode/directory application/x-gnome-saved-search
Example 2: set default terminal ubuntu
sudo update-alternatives --install /usr/bin/x-terminal-emulator x-terminal-emulator /opt/Hyper/hyper 50