diff --git a/src/module/daemon.py b/src/module/daemon.py index bb93e3c..8d6ad22 100644 --- a/src/module/daemon.py +++ b/src/module/daemon.py @@ -31,8 +31,7 @@ def module_init(): lightdm.set(session = str(data["session"])) GLib.idle_add(loginwindow.o("ui_entry_username").set_text, username) GLib.idle_add(loginwindow.o("ui_entry_password").set_text, password) - lightdm.greeter.authenticate(username) - lightdm.set(username, password) + GLib.idle_add(loginwindow.event_login_button, loginwindow.o("ui_button_login")) lightdm.login() debug("daemon login done") except Exception as e: diff --git a/src/module/gtkwindow.py b/src/module/gtkwindow.py index b7fdf1b..83722d8 100644 --- a/src/module/gtkwindow.py +++ b/src/module/gtkwindow.py @@ -35,9 +35,9 @@ def block_delete(*args): self.o("ui_window_main").connect("delete-event", block_delete) self.o("ui_window_main").connect("draw", self.__draw_window) # Login button and password entry enter - self.o("ui_button_login").connect("clicked", self.__event_login_button) + self.o("ui_button_login").connect("clicked", self.event_login_button) self.o("ui_entry_password").connect( - "activate", self.__event_login_button) + "activate", self.event_login_button) # password entry self.o("ui_entry_password").connect( "changed", self.__event_password_entry_changed) @@ -267,9 +267,9 @@ def __event_password_entry_changed(self, widget): break # if hash and cache is equal run login event if last_hash == hashlib.sha512(password.encode("utf-8")).hexdigest(): - self.__event_login_button() + self.event_login_button() - def __event_login_button(self, widget=None): + def event_login_button(self, widget=None): # ignore empty password if not allowed if not get("allow-empty-password", True): if self.o("ui_entry_password").get_text() == "":