Commit 8c270a8b authored by segfault's avatar segfault

Greeter: Refactor: Use separate locale settings files

parent a8cbf4ca
......@@ -7,8 +7,10 @@
# =====
#
# * /etc/live/config.d/username.conf : $LIVE_USERNAME
# * /var/lib/gdm3/settings/tails.locale : $TAILS_LOCALE_NAME, $TAILS_XKBMODEL,
# $TAILS_XKBLAYOUT, $TAILS_XKBVARIANT, $TAILS_XKBOPTIONS, $CODESET
# * /var/lib/gdm3/settings/tails.language: $TAILS_LOCALE_NAME
# * /var/lib/gdm3/settings/tails.formats: $TAILS_FORMATS
# * /var/lib/gdm3/settings/tails.keyboard: $TAILS_XKBMODEL,
# $TAILS_XKBLAYOUT, $TAILS_XKBVARIANT, $TAILS_XKBOPTIONS
# * /var/lib/gdm3/settings/tails.password : $TAILS_USER_PASSWORD
# For whatever reason, /usr/sbin (needed by at least chpasswd)
......@@ -75,8 +77,10 @@ log "tails-unblock-network has exited (status=$?)."
### Localization
# Import locale name
. /var/lib/gdm3/settings/tails.locale || log_n_exit "Locale file not found."
# Import locale settings
. /var/lib/gdm3/settings/tails.language || log_n_exit "Language settings file not found."
. /var/lib/gdm3/settings/tails.formats || log_n_exit "Formats settings file not found."
. /var/lib/gdm3/settings/tails.keyboard || log_n_exit "Keyboard settings file not found."
if [ -z "${TAILS_LOCALE_NAME}" ] ; then
log_n_exit "Locale variable not found."
fi
......
......@@ -44,9 +44,6 @@ formats_setting_path = os.path.join(settings_dir, 'tails.formats')
# File where the session keyboard setting is stored
keyboard_setting_path = os.path.join(settings_dir, 'tails.keyboard')
# File where the above locale related settings are stored concatenated
locale_setting_path = os.path.join(settings_dir, 'tails.locale')
# File where the session sudo password is stored
admin_password_path = os.path.join(settings_dir, 'tails.password')
......
......@@ -103,13 +103,6 @@ class GreeterApplication(object):
def login(self):
"""Login GDM to the server"""
logging.debug("login called")
# Apply settings
# We now apply all settings immediately when they are
# changed. The only thing that still happens here is
# concatenating the locale settings files.
self.localisationsettings.apply_to_upcoming_session()
self.mainwindow.hide()
self.gdmclient.do_login()
......
......@@ -51,11 +51,3 @@ class LocalisationSettings(object):
if self._usermanager_loaded_cb:
self._usermanager_loaded_cb()
def apply_to_upcoming_session(self):
with open(tailsgreeter.config.locale_setting_path, 'w') as outfile:
for path in (tailsgreeter.config.language_setting_path,
tailsgreeter.config.formats_setting_path,
tailsgreeter.config.keyboard_setting_path):
with open(path) as infile:
outfile.write(infile.read())
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment