From 90fa85442db7d9bea0c9eaff9e40d23efc494304 Mon Sep 17 00:00:00 2001
From: Florent Gluck <florent.gluck@hesge.ch>
Date: Mon, 29 Jul 2024 19:04:40 +0200
Subject: [PATCH] Fixed an issue since I renamed screen into x11 but not
 everywhere, doh! Added numlock to always be on

---
 live_exam_os/Dockerfile                          | 16 ++++++++--------
 live_exam_os/config/packages.list.chroot         |  1 +
 .../x11_settings.desktop}                        |  2 +-
 .../screen_settings.sh => x11/x11_settings.sh}   |  3 +++
 4 files changed, 13 insertions(+), 9 deletions(-)
 rename live_exam_os/config/{screen/screen_settings.desktop => x11/x11_settings.desktop} (79%)
 rename live_exam_os/config/{screen/screen_settings.sh => x11/x11_settings.sh} (81%)

diff --git a/live_exam_os/Dockerfile b/live_exam_os/Dockerfile
index 20b31dc4..82e368dd 100644
--- a/live_exam_os/Dockerfile
+++ b/live_exam_os/Dockerfile
@@ -25,14 +25,14 @@ ADD ${config_dir}/keyboard/keyboard config/includes.chroot/etc/default/
 ADD ${config_dir}/nexus-exam config/includes.chroot/usr/local/bin/
 ADD ${config_dir}/nexus-exam.desktop config/includes.chroot/etc/xdg/autostart/
 
-## Run various screen settings as soon as user logs in
-ADD ${config_dir}/screen/screen_settings.sh config/includes.chroot/usr/local/bin/
-ADD ${config_dir}/screen/screen_settings.desktop config/includes.chroot/etc/xdg/autostart/
-
-## Systemd service to set various screen settings (does not work - not sure why)
-# ADD ${config_dir}/systemd/screen_settings.sh config/includes.chroot/usr/local/bin/
-# RUN chmod +x config/includes.chroot/usr/local/bin/screen_settings.sh
-# ADD ${config_dir}/systemd/screen_settings.service config/includes.chroot/etc/systemd/system/
+## Run various X11 settings as soon as user logs in
+ADD ${config_dir}/x11/x11_settings.sh config/includes.chroot/usr/local/bin/
+ADD ${config_dir}/x11/x11_settings.desktop config/includes.chroot/etc/xdg/autostart/
+
+## Systemd service to set various X11 settings (does not work - not sure why)
+# ADD ${config_dir}/systemd/x11_settings.sh config/includes.chroot/usr/local/bin/
+# RUN chmod +x config/includes.chroot/usr/local/bin/x11_settings.sh
+# ADD ${config_dir}/systemd/x11_settings.service config/includes.chroot/etc/systemd/system/
 
 # RUN mkdir config/includes.chroot/etc/skel/
 # RUN echo "export NEXUS_SERVER=${server_ip}\nexport NEXUS_CERT=/etc/ssl/certs/nexus-server.pem\n" >> config/includes.chroot/etc/skel/.xsessionrc
diff --git a/live_exam_os/config/packages.list.chroot b/live_exam_os/config/packages.list.chroot
index 262f567a..919b6f95 100644
--- a/live_exam_os/config/packages.list.chroot
+++ b/live_exam_os/config/packages.list.chroot
@@ -13,3 +13,4 @@ network-manager
 network-manager-gnome
 systemd-timesyncd
 light
+numlockx
diff --git a/live_exam_os/config/screen/screen_settings.desktop b/live_exam_os/config/x11/x11_settings.desktop
similarity index 79%
rename from live_exam_os/config/screen/screen_settings.desktop
rename to live_exam_os/config/x11/x11_settings.desktop
index 16b92103..82d8785c 100644
--- a/live_exam_os/config/screen/screen_settings.desktop
+++ b/live_exam_os/config/x11/x11_settings.desktop
@@ -4,7 +4,7 @@ Version=0.9.4
 Type=Application
 Name=screen settings
 Comment=
-Exec=bash /usr/local/bin/screen_settings.sh
+Exec=bash /usr/local/bin/x11_settings.sh
 OnlyShowIn=XFCE;
 RunHook=0
 StartupNotify=false
diff --git a/live_exam_os/config/screen/screen_settings.sh b/live_exam_os/config/x11/x11_settings.sh
similarity index 81%
rename from live_exam_os/config/screen/screen_settings.sh
rename to live_exam_os/config/x11/x11_settings.sh
index 7b81ba32..5c0127cf 100644
--- a/live_exam_os/config/screen/screen_settings.sh
+++ b/live_exam_os/config/x11/x11_settings.sh
@@ -5,3 +5,6 @@ xset s off
 
 # Set brightness to 100%
 light -S 100
+
+# Enable numlock
+numlockx on
-- 
GitLab