From bee989bb3cc4c03cff6f310b37b8b30c1a4dff6f Mon Sep 17 00:00:00 2001
From: Britney Fransen <brfransen@gmail.com>
Date: Thu, 1 Dec 2022 00:12:39 -0500
Subject: linhes-system: lh_system_start.sh: change x11vnc setup

---
 linhes/linhes-system/PKGBUILD           |  4 ++--
 linhes/linhes-system/lh_system_start.sh | 15 +++++++++------
 2 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/linhes/linhes-system/PKGBUILD b/linhes/linhes-system/PKGBUILD
index baa5796..50579fd 100755
--- a/linhes/linhes-system/PKGBUILD
+++ b/linhes/linhes-system/PKGBUILD
@@ -1,6 +1,6 @@
 pkgname=linhes-system
 pkgver=9.0.0
-pkgrel=4
+pkgrel=5
 arch=('x86_64')
 #install=$pkgname.install
 pkgdesc="Everything that makes LinHES a system"
@@ -25,7 +25,7 @@ sha256sums=('96f67b5428debb7dac909893c56a7637bf6545c068732822981d4080125c53d9'
             '11168c9cd3b117decaab6bc665c183b4aab917cf0a976bce4c1b5e4686a27bc9'
             'ae34515e144830f424d3bd3f6b1b446892d62beed20bca6f0fb19b0bbb779f27'
             '23358a7bff4968eccd469613b81b1415c2ae0ebe77f14f74426697333e4d88d7'
-            'cb37ebf3967180fd6cf3a28cf0f685c5d69c344ef309355cfb42f6ad0f2ccf10'
+            '024c4270fe929ca9046ab34ebb03ab37f9647bb51c7b40ab2da5a08a278be54f'
             '91bdec992bb2c933e15625c181f2195c402060b879168ebf35944cb064c904b9'
             'cedd34e448d3d45ab0f9fff40c115401f45bdea5b99215d0aff514a759ae2b7c'
             '76f023c0cde7fea269234f1b29c32b117b91769217d4b1b8a3922daceb25f9f8'
diff --git a/linhes/linhes-system/lh_system_start.sh b/linhes/linhes-system/lh_system_start.sh
index e3243a5..f6be2d7 100755
--- a/linhes/linhes-system/lh_system_start.sh
+++ b/linhes/linhes-system/lh_system_start.sh
@@ -24,9 +24,10 @@ function applyUIsettings(){
 }
 
 function x11vnc_setup(){
-    msg "Set x11vnc Password" "Open Konsole run x11vnc -storepasswd"
+    konsole -e /bin/bash -i -c "echo 'Create VNC password.' && x11vnc --storepasswd"
+    mkdir ~/.vnc
     touch ~/.vnc/x11vnc.log
-    /usr/bin/systemctl enable --now x11vnc.service
+    sudo /usr/bin/systemctl enable --now x11vnc.service
 }
 
 function bashrc_setup(){
@@ -39,8 +40,9 @@ function bashrc_setup(){
 }
 
 function nanorc_setup(){
-    mkdir ~/.config/nano
-    echo -e 'set tabsize 4\nset tabstospaces\ninclude "/usr/share/nano/*.nanrc"' >> ~/.config/nano/nanorc
+    sudo sed -i 's/# set tabsize.*/set tabsize 4/' /etc/nanorc
+    sudo sed -i 's/# set tabstospaces.*/set tabstospaces/' /etc/nanorc
+    sudo sed -i 's/# include "\/usr\/share\/nano\/*.nanorc/include "\/usr\/share\/nano\/*.nanorc"/' /etc/nanorc
 }
 
 function storage_scan(){
@@ -51,7 +53,7 @@ function storage_scan(){
 
 function install_lh_apps(){
     #install programs that are not needed on the iso
-    sudo pacman -Syyy firefox glances mythtv ncdu x11vnc
+    sudo pacman -Syyy -noconfirm firefox glances mythtv ncdu x11vnc
 }
 
 function first_configure(){
@@ -59,6 +61,7 @@ function first_configure(){
         #apply settings for all system types
         applyUIsettings
         msg "New install of LinHES. Starting setup."
+        install_lh_apps
         nanorc_setup
         bashrc_setup
         x11vnc_setup
@@ -69,6 +72,7 @@ function first_configure(){
             #nice -n 19 mythfilldatabase --quiet &
             msg "Guide data is being loaded." "Until this completes some shows will appear as unknown in the program guide."
         else
+            msg "Frontend Only"
             #Frontend_only cmds
         fi
         touch ~/.config/lh_configured
@@ -80,5 +84,4 @@ function first_configure(){
 #-------MAIN-------
 first_configure
 /usr/bin/enableIRWake.sh &
-xset -dpms s off
 storage_scan
-- 
cgit v0.12