This page describes methods used in this repository: https://github.com/gokien/default-settings
/usr/share/applications/defaults.listbelongs to package
desktop-file-utils. Do not manually edit the file, follow this instead. We will hack on default user settings. After that, deliver the file
~/.local/share/applications/mimeapps.list. (cmpitg: What? Delivering user local settings????)
This link is helpful for KDE-related stuff.
Most modern GNOME applications use GSettings for storing application-specific settings. In order to use GSettings, they have to distribute a schema file, which is an XML file containing key templates with default values that each user can override. This file is usually stored in
Luckily, there is a mechanism that allows distributions to override these schemas at system-wide level called Vendor overrides (scroll down a bit). On a Debian system, we can install an override with a debian package using a debhelper program called dh_installgsettings. Read its manual page for more instructions.
Issue tracker link: https://github.com/gokien/issue-tracker/issues/30
GConf is the predecessor of GSettings. Nobody uses it nowaday. Still, some legacy packages like ibus 1.4.2 rely on it so we can't stay ignorant. The basic idea is pretty much the same as with GSettings, we'll need the help of dh_gconf, yet another debhelper program.
Read the source code of the
elementary-default-settings package here and things will come to light.