1
0
Fork 0

enable autologin in KDE if installation is performed inside a VM

This commit is contained in:
Pratham Patel 2022-12-08 12:27:08 +05:30
parent 7f12570d90
commit 601bc07474
1 changed files with 21 additions and 1 deletions

View File

@ -82,7 +82,6 @@ timedatectl set-ntp true
# choose the drive to install Arch Linux on
OS_DRIVE=empty
CORRECTLY_CHOSEN=n
VM_SYS_NAME=$(dmidecode -s system-manufacturer)
if [[ $(grep 'AuthenticAMD' /proc/cpuinfo) ]]; then
CPU_VENDOR_NAME="amd"
@ -225,6 +224,27 @@ fi
cp scripts/pratham-setup.sh /mnt/home/pratham/pratham-setup.sh
arch-chroot /mnt chown -v pratham:pratham /home/pratham/pratham-setup.sh
# enable auto-login if Arch Linux is installed inside a VM
if [[ $(dmidecode -s system-manufacturer) == "QEMU" ]]; then
cat <<EOF > /etc/sddm.conf.d/kde_settings.conf
[Autologin]
Relogin=false
Session=plasmawayland
User=pratham
[General]
HaltCommand=/usr/bin/systemctl poweroff
RebootCommand=/usr/bin/systemctl reboot
[Theme]
Current=
[Users]
MaximumUid=60513
MinimumUid=1000
EOF
fi
################################################################################
# POST-INSTALL PROCEDURE