deal bug130487

解决开机自动登录重启后,开机自动登录在控制面板中关闭的问题
This commit is contained in:
王帅 2023-04-13 17:00:51 +08:00
parent 4ba4dfa606
commit dd6ec06480
1 changed files with 22 additions and 16 deletions

View File

@ -1583,25 +1583,31 @@ load_autologin (Daemon *daemon,
NULL, /* GCancellable */
NULL); /* GError */
// if (proxy != NULL) {
// ret = load_autologin_gdm (daemon, name, enabled, error);
// if (ret == FALSE) {
// g_warning ("%s fail to load %s file\n", __func__, PATH_GDM_CUSTOM);
// }
// }
// /*
// * if /etc/gdm3/custom.conf not find we need check /etc/lightdm/lightdm.conf;
// */
// if (ret == FALSE) {
// ret = load_autologin_lightdm (daemon, name, enabled, error);
// if (ret == FALSE) {
// g_warning ("%s fail to load /etc/lightdm/lightdm.conf file\n", __func__);
// }
// }
if (proxy != NULL) {
ret = load_autologin_gdm (daemon, name, enabled, error);
ret = load_autologin_lightdm (daemon, name, enabled, error);
if (ret == FALSE) {
g_warning ("%s fail to load %s file\n", __func__, PATH_GDM_CUSTOM);
g_warning ("%s fail to load /etc/lightdm/lightdm.conf file\n", __func__);
}
}
/*
* if /etc/gdm3/custom.conf not find we need check /etc/lightdm/lightdm.conf;
*/
if (ret == FALSE) {
ret = load_autologin_lightdm (daemon, name, enabled, error);
if (ret == FALSE) {
g_warning ("%s fail to load /etc/lightdm/lightdm.conf file\n", __func__);
}
}
return ret;
}
#if 0
static gboolean
save_autologin_gdm (Daemon *daemon,
const gchar *name,
@ -1636,7 +1642,7 @@ save_autologin_gdm (Daemon *daemon,
return result;
}
#endif
static gboolean
save_autologin_lightdm (Daemon *daemon,
const gchar *name,
@ -1677,8 +1683,8 @@ save_autologin (Daemon *daemon,
gboolean enabled,
GError **error)
{
if (!save_autologin_gdm (daemon, name, enabled, error))
return FALSE;
//if (!save_autologin_gdm (daemon, name, enabled, error))
// return FALSE;
if (!save_autologin_lightdm (daemon, name, enabled, error))
return FALSE;
return TRUE;