You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: setup.sh
+30-1Lines changed: 30 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -523,6 +523,11 @@ setup_novnc_service() {
523
523
return
524
524
fi
525
525
526
+
if!command -v systemctl &> /dev/null;then
527
+
print_error "systemctl command not found. Cannot set up noVNC systemd service."
528
+
return 1
529
+
fi
530
+
526
531
print_status "Non-WSL environment detected - Proceeding with noVNC service setup"
527
532
528
533
# Create systemd directory if it doesn't exist
@@ -548,6 +553,9 @@ setup_novnc_service() {
548
553
NOVNC_PATH="$SCRIPT_DIR/novnc"
549
554
fi
550
555
556
+
print_warning "The noVNC systemd service will be configured to proxy VNC display :0 (port 5900) by default."
557
+
print_warning "If your VNC sessions use other displays/ports, you may need to adjust the noVNC client URL or start websockify manually for those specific sessions."
558
+
551
559
# Create noVNC systemd service
552
560
cat >"$SYSTEMD_DIR/novnc.service"<<EOF
553
561
[Unit]
@@ -642,11 +650,32 @@ install_local() {
642
650
643
651
# Function to setup systemd service
644
652
setup_systemd_service() {
653
+
# Detect if we are in WSL
654
+
if grep -qiE "(microsoft|wsl)" /proc/sys/kernel/osrelease 2>/dev/null;then
655
+
print_warning "Detected WSL environment. Systemd services might not work as expected unless systemd is explicitly enabled in your WSL2 distribution."
656
+
local attempt_wsl_service_core # Use local to avoid conflicts
657
+
read -p "Still attempt to set up CoreSecFrame as a systemd service? (y/N): " attempt_wsl_service_core
658
+
if [[ !$attempt_wsl_service_core=~ ^[Yy]$ ]];then
659
+
print_status "Skipping systemd service setup for CoreSecFrame in WSL."
660
+
return
661
+
fi
662
+
fi
663
+
645
664
print_header "=== System Service Setup ==="
646
665
647
666
read -p "Would you like to set up CoreSecFrame to start automatically on system boot? (y/N): " auto_start
648
667
649
668
if [[ $auto_start=~ ^[Yy]$ ]];then
669
+
if!command -v systemctl &> /dev/null;then
670
+
print_error "systemctl command not found. Cannot set up systemd service."
671
+
return 1
672
+
fi
673
+
674
+
if [ !-f"$SCRIPT_DIR/run.py" ];then
675
+
print_error "$SCRIPT_DIR/run.py not found. Cannot set up service."
0 commit comments