diff --git a/airootfs/etc/X11/xinit/xinitrc b/airootfs/etc/X11/xinit/xinitrc index ae9c055..298a380 100755 --- a/airootfs/etc/X11/xinit/xinitrc +++ b/airootfs/etc/X11/xinit/xinitrc @@ -1,3 +1,5 @@ #!/bin/bash +[ -f ~/.xprofile ] && . ~/.xprofile + exec /usr/bin/startxfce4 diff --git a/airootfs/etc/systemd/scripts/sysrescue-initialize b/airootfs/etc/systemd/scripts/sysrescue-initialize index 0e6ec04..d2e0e3e 100755 --- a/airootfs/etc/systemd/scripts/sysrescue-initialize +++ b/airootfs/etc/systemd/scripts/sysrescue-initialize @@ -20,7 +20,7 @@ do # Set the system root password from a clear password rootpass=*) - echo "Found option 'rootpass=******' on the boot command line" + echo "Found option '${curopt%%=*}=******' on the boot command line" if echo "root:${curopt#*=}" | chpasswd --crypt-method SHA512 then echo "Password successfully changed" @@ -34,7 +34,7 @@ do # A password can be encrypted using a one-line python3 command such as: # python3 -c 'import crypt; print(crypt.crypt("MyPassWord123", crypt.mksalt(crypt.METHOD_SHA512)))' rootcryptpass=*) - echo "Found option 'rootcryptpass=******' on the boot command line" + echo "Found option '${curopt%%=*}=******' on the boot command line" if echo "root:${curopt#*=}" | chpasswd --encrypted then echo "Password successfully changed" @@ -63,6 +63,25 @@ do echo "Found option '${curopt}' on the boot command line" systemctl revert getty@.service serial-getty@.service ;; + + # Set the VNC password from a clear password + vncpass=*) + echo "Found option '${curopt%%=*}=******' on the boot command line" + mkdir -p /root/.vnc + if x11vnc -storepasswd ${curopt#*=} /root/.vnc/passwd + then + echo "VNC password successfully changed" + else + echo "Failed to change VNC password" + errcnt=$((errcnt + 1)) + fi + ;; + + # Auto-start x11vnc with the graphical environment + dovnc) + echo "Found option '${curopt}' on the boot command line" + echo 'x11vnc -nevershared -forever -logfile /var/log/x11vnc.log &' > /root/.xprofile + ;; esac done diff --git a/packages b/packages index 03042b7..d9f0c13 100644 --- a/packages +++ b/packages @@ -170,6 +170,7 @@ wireless-regdb wireless_tools wpa_supplicant wvdial +x11vnc xarchiver xfburn xfce4