mirror of
https://github.com/Fishwaldo/build.git
synced 2025-03-18 12:51:40 +00:00
parent
bfa3d5da33
commit
623d228950
3 changed files with 36 additions and 21 deletions
|
@ -1 +1 @@
|
|||
libgtk2.0-bin
|
||||
libgtk2.0-bin dconf-cli libglib2.0-dev
|
||||
|
|
|
@ -6,7 +6,8 @@ mkdir -p "${destination}"/etc/skel
|
|||
cp -R "${SRC}"/packages/blobs/desktop/skel/. "${destination}"/etc/skel
|
||||
|
||||
# install logo for login screen
|
||||
cp "${SRC}"/packages/blobs/desktop/icons/armbian.png "${destination}"/usr/share/pixmaps
|
||||
mkdir -p "${destination}"/usr/share/pixmaps/armbian
|
||||
cp "${SRC}"/packages/blobs/desktop/icons/armbian.png "${destination}"/usr/share/pixmaps/armbian
|
||||
|
||||
# install wallpapers
|
||||
mkdir -p "${destination}"/usr/share/backgrounds/armbian/
|
||||
|
|
|
@ -8,8 +8,10 @@
|
|||
|
||||
. /etc/armbian-release
|
||||
|
||||
|
||||
check_abort()
|
||||
{
|
||||
|
||||
echo -e "\nDisabling user account creation procedure\n"
|
||||
rm -f /root/.not_logged_in_yet
|
||||
if [[ ${USER_SHELL} == zsh ]]; then
|
||||
|
@ -17,24 +19,28 @@ check_abort()
|
|||
fi
|
||||
trap - INT
|
||||
exit 0
|
||||
|
||||
}
|
||||
|
||||
|
||||
function read_password()
|
||||
read_password()
|
||||
{
|
||||
unset password
|
||||
prompt="$1 password: "
|
||||
while IFS= read -p "$prompt" -r -s -n 1 char
|
||||
do
|
||||
if [[ $char == $'\0' ]]
|
||||
then
|
||||
break
|
||||
fi
|
||||
prompt='*'
|
||||
password+="$char"
|
||||
done
|
||||
|
||||
unset password
|
||||
prompt="$1 password: "
|
||||
while IFS= read -p "$prompt" -r -s -n 1 char
|
||||
do
|
||||
if [[ $char == $'\0' ]]
|
||||
then
|
||||
break
|
||||
fi
|
||||
prompt='*'
|
||||
password+="$char"
|
||||
done
|
||||
|
||||
}
|
||||
|
||||
|
||||
set_shell()
|
||||
{
|
||||
|
||||
|
@ -90,9 +96,11 @@ set_timezone_and_locales()
|
|||
STATE=$(echo ${RES} | cut -d"," -f2)
|
||||
CCODE=$(echo ${RES} | cut -d"," -f3 | xargs)
|
||||
KEYBOARD="${CCODE,,}"
|
||||
LOCALES=$(grep territory /usr/share/i18n/locales/* | grep "$CCODE" | cut -d ":" -f 1 | cut -d "/" -f 6 | xargs -I{} grep {} /usr/share/i18n/SUPPORTED | grep "\.UTF-8" | cut -d " " -f 1)
|
||||
LOCALES=$(grep territory /usr/share/i18n/locales/* | grep "$CCODE" | cut -d ":" -f 1 | cut -d "/" -f 6 | \
|
||||
xargs -I{} grep {} /usr/share/i18n/SUPPORTED | grep "\.UTF-8" | cut -d " " -f 1)
|
||||
# UTF8 is not present everywhere so check again in case it returns empty value
|
||||
[[ -z "$LOCALES" ]] && LOCALES=$(grep territory /usr/share/i18n/locales/* | grep "$CCODE" | cut -d ":" -f 1 | cut -d "/" -f 6 | xargs -I{} grep {} /usr/share/i18n/SUPPORTED | cut -d " " -f 1)
|
||||
[[ -z "$LOCALES" ]] && LOCALES=$(grep territory /usr/share/i18n/locales/* | grep "$CCODE" | cut -d ":" -f 1 | cut -d "/" -f 6 | \
|
||||
xargs -I{} grep {} /usr/share/i18n/SUPPORTED | cut -d " " -f 1)
|
||||
echo -e "Detected timezone: \x1B[92m$TZDATA\x1B[0m"
|
||||
echo ""
|
||||
read -n1 -s -r -p "Set user language based on your location? [Y/n] " response
|
||||
|
@ -154,6 +162,7 @@ set_timezone_and_locales()
|
|||
|
||||
|
||||
|
||||
|
||||
add_profile_sync_settings()
|
||||
{
|
||||
/usr/bin/psd >/dev/null 2>&1
|
||||
|
@ -178,6 +187,7 @@ add_profile_sync_settings()
|
|||
|
||||
|
||||
|
||||
|
||||
add_user()
|
||||
{
|
||||
read -t 0 temp
|
||||
|
@ -337,12 +347,15 @@ if [[ -f /root/.not_logged_in_yet && -n $(tty) ]]; then
|
|||
# select deepin session
|
||||
[[ -x $(which deepin-wm) ]] && sed -i "s/user-session.*/user-session=deepin/" /etc/lightdm/lightdm.conf.d/11-armbian.conf
|
||||
[[ -x $(which deepin-wm) ]] && sed -i "s/user-session.*/user-session=deepin/" /etc/lightdm/lightdm.conf.d/22-armbian-autologin.conf
|
||||
|
||||
# select gnome session
|
||||
[[ -x $(which gnome-session) ]] && sed -i "s/user-session.*/user-session=ubuntu/" /etc/lightdm/lightdm.conf.d/11-armbian.conf
|
||||
[[ -x $(which gnome-session) ]] && sed -i "s/user-session.*/user-session=ubuntu/" /etc/lightdm/lightdm.conf.d/22-armbian-autologin.conf
|
||||
|
||||
# select cinnamon session
|
||||
[[ -x $(which cinnamon) ]] && sed -i "s/user-session.*/user-session=cinnamon/" /etc/lightdm/lightdm.conf.d/11-armbian.conf
|
||||
[[ -x $(which cinnamon) ]] && sed -i "s/user-session.*/user-session=cinnamon/" /etc/lightdm/lightdm.conf.d/22-armbian-autologin.conf
|
||||
|
||||
# select mate session
|
||||
[[ -x $(which mate-wm) ]] && sed -i "s/user-session.*/user-session=mate/" /etc/lightdm/lightdm.conf.d/11-armbian.conf
|
||||
[[ -x $(which mate-wm) ]] && sed -i "s/user-session.*/user-session=mate/" /etc/lightdm/lightdm.conf.d/22-armbian-autologin.conf
|
||||
|
@ -371,11 +384,12 @@ if [[ -f /root/.not_logged_in_yet && -n $(tty) ]]; then
|
|||
|
||||
# 1st run goes without login
|
||||
mkdir -p /etc/gdm3
|
||||
cat <<-EOF > /etc/gdm3/custom.conf
|
||||
[daemon]
|
||||
AutomaticLoginEnable = true
|
||||
AutomaticLogin = $RealUserName
|
||||
EOF
|
||||
cat <<-EOF > /etc/gdm3/custom.conf
|
||||
[daemon]
|
||||
AutomaticLoginEnable = true
|
||||
AutomaticLogin = $RealUserName
|
||||
EOF
|
||||
|
||||
ln -sf /lib/systemd/system/gdm3.service /etc/systemd/system/display-manager.service
|
||||
|
||||
if [[ -f /var/run/resize2fs-reboot ]]; then
|
||||
|
|
Loading…
Add table
Reference in a new issue