From 5f7b221e11d758269dff21b0ad8e63b43de55fb9 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 15 Nov 2021 13:38:46 +0100 Subject: [PATCH] [displaymanager] Fix greetd commands - since default_desktop_environment isn't a string, need to pick the string -- the command -- out of the object first. --- src/modules/displaymanager/main.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/modules/displaymanager/main.py b/src/modules/displaymanager/main.py index 3219e803f..3cfdb069a 100644 --- a/src/modules/displaymanager/main.py +++ b/src/modules/displaymanager/main.py @@ -903,18 +903,19 @@ class DMgreetd(DisplayManager): def set_autologin(self, username, do_autologin, default_desktop_environment): self.config_load() + de_command = default_desktop_environment.executable if os.path.exists(self.os_path("usr/bin/gtkgreed")) and os.path.exists(self.os_path("usr/bin/cage")): self.config_data['default_session']['command'] = "cage -s -- gtkgreet" elif os.path.exists(self.os_path("usr/bin/tuigreet")): tuigreet_base_cmd = "tuigreet --remember --time --issue --asterisks --cmd " - self.config_data['default_session']['command'] = tuigreet_base_cmd + default_desktop_environment + self.config_data['default_session']['command'] = tuigreet_base_cmd + de_command elif os.path.exists(self.os_path("usr/bin/ddlm")): - self.config_data['default_session']['command'] = "ddlm --target " + default_desktop_environment + self.config_data['default_session']['command'] = "ddlm --target " + de_command else: - self.config_data['default_session']['command'] = "agreety --cmd " + default_desktop_environment + self.config_data['default_session']['command'] = "agreety --cmd " + de_command if do_autologin == True: - self.config_data['initial_session'] = dict(command = default_desktop_environment, user = username) + self.config_data['initial_session'] = dict(command = de_command, user = username) self.config_write()