We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 77abb8c commit 5be08bfCopy full SHA for 5be08bf
1 file changed
pi-node/setup.sh
@@ -144,8 +144,12 @@ ExecStart=
144
ExecStart=-/sbin/agetty --autologin pi --noclear %I $TERM
145
CONF
146
147
-if ! grep -q "startx" /home/pi/.bash_profile 2>/dev/null; then
148
- echo '[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && startx -- -nocursor' >> /home/pi/.bash_profile
+# only add auto‑start line if the pi user exists and has a home
+if [[ -d /home/pi ]]; then
149
+ if ! grep -q "startx" /home/pi/.bash_profile 2>/dev/null; then
150
+ # >> will create the file if it doesn't already exist
151
+ echo '[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && startx -- -nocursor' >> /home/pi/.bash_profile
152
+ fi
153
fi
154
155
mkdir -p /home/pi/.config/openbox
0 commit comments