diff --git a/bin/set-kano-hdmi b/bin/set-kano-hdmi index d141c42..8aa991c 100755 --- a/bin/set-kano-hdmi +++ b/bin/set-kano-hdmi @@ -145,7 +145,7 @@ logger.error(status) logger.error(edid) # fix hdmi audio status -if not edid['hdmi_supported'] and is_HDMI(): +if not edid['hdmi_audio'] and is_HDMI(): logger.error('hdmi audio not supported on this screen, changing to analogue') set_to_HDMI(False) diff --git a/kano_settings/config_file.py b/kano_settings/config_file.py index 6eace12..c06040c 100644 --- a/kano_settings/config_file.py +++ b/kano_settings/config_file.py @@ -18,12 +18,13 @@ USER_ID = None username = get_user_unsudoed() -settings_dir = os.path.join('/home', username, '.kano-settings') -if os.path.exists(settings_dir) and os.path.isfile(settings_dir): - os.rename(settings_dir, settings_dir + '.bak') -ensure_dir(settings_dir) -chown_path(settings_dir) -settings_file = os.path.join(settings_dir, 'config') +if username != 'root': + settings_dir = os.path.join('/home', username, '.kano-settings') + if os.path.exists(settings_dir) and os.path.isfile(settings_dir): + os.rename(settings_dir, settings_dir + '.bak') + ensure_dir(settings_dir) + chown_path(settings_dir) + settings_file = os.path.join(settings_dir, 'config') defaults = { 'Keyboard-continent-index': 1, @@ -88,6 +89,9 @@ def get_setting(variable): def set_setting(variable, value): + if username == 'root': + return + logger.debug('config_file / set_setting: {} {}'.format(variable, value)) data = read_json(settings_file)