From f142710feee559ee3d7075a38883fa3b7957eb02 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 6 Feb 2023 10:52:25 +0100 Subject: [PATCH 1/2] [displaymanager] Overwrite DM-instance settings with config-settings If there are settings in the config-file, they can overwrite settings in the DM-instance in code. --- src/modules/displaymanager/main.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/modules/displaymanager/main.py b/src/modules/displaymanager/main.py index f908bc441..6f80751f2 100644 --- a/src/modules/displaymanager/main.py +++ b/src/modules/displaymanager/main.py @@ -983,6 +983,11 @@ def run(): # Do the actual configuration and collect messages dm_setup_message = [] for dm in dm_impl: + dm_specific_configuration = libcalamares.job.configuration.get(dm.name, None) + if dm_specific_configuration and isinstance(dm_specific_configuration, dict): + for k, v in dm_specific_configuration.items(): + if hasattr(dm, k): + setattr(dm, k, v) dm_message = None if enable_basic_setup: dm_message = dm.basic_setup() From 46a28543b9cee725989e5517aeebd20d450ec3e9 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 6 Feb 2023 11:03:28 +0100 Subject: [PATCH 2/2] [displaymanager] Add configuration items + schema for greetd user --- src/modules/displaymanager/displaymanager.conf | 8 ++++++++ src/modules/displaymanager/displaymanager.schema.yaml | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/src/modules/displaymanager/displaymanager.conf b/src/modules/displaymanager/displaymanager.conf index c5c0e0b78..18e956f27 100644 --- a/src/modules/displaymanager/displaymanager.conf +++ b/src/modules/displaymanager/displaymanager.conf @@ -59,3 +59,11 @@ basicSetup: false # *displaymanagers* list (as the only one). # sysconfigSetup: false + +# Some DMs have specific settings. These can be customized here. +# +# greetd has configurable user and group; the user and group is created if it +# does not exist, and the user is set as default-session user. +greetd: + greeter_user: "tom_bombadil" + greeter_group: "wheel" diff --git a/src/modules/displaymanager/displaymanager.schema.yaml b/src/modules/displaymanager/displaymanager.schema.yaml index 7e4c5f54c..2f1da9d56 100644 --- a/src/modules/displaymanager/displaymanager.schema.yaml +++ b/src/modules/displaymanager/displaymanager.schema.yaml @@ -20,3 +20,10 @@ properties: required: [ executable, desktopFile ] basicSetup: { type: boolean, default: false } sysconfigSetup: { type: boolean, default: false } + greetd: + type: object + properties: + greeter_user: { type: string } + greeter_group: { type: string } + additionalProperties: false +