From e99b63b67c390f752684555f01436d4395b5826b Mon Sep 17 00:00:00 2001 From: Flutter Date: Mon, 9 Oct 2023 13:24:52 +0200 Subject: [PATCH] added config files --- README.md | 6 ++++-- files/etc/default/eggnogg | 2 ++ files/etc/default/nodm | 32 ++++++++++++++++++++++++++++++ files/etc/systemd/system/eggnoggpi.service | 18 +++++++++++++++++ 4 files changed, 56 insertions(+), 2 deletions(-) create mode 100644 files/etc/default/eggnogg create mode 100644 files/etc/default/nodm create mode 100644 files/etc/systemd/system/eggnoggpi.service diff --git a/README.md b/README.md index 4d38af0..23c2603 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ Since we installed raspbian lite on the pi, we'll need to install xorg and set i You can then configure nodm or just use the configuration file with this repo - cp nodm /etc/default/nodm + cp files/etc/default/nodm /etc/default/nodm ## Download eggnoggplus @@ -44,8 +44,10 @@ To be continued To allow eggnogg to start on boot, we install it as a systemd service, you can write your own or just use the one with this repos - cp eggnoggpi.service /etc/systemd/system/eggnoggpi.service + cp files/etc/systemd/system/eggnoggpi.service /etc/systemd/system/eggnoggpi.service systemctl daemon-reload systemctl enable eggnoggpi systemctl start eggnoggpi +If eggnoggpi doesn't start with the pi, add this little hack too + echo "@reboot root /sbin/service eggnoggpi start" >> /etc/crontab diff --git a/files/etc/default/eggnogg b/files/etc/default/eggnogg new file mode 100644 index 0000000..f417f54 --- /dev/null +++ b/files/etc/default/eggnogg @@ -0,0 +1,2 @@ +# X-Windows screen identifier +DISPLAY=:0 diff --git a/files/etc/default/nodm b/files/etc/default/nodm new file mode 100644 index 0000000..feaecfd --- /dev/null +++ b/files/etc/default/nodm @@ -0,0 +1,32 @@ +# nodm configuration + +# Set NODM_ENABLED to something different than 'false' to enable nodm +NODM_ENABLED=true + +# User to autologin for +NODM_USER=pi + +# First vt to try when looking for free VTs +NODM_FIRST_VT='7' + +# X session +NODM_XSESSION=/etc/X11/Xsession + +# Options for nodm itself +NODM_OPTIONS= + +# Options for the X server. +# +# Format: [/usr/bin/] [:] +# +# 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/etc/systemd/system/eggnoggpi.service b/files/etc/systemd/system/eggnoggpi.service new file mode 100644 index 0000000..aa85d43 --- /dev/null +++ b/files/etc/systemd/system/eggnoggpi.service @@ -0,0 +1,18 @@ +[Unit] +Description=Eggnogg Plus on a Raspberry Pi +Requires=nodm.service +After=nodm.service + +[Service] +Restart=always +User=pi +Group=pi +EnvironmentFile=/etc/default/eggnogg + +WorkingDirectory=/home/pi/eggnoggplus-linux +ExecStartPre=sleep 5 +ExecStart=/home/pi/eggnoggplus-linux/eggnoggplus + +[Install] +WantedBy=graphical.target +