File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 11from typing import override
22
3+ from archinstall .default_profiles .profile import GreeterType
34from archinstall .lib .applications .application_menu import ApplicationMenu
45from archinstall .lib .args import ArchConfig
56from archinstall .lib .authentication .authentication_menu import AuthenticationMenu
@@ -207,13 +208,30 @@ def has_superuser() -> bool:
207208 return any ([u .sudo for u in auth_config .users ])
208209 return False
209210
211+ def has_regular_user () -> bool :
212+ if auth_config and auth_config .users :
213+ return len (auth_config .users ) > 0
214+ return False
215+
210216 missing = set ()
211217
212218 if (auth_config is None or auth_config .root_enc_password is None ) and not has_superuser ():
213219 missing .add (
214220 tr ('Either root-password or at least 1 user with sudo privileges must be specified' ),
215221 )
216222
223+ # These greeters only show users with UID >= 1000 and have no manual login by default
224+ if not has_regular_user ():
225+ profile_item : MenuItem = self ._item_group .find_by_key ('profile_config' )
226+ profile_config : ProfileConfiguration | None = profile_item .value
227+
228+ if profile_config and profile_config .profile and profile_config .profile .is_desktop_profile ():
229+ problematic_greeters = {GreeterType .Sddm }
230+ if any (p .default_greeter_type in problematic_greeters for p in profile_config .profile .current_selection ):
231+ missing .add (
232+ tr ('The selected desktop profile requires a regular user to log in via the greeter' ),
233+ )
234+
217235 for item in self ._item_group .items :
218236 if item .mandatory :
219237 assert item .key is not None
You can’t perform that action at this time.
0 commit comments