Skip to content

Commit 7359525

Browse files
committed
fix: install default user avatar
Signed-off-by: ZHANG Yuntian <yt@radxa.com>
1 parent e0b5414 commit 7359525

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

src/usr/lib/rsetup/cli/account.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,18 @@ add_user() {
1414
else
1515
passwd -d "$username"
1616
fi
17+
18+
if [[ -e "/home/$username/.face" ]]
19+
then
20+
cp "/home/$username/.face" "/var/lib/AccountsService/icons/$username"
21+
chmod 0644 "/var/lib/AccountsService/icons/$username"
22+
cat >/var/lib/AccountsService/users/"$username" <<EOF
23+
[User]
24+
Session=
25+
Icon=/var/lib/AccountsService/icons/$username
26+
SystemAccount=false
27+
EOF
28+
fi
1729
}
1830

1931
update_password() {

0 commit comments

Comments
 (0)