-
Notifications
You must be signed in to change notification settings - Fork 0
/
arm.sh
55 lines (45 loc) · 1.48 KB
/
arm.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/bash
set +x
set -e
# TODO: Detect display driver.
echo ""
echo "Installing basic X11 packages on DIREKTSPEED-OS"
# --------------------------------------------------------------------
echo ""
echo " STEP 1: create a /boot/config.txt"
CONFIG_TXT_FILE=/boot/config.txt
if [ ! -f ${CONFIG_TXT_FILE} ]; then
cat << EOF | sudo tee ${CONFIG_TXT_FILE} >/dev/null
display_rotate=0 # normal HDMI displays
#display_rotate=2 # 7" Touch Screen display from RaspberryPi.Org
EOF
fi
cat ${CONFIG_TXT_FILE}
echo "...done"
# --------------------------------------------------------------------
echo ""
echo " STEP 2: enable LightDM autologin for user=pirate"
LIGHTDM_CONF_FILE=/etc/lightdm/lightdm.conf
if [ ! -f ${LIGHTDM_CONF_FILE}.sav ]; then
# backup original file
sudo mv ${LIGHTDM_CONF_FILE} ${LIGHTDM_CONF_FILE}.sav
cat << EOF | sudo tee ${LIGHTDM_CONF_FILE} >/dev/null
[SeatDefaults]
autologin-user=pirate
autologin-user-timeout=0
EOF
fi
cat ${LIGHTDM_CONF_FILE}
echo "...done"
# --------------------------------------------------------------------
#echo ""
#echo " STEP 4: install pre-compiled fbturbo"
#FBTURBO_TAR_URL=https://github.com/hypriot/x11-on-HypriotOS/raw/master/fbturbo/fbturbo.tar.gz
#FBTURBO_TAR_TMPFILE=/tmp/fbturbo.tar.gz
#wget -O ${FBTURBO_TAR_TMPFILE} ${FBTURBO_TAR_URL}
#sudo tar xvf ${FBTURBO_TAR_TMPFILE} -C /
#rm -f ${FBTURBO_TAR_TMPFILE}
#echo "...done"
# --------------------------------------------------------------------
echo ""
echo "...X11 installation done, please reboot"