From 793932408eceed90809a2acb19a248c578023c0e Mon Sep 17 00:00:00 2001 From: taukakao Date: Wed, 19 Feb 2025 21:41:36 +0100 Subject: [PATCH] hide first-setup user before logging out --- vanilla_first_setup/scripts/logout | 3 --- vanilla_first_setup/scripts/remove-first-setup-user | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/vanilla_first_setup/scripts/logout b/vanilla_first_setup/scripts/logout index aca45992..9f7e8da0 100755 --- a/vanilla_first_setup/scripts/logout +++ b/vanilla_first_setup/scripts/logout @@ -10,7 +10,4 @@ if [ "$UID" == "0" ]; then exit 7 fi -# TODO: consider setting vanilla user to invisible for AccountsService -# see https://github.com/Vanilla-OS/first-setup/blob/4f7f49908ff32503c995a97253af0e796f279627/__first_setup_reset_session#L3 -# and https://github.com/Vanilla-OS/first-setup/blob/4f7f49908ff32503c995a97253af0e796f279627/recipe.json#L10 loginctl terminate-user "$USER" diff --git a/vanilla_first_setup/scripts/remove-first-setup-user b/vanilla_first_setup/scripts/remove-first-setup-user index 1d1c0008..4c835e45 100755 --- a/vanilla_first_setup/scripts/remove-first-setup-user +++ b/vanilla_first_setup/scripts/remove-first-setup-user @@ -10,4 +10,6 @@ if ! [ "$UID" == "0" ]; then exit 6 fi +echo -e '[User]\nSession=firstsetup\nSystemAccount=true' > /var/lib/AccountsService/users/$(id -nu $PKEXEC_UID || echo invaliduser) +systemctl restart accounts-daemon.service systemctl enable remove-first-setup-user.service