Skip to content

fix: detect non-system users by presence of /var/home/$USER#1580

Merged
RoyalOughtness merged 3 commits intosecureblue:livefrom
HastD:service-condition
Nov 6, 2025
Merged

fix: detect non-system users by presence of /var/home/$USER#1580
RoyalOughtness merged 3 commits intosecureblue:livefrom
HastD:service-condition

Conversation

@HastD
Copy link
Copy Markdown
Collaborator

@HastD HastD commented Nov 6, 2025

Currently systemd user services that are only supposed to run on desktop images for real users (not system accounts) check for the existence of a ~/.config directory to determine whether they should run. This works on typical desktop installations but can fail in circumstances where the user is created with a bare-bones home directory for whatever reason. (For example, this is the case in the integration testing environment.)

Instead, we can just check for the existence of a /var/home/$USER directory. This seems like a more reliable indicator of whether a user account is an ordinary user as opposed to some sort of system account, and works for bare-bones home directories just as well.

Fixes #1579.

Currently systemd user services that are only supposed to run on desktop
images for real users (not system accounts) check for the existence of a
`~/.config` directory to determine whether they should run. This works
on typical desktop installations but can fail in circumstances where the
user is created with a bare-bones home directory for whatever reason.
(For example, this is the case in the integration testing environment.)

Instead, we can just check for the existence of a `/var/home/$USER`
directory. This seems like a more reliable indicator of whether a user
account is an ordinary user as opposed to some sort of system account,
and works for bare-bones home directories just as well.

Signed-off-by: Daniel Hast <[email protected]>
@RoyalOughtness RoyalOughtness enabled auto-merge (squash) November 6, 2025 18:59
@RoyalOughtness RoyalOughtness merged commit 7092d66 into secureblue:live Nov 6, 2025
14 checks passed
@HastD HastD deleted the service-condition branch November 6, 2025 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Integration test environment doesn't run some desktop services

3 participants