From 1beadee2a75b20b2719e2e62afc29d51074eb053 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 30 Sep 2019 14:53:05 +0200 Subject: [PATCH] [displaymanager] Believe the .desktop file - if a default DE is configured but the executable doesn't exist, believe the .desktop file. Then use that, and warn if the whole thing can not be found. --- src/modules/displaymanager/main.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/modules/displaymanager/main.py b/src/modules/displaymanager/main.py index 313c679fa..ca42e6204 100644 --- a/src/modules/displaymanager/main.py +++ b/src/modules/displaymanager/main.py @@ -123,7 +123,7 @@ class DesktopEnvironment: return (self.find_executable(root_mount_point) is not None or self._search_tryexec(root_mount_point, desktop_file) is not None) - def find(self, root_mount_point): + def update_from_desktop_file(self, root_mount_point): """ Find thie DE in the target system at @p root_mount_point. This can update the *executable* configuration value if @@ -924,6 +924,11 @@ def run(): default_desktop_environment = DesktopEnvironment( entry["executable"], entry["desktopFile"] ) + # Adjust if executable is bad, but desktopFile isn't. + if not default_desktop_environment.update_from_desktop_file(root_mount_point): + libcalamares.utils.warning( + "The configured default desktop environment, {!s}, " + "can not be found.".format(default_desktop_environment.desktop_file)) else: default_desktop_environment = find_desktop_environment( root_mount_point