xdg-mime default doesn't behave as I would expected. Even when run with root privs, it attempts to create /home/$USER/.local/share/applications/defaults.list Here on Ubuntu, the /home/$USER/.local/share/applications dir doesn't exist, and it simply fails. Even if it did exist, when run with root privs, I would expect it to edit the global defaults.list file in /usr/share/applications, which on Ubuntu systems, is a symlink to /etc/gnome/defaults.list whih is contained in a package a pre-populated. I would like to be able to pass --system to xdg-mime default and have it only modify /usr/share/applications/defaults.list (and respect the symlink if it is a symlink) rather than local files in ~.
xdg-utils aren't generally for root/global operations, but for per user items.
use xdg-mime --mode system
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.