[displaymanager] kdm is no longer relevant

This commit is contained in:
Adriaan de Groot 2022-05-04 00:23:24 +02:00
parent ee1232b10a
commit 992d2d3be0
4 changed files with 2 additions and 80 deletions

View File

@ -46,6 +46,7 @@ in the *Modules* heading, below.
## Modules ##
- *bootloader* now supports more options when building the kernel
command-line. (Thanks Evan)
- *displaymanager* no longer supports the discontinued *kdm* display manager.
- *grubcfg* changed the key *keepDistributor* to *keep_distributor*.
Please update configurations.
- *partition* requires KPMCore 21.12 (e.g. KPMCore 4.2 API, or later).

View File

@ -22,7 +22,6 @@ displaymanagers:
- gdm
- mdm
- lxdm
- kdm
- greetd
# Enable the following settings to force a desktop environment

View File

@ -10,7 +10,7 @@ properties:
type: array
items:
type: string
enum: [slim, sddm, lightdm, gdm, mdm, lxdm, kdm, greetd]
enum: [slim, sddm, lightdm, gdm, mdm, lxdm, greetd]
minItems: 1 # Must be non-empty, if present at all
defaultDesktopEnvironment:
type: object

View File

@ -481,84 +481,6 @@ class DMgdm(DisplayManager):
pass
class DMkdm(DisplayManager):
name = "kdm"
executable = "kdm"
def set_autologin(self, username, do_autologin, default_desktop_environment):
# Systems with KDM as Desktop Manager
kdm_conf_path = os.path.join(
self.root_mount_point, "usr/share/config/kdm/kdmrc"
)
# Check which path is in use: SUSE does something else.
# Also double-check the default setting. Pick the first
# one that exists in the target.
for candidate_kdmrc in (
"usr/share/config/kdm/kdmrc",
"usr/share/kde4/config/kdm/kdmrc",
):
p = os.path.join(self.root_mount_point, candidate_kdmrc)
if os.path.exists(p):
kdm_conf_path = p
break
text = []
if os.path.exists(kdm_conf_path):
with open(kdm_conf_path, 'r') as kdm_conf:
text = kdm_conf.readlines()
with open(kdm_conf_path, 'w') as kdm_conf:
for line in text:
if 'AutoLoginEnable=' in line:
if do_autologin:
line = 'AutoLoginEnable=true\n'
else:
line = 'AutoLoginEnable=false\n'
if do_autologin and 'AutoLoginUser=' in line:
line = "AutoLoginUser={!s}\n".format(username)
kdm_conf.write(line)
else:
return (
_("Cannot write KDM configuration file"),
_("KDM config file {!s} does not exist").format(kdm_conf_path)
)
def basic_setup(self):
if libcalamares.utils.target_env_call(
['getent', 'group', 'kdm']
) != 0:
libcalamares.utils.target_env_call(
['groupadd', '-g', '135', 'kdm']
)
if libcalamares.utils.target_env_call(
['getent', 'passwd', 'kdm']
) != 0:
libcalamares.utils.target_env_call(
['useradd',
'-u', '135',
'-g', 'kdm',
'-d', '/var/lib/kdm',
'-s', '/bin/false',
'-r',
'-M',
'kdm'
]
)
libcalamares.utils.target_env_call(
['chown', '-R', '135:135', 'var/lib/kdm']
)
def desktop_environment_setup(self, desktop_environment):
pass
def greeter_setup(self):
pass
class DMlxdm(DisplayManager):
name = "lxdm"
executable = "lxdm"