This repository has been archived by the owner on May 30, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
/
install-x11-basics.sh
executable file
·65 lines (51 loc) · 1.76 KB
/
install-x11-basics.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
56
57
58
59
60
61
62
63
64
65
#!/bin/bash
set +x
set -e
echo ""
echo "Installing basic X11 packages on HypriotOS"
# --------------------------------------------------------------------
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: install X11 and LightDM"
sudo apt-get update
sudo apt-get install -y --no-install-recommends xserver-xorg xinit xserver-xorg-video-fbdev lxde lxde-common lightdm x11-xserver-utils
sudo apt-get install -y policykit-1 hal
echo "...done"
# --------------------------------------------------------------------
echo ""
echo " STEP 3: 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"