MDDM configuration editor
  • C++ 48.7%
  • Python 36.6%
  • QML 8.1%
  • CMake 6.5%
  • C 0.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-11-28 20:28:43 +01:00
cmake Add manpages 2026-11-23 11:05:10 -08:00
data Search /usr/local/share/mddm/themes by default 2026-11-28 11:26:28 -08:00
kcm Search /usr/local/share/mddm/themes by default 2026-11-28 11:26:28 -08:00
LICENSES Credit the code adapted from sddm-kcm 2026-11-23 18:08:08 -08:00
mddm_config Search /usr/local/share/mddm/themes by default 2026-11-28 11:26:28 -08:00
tests Offer built-in theme 2026-11-24 10:49:50 -08:00
.gitignore Read config in mddm's order 2026-11-23 09:56:40 -08:00
AGENTS.md Add contributor guidelines for people and LLM agents 2026-11-28 11:25:26 -08:00
CMakeLists.txt Bump version to 0.2.1 2026-11-24 11:17:53 -08:00
CONTRIBUTING.md Add contributor guidelines for people and LLM agents 2026-11-28 11:25:26 -08:00
CONTRIBUTORS.md Credit the code adapted from sddm-kcm 2026-11-23 18:08:08 -08:00
LICENSE Initial Commit 2026-11-23 09:07:13 -08:00
pyproject.toml Bump version to 0.2.1 2026-11-24 11:17:53 -08:00
README.md Search /usr/local/share/mddm/themes by default 2026-11-28 11:26:28 -08:00

mddm-config

A graphical configuration tool for the MDDM display manager, written in Python with PyQt6.

It has pages for:

  • Theme: pick the greeter theme from a grid of previews, preview it in the real greeter, and set the font, cursor and avatar options. The first entry, "Maui (built-in)", is the theme that is compiled into mddm. mddm uses it when Current is empty, so it is also what Defaults gives back.
  • Behavior: NumLock, halt and reboot commands, input method, which users are listed, and what the greeter remembers.
  • Autologin: user, session and relogin.
  • Advanced: namespaces, greeter environment, default PATH, and the X11 and Wayland session, display and compositor commands.

For KDE Plasma there is also a System Settings module (a KCM) in kcm/, which has the theme grid and the most used settings. See KDE Plasma.

How settings are saved

mddm-config never edits /etc/mddm.conf. Changes are written to a drop-in file:

/etc/mddm.conf.d/50-mddm-config.conf

Only the settings you changed are written. The app reads the effective configuration in the same order mddm does, lowest priority first: every file in /usr/lib/mddm/mddm.conf.d, then every file in /etc/mddm.conf.d, then /etc/mddm.conf, so what you see is what mddm will use.

Files that are read after the drop-in take precedence over it. That means any file in /etc/mddm.conf.d that sorts after 50-mddm-config.conf, and /etc/mddm.conf. If a setting is also present in such a file, the app shows that file's value, but changing it in the app has no effect until the setting is removed from that file. In the app, affected fields are marked with ⚠ and applying such a change asks for confirmation.

The Defaults button deletes the drop-in. Settings in other files are left alone.

Privileges

The GUI runs as your user. Saving runs a small helper as root:

/usr/libexec/mddm-config-helper

The helper uses only the Python standard library, accepts a fixed list of setting names, and writes only the drop-in above. It is started with pkexec, which uses the polkit action org.moderndesktop.mddm-config.save. If pkexec is not installed, the app falls back to run0, which has no custom prompt.

Requirements

Runtime:

  • Python 3
  • PyQt6
  • commented-configparser (python3-commented-configparser)
  • polkit (pkexec) or systemd 256 or later (run0)
  • MDDM, for the configuration directories and the greeter used by Preview

Build:

  • CMake 4.0 or later
  • Python 3, to byte-compile the installed files and to run the tests
  • scdoc, to build the manual pages (optional)

The Python application has nothing to compile, so it needs no compiler. The System Settings module for KDE is optional, and is C++ (see KDE Plasma).

Tests (optional):

  • pytest, plus PyQt6 and commented-configparser as above

Building and installing

cmake -S . -B build -DCMAKE_INSTALL_PREFIX=/usr
cmake --build build
sudo cmake --install build

The launcher scripts, the helper and the polkit policy are generated from templates so that they contain the real install paths.

Options:

Option Default Meaning
MDDM_CONFIG_PYTHON /usr/bin/python3 Interpreter written into the mddm-config launcher
MDDM_CONFIG_HELPER_PYTHON /usr/bin/python3 Interpreter written into the root helper
INSTALL_POLKIT_POLICY ON for /usr, otherwise OFF Install the polkit action file
BYTE_COMPILE ON Byte-compile the installed Python files
WITH_KCM AUTO Build the System Settings module for KDE. AUTO builds it if a C++ compiler and KDE Frameworks 6 are found, ON fails if they are not, and OFF skips it
BUILD_MAN_PAGES ON if scdoc is found Build and install mddm-config(1) and mddm-config-helper(8)
BUILD_TESTING ON Register the tests with CTest

The defaults suit a distribution package, which needs no options. The two interpreter options only set the #! line of the installed scripts. The Python that CMake finds is used at build time only, to byte-compile and to run the tests.

The helper interpreter is a separate option on purpose. The helper runs as root, so it should use the system Python and never an interpreter from a home directory or a virtual environment.

Installing under another prefix

polkitd only reads actions from /usr/share/polkit-1/actions, so with a prefix such as /usr/local the policy is not installed. pkexec then uses polkit's generic "run as the super user" action, which works but shows a less specific prompt. Do not leave a policy installed for a different helper path: polkit checks that path and will refuse to run the helper.

Testing

ctest --test-dir build --output-on-failure

or, from a source tree:

python3 -m pytest

The suite covers the setting schema, reading the configuration in mddm's order, the override detection, the root helper (including that it needs only the standard library), theme discovery, the window and its dialogs on the offscreen Qt platform, and a staged install with different options. The window tests are skipped if PyQt6 is missing, and the install tests if cmake is.

With the KDE module, ctest also runs the C++ tests of its reader, helper, settings and models, checks its QML with qmllint, and starts the module without a screen to catch QML errors. tests/test_kcm_schema.py checks that the settings of the module agree with mddm_config/schema.py, defaults included.

KDE Plasma

The kcm/ directory is a System Settings module, "Login Screen (MDDM)", modeled on sddm-kcm. It has the theme grid with previews (starting with the built-in theme), and a Behavior page with autologin, the range of user IDs, hidden users and shells, what mddm remembers, the halt and reboot commands, NumLock, and the font and cursor of the greeter. It manages 18 settings, which is fewer than the standalone application, and the two can be used together because they write the same drop-in, /etc/mddm.conf.d/50-mddm-config.conf.

  • Saving goes through a KAuth helper, org.kde.kcontrol.kcmmddm, which runs as root. It follows mddm-config-helper and accepts only the settings it manages, checks the type of each value, refuses a # or a line break, and replaces the file atomically. Both actions need an administrator.
  • Defaults shows what mddm uses when nothing in /etc sets a setting, and applying it removes the settings from the drop-in. A setting that is set back to its default is removed in the same way.
  • A setting that a file read after the drop-in also sets is listed in a warning on the page, because changing it has no effect until it is removed from that file.
  • Run it without Plasma with kcmshell6 kcm_mddm.
  • After the package is updated, quit System Settings and open it again. A running System Settings keeps the old module loaded, so it would still show the old pages and read the old paths, while the helper that saves is already the new one.

To build it, add a C++ compiler and the development files of extra-cmake-modules, Qt 6 (Qml and Test) and KDE Frameworks 6 (Auth, Config, CoreAddons, I18n and KCMUtils). At run time it needs kf6-kcmutils, kf6-kauth and kf6-kirigami. -DWITH_KCM=ON makes a missing one an error, and -DWITH_KCM=OFF builds only the Python application.

LXQt

lxqt-config has no plugin interface. It lists the .desktop files that match the rules in lxqt-config.menu from lxqt-menu-data, and the LXQt panel menu uses the rules in lxqt-applications.menu. Both put an entry in the "LXQt settings" group when its categories include Settings and LXQt (and DesktopSettings for lxqt-config). The mddm-config.desktop entry has the LXQt category, so it is listed there once, in both menus. Other desktops ignore the category, and there is only one entry, so nothing is duplicated and no separate package is needed.

Do not use X-LXQt instead: only lxqt-config.menu accepts it, so the panel menu would list the entry under "Preferences", and lxqt-config would list it twice, also under "Other settings".

If you prefer the "System settings" group of lxqt-config, use Settings;System; as the categories instead. The panel menu has no such group.

The tests in tests/test_menus.py evaluate the real menu files with pyxdg. They are skipped unless lxqt-menu-data and pyxdg are installed, and LXQT_MENU_DIR overrides the menu directory, /etc/xdg/menus.

Running from a source tree

PYTHONPATH=. python3 -m mddm_config

Saving needs the helper installed at its configured path (mddm_config/paths.py falls back to /usr/libexec/mddm-config-helper when run from a source tree).

Default values

The defaults shown by the app come from mddm_config/schema.py and mirror mddm's build defaults, including its theme directories: /usr/local/share/mddm/themes and /usr/share/mddm/themes first, then the sddm ones (/usr/local/share/sddm/themes and /usr/share/sddm/themes), so that sddm themes still load. A theme found in several directories is listed once, from the first. The two mddm directories are also scanned for themes when your ThemeDir leaves them out. The theme metadata is read from [MddmGreeterTheme], with [SddmGreeterTheme] as a fallback for each key. If you select a theme from a directory that is not in ThemeDir, the directory is added to ThemeDir when you apply. If mddm was built with different paths, the values read from your configuration take precedence.

License

mddm-config is GPL-3.0-or-later. See LICENSE.

Some files adapt or port code from other projects, and keep the license of the original, with its copyright lines in their headers:

  • kcm/ui/main.qml, kcm/ui/Advanced.qml and kcm/mddmsettingsbase.* are adapted from sddm-kcm and are GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL. The System Settings module is therefore GPL-3.0-only as a whole.
  • kcm/ui/DetailsDialog.qml and the other files in kcm/ that are modeled on sddm-kcm (the models, the module class and the root helper) are GPL-2.0-or-later.
  • mddm_config/inifile.py and kcm/mddmconfig.* port the configuration parser of mddm and are LGPL-2.1-or-later.
  • The .kcfg and .kcfgc files are CC0-1.0.

The texts of the licenses are in LICENSES/, and the authors are in CONTRIBUTORS.md.