- during installation add to the list of custom keyboards if necessary
- during uninstallation remove from the list of custom keyboards
- if list of custom keyboards has invalid values, remove those before
saving the list
Closes#8598.
Ubuntu 18.04 Bionic comes with an older Python version (3.6) that
doesn't support the `capture_output` parameter on `subprocess.run`
which leads to a crash when installing or uninstalling keyboads to
the shared area. This change works around the problem by calling
a different method on Bionic.
Fixes#6564.