From b211c4ecf80ffb9215e25274e7e9ef042b0cd302 Mon Sep 17 00:00:00 2001
From: tobiglaser <76131623+tobiglaser@users.noreply.github.com>
Date: Thu, 24 Nov 2022 17:42:52 +0100
Subject: [PATCH] fix ownership of example folder + add 2. example

---
 Arduino/hello-world/hello-world.ino | 13 +++++++++++++
 setup.sh                            |  3 ++-
 2 files changed, 15 insertions(+), 1 deletion(-)
 create mode 100644 Arduino/hello-world/hello-world.ino

diff --git a/Arduino/hello-world/hello-world.ino b/Arduino/hello-world/hello-world.ino
new file mode 100644
index 0000000..4ffc945
--- /dev/null
+++ b/Arduino/hello-world/hello-world.ino
@@ -0,0 +1,13 @@
+unsigned int i = 0;
+
+void setup() {
+  // put your setup code here, to run once:
+  Serial.begin(9600);
+}
+
+void loop() {
+  // put your main code here, to run repeatedly:
+  Serial.print("Hello World! ");
+  Serial.println(i++);
+  delay(400);
+}
diff --git a/setup.sh b/setup.sh
index 0d8447c..c47d19a 100755
--- a/setup.sh
+++ b/setup.sh
@@ -163,11 +163,12 @@
 		sudo cp /usr/share/applications/arduino.desktop /home/$vncBaseName$i/Desktop/
 	done
 
-	echo "Adding example Sketch."
+	echo "Adding example Sketches."
 	for i in $(seq 1 $vncCount)
 	do
 		sudo mkdir -p /home/$vncBaseName$i/Arduino
 		sudo cp -r Arduino/* /home/$vncBaseName$i/Arduino/
+		sudo chown -R $vncBaseName$i:$vncBaseName$i /home/$vncBaseName$i/Arduino/
 	done
 
 #display useful info
-- 
GitLab