Comment 5 for bug 1018621

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Thanks for taking the time to report this issue!

This is the code in accountsservice (user_change_language_authorized_cb() in src/user.c):

        gchar *profile_path = g_build_path ("/", user->home_dir, ".profile", NULL);
        if (!g_file_test (profile_path, G_FILE_TEST_IS_REGULAR)) {

                /* SetLanguage was probably called from a login greeter,
                   and HOME not mounted and/or not decrypted.
                   Hence don't save anything, or else accountsservice
                   and ~/.pam_environment would become out of sync. */
                throw_error (context, ERROR_FAILED, "not access to HOME yet so language not saved");
                goto out2;
        }

As you can see, the purpose of the test whether ~/.profile exists is to find out whether HOME is available (please note that /etc/skel includes the file .profile, at least in the latest Ubuntu releases). If there is a safer way to test for the availability of HOME, please let me know, and I'll be happy to submit a suitable merge proposal.