]> git.plutz.net Git - rpi_small/commitdiff
autologin GUI for graph display
authorPaul Hänsch <paul@plutz.net>
Mon, 4 Mar 2019 17:28:34 +0000 (18:28 +0100)
committerPaul Hänsch <paul@plutz.net>
Mon, 4 Mar 2019 17:28:34 +0000 (18:28 +0100)
Makefile
files/etc/default/keyboard [new file with mode: 0644]
files/etc/default/nodm [new file with mode: 0644]
files/root/postbuild.sh [new file with mode: 0755]

index b24b42bc2ee50b1f6ec0fb49b522aa6f91236d0e..72176cfa4ee1de7eadf3eef88267d7c929bde9b7 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -24,7 +24,7 @@ deb   http://raspbian.raspberrypi.org/raspbian stretch main non-free firmware rpi\
 deb    http://archive.raspberrypi.org/debian stretch main\n
 endef
 
 deb    http://archive.raspberrypi.org/debian stretch main\n
 endef
 
-PACKAGES := apt bluez bluez-firmware bluez-tools bridge-utils btrfs-tools busybox-static bzip2 ca-certificates cron deborphan dnsmasq firmware-brcm80211 firmware-linux-free firmware-misc-nonfree gzip htop ifupdown init iptables iputils-ping irqbalance isc-dhcp-client less libraspberrypi-bin libraspberrypi0 make net-tools nmap ntpdate openbsd-inetd openssh-client openssh-server pi-bluetooth rpi-update rsync ssh sshfs sudo systemd traceroute unzip vim wget wireless-tools wpasupplicant xz-utils zip
+PACKAGES := apt bluez bluez-firmware bluez-tools bridge-utils btrfs-tools busybox-static bzip2 ca-certificates cron deborphan dnsmasq firmware-brcm80211 firmware-linux-free firmware-misc-nonfree gzip htop ifupdown init iptables iputils-ping irqbalance isc-dhcp-client less libraspberrypi-bin libraspberrypi0 make net-tools nmap ntpdate openbsd-inetd openssh-client openssh-server pi-bluetooth rpi-update rsync ssh sshfs sudo systemd traceroute unzip vim wget wireless-tools wpasupplicant xz-utils zip xserver-xorg-video-fbturbo xserver-xorg nodm chromium-browser
 
 # Do not change, only override in config.mk
 WIFI-SSID = 
 
 # Do not change, only override in config.mk
 WIFI-SSID = 
@@ -81,7 +81,7 @@ include *.mk
 raspi.img: raspi_root/ files/ partitions files/root/.ssh/authorized_keys files/etc/network/interfaces.d/wifi
        -rmdir "$@.mnt"
        mkdir "$@.mnt"  # fail receipe if dir is nonempty
 raspi.img: raspi_root/ files/ partitions files/root/.ssh/authorized_keys files/etc/network/interfaces.d/wifi
        -rmdir "$@.mnt"
        mkdir "$@.mnt"  # fail receipe if dir is nonempty
-       dd bs=1M count=0 seek=1792 of="$@"  # set up sparse file
+       dd bs=1M count=0 seek=3072 of="$@"  # set up sparse file
        sfdisk "$@" <partitions
        lo=$$(losetup -f); image='$@'; \
        start=$$(sfdisk --dump "$$image" |sed -rn 's;^.*start= *([0-9]+),.*type=83;\1;p'); \
        sfdisk "$@" <partitions
        lo=$$(losetup -f); image='$@'; \
        start=$$(sfdisk --dump "$$image" |sed -rn 's;^.*start= *([0-9]+),.*type=83;\1;p'); \
@@ -95,6 +95,7 @@ raspi.img: raspi_root/ files/ partitions files/root/.ssh/authorized_keys files/e
        losetup -o $$((start * 512)) --sizelimit $$((size * 512)) "$${lo}" "$$image" && \
        mkfs.fat -F 32 -n boot "$$lo" && mount -t vfat "$$lo" "$@.mnt/boot";
        cp -a "raspi_root/." "files/." "$@.mnt/"
        losetup -o $$((start * 512)) --sizelimit $$((size * 512)) "$${lo}" "$$image" && \
        mkfs.fat -F 32 -n boot "$$lo" && mount -t vfat "$$lo" "$@.mnt/boot";
        cp -a "raspi_root/." "files/." "$@.mnt/"
+       -chroot "$@.mnt/" /root/postbuild.sh
        umount "$@.mnt/boot/" "$@.mnt/"
        losetup -a |sed -rn '/$@/{s;^([^:]+):.*$$;\1;p;q}' |xargs losetup -d
        losetup -a |sed -rn '/$@/{s;^([^:]+):.*$$;\1;p;q}' |xargs losetup -d
        umount "$@.mnt/boot/" "$@.mnt/"
        losetup -a |sed -rn '/$@/{s;^([^:]+):.*$$;\1;p;q}' |xargs losetup -d
        losetup -a |sed -rn '/$@/{s;^([^:]+):.*$$;\1;p;q}' |xargs losetup -d
diff --git a/files/etc/default/keyboard b/files/etc/default/keyboard
new file mode 100644 (file)
index 0000000..3fecbcc
--- /dev/null
@@ -0,0 +1,10 @@
+# KEYBOARD CONFIGURATION FILE
+
+# Consult the keyboard(5) manual page.
+
+XKBMODEL="pc105"
+XKBLAYOUT="us"
+XKBVARIANT=""
+XKBOPTIONS=""
+
+BACKSPACE="guess"
diff --git a/files/etc/default/nodm b/files/etc/default/nodm
new file mode 100644 (file)
index 0000000..f166266
--- /dev/null
@@ -0,0 +1,33 @@
+# nodm configuration
+
+# Set NODM_ENABLED to something different than 'false' to enable nodm
+NODM_ENABLED=true
+
+# User to autologin for
+NODM_USER=local
+
+# First vt to try when looking for free VTs
+NODM_FIRST_VT=7
+
+# X session
+#NODM_XSESSION=/etc/X11/Xsession
+NODM_XSESSION=/usr/bin/chromium-browser --app=http://localhost/
+
+# Options for nodm itself
+NODM_OPTIONS=
+
+# Options for the X server.
+#
+# Format: [/usr/bin/<Xserver>] [:<disp>] <Xserver-options>
+#
+# The Xserver executable and the display name can be omitted, but should
+# be placed in front, if nodm's defaults shall be overridden.
+NODM_X_OPTIONS='-nolisten tcp'
+
+# If an X session will run for less than this time in seconds, nodm will wait an
+# increasing bit of time before restarting the session.
+NODM_MIN_SESSION_TIME=60
+
+# Timeout (in seconds) to wait for X to be ready to accept connections. If X is
+# not ready before this timeout, it is killed and restarted.
+NODM_X_TIMEOUT=300
diff --git a/files/root/postbuild.sh b/files/root/postbuild.sh
new file mode 100755 (executable)
index 0000000..faf7de6
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+usermod -p "$(openssl passwd -1 -salt ert root)" root
+useradd -m local