From b9ef076dc8bccc2008affc6e32288baa3bcb896a Mon Sep 17 00:00:00 2001 From: Sears Schulz <36250748+sears-s@users.noreply.github.com> Date: Fri, 23 May 2025 20:54:12 -0500 Subject: [PATCH 1/4] Allow VM_NAME to be changed --- bin/winapps | 2 +- setup.sh | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/bin/winapps b/bin/winapps index 892e533..b35305b 100755 --- a/bin/winapps +++ b/bin/winapps @@ -29,7 +29,6 @@ readonly COMPOSE_PATH="${HOME}/.config/winapps/compose.yaml" readonly SCRIPT_DIR_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)" # OTHER -readonly VM_NAME="RDPWindows" # FOR 'libvirt' ONLY readonly CONTAINER_NAME="WinApps" # FOR 'docker' AND 'podman' ONLY readonly RDP_PORT=3389 readonly DOCKER_IP="127.0.0.1" @@ -42,6 +41,7 @@ RDP_USER="" RDP_PASS="" RDP_DOMAIN="" RDP_IP="" +VM_NAME="RDPWindows" # FOR 'libvirt' ONLY WAFLAVOR="docker" RDP_FLAGS="" FREERDP_COMMAND="" diff --git a/setup.sh b/setup.sh index f1c6813..0debe4d 100755 --- a/setup.sh +++ b/setup.sh @@ -73,7 +73,6 @@ readonly CONFIG_PATH="${HOME}/.config/winapps/winapps.conf" # UNIX path to the W readonly INQUIRER_PATH="./install/inquirer.sh" # UNIX path to the 'inquirer' script, which is used to produce selection menus. # REMOTE DESKTOP CONFIGURATION -readonly VM_NAME="RDPWindows" # Name of the Windows VM (FOR 'libvirt' ONLY). readonly RDP_PORT=3389 # Port used for RDP on Windows. readonly DOCKER_IP="127.0.0.1" # Localhost. @@ -85,17 +84,18 @@ OPT_UNINSTALL=0 # Set to '1' if the user specifies '--uninstall'. OPT_AOSA=0 # Set to '1' if the user specifies '--setupAllOfficiallySupportedApps'. # WINAPPS CONFIGURATION FILE -RDP_USER="" # Imported variable. -RDP_PASS="" # Imported variable. -RDP_DOMAIN="" # Imported variable. -RDP_IP="" # Imported variable. -WAFLAVOR="docker" # Imported variable. -RDP_SCALE=100 # Imported variable. -RDP_FLAGS="" # Imported variable. -MULTIMON="false" # Imported variable. -DEBUG="true" # Imported variable. -FREERDP_COMMAND="" # Imported variable. -MULTI_FLAG="" # Set based on value of $MULTIMON. +RDP_USER="" # Imported variable. +RDP_PASS="" # Imported variable. +RDP_DOMAIN="" # Imported variable. +RDP_IP="" # Imported variable. +VM_NAME="RDPWindows" # Name of the Windows VM (FOR 'libvirt' ONLY). +WAFLAVOR="docker" # Imported variable. +RDP_SCALE=100 # Imported variable. +RDP_FLAGS="" # Imported variable. +MULTIMON="false" # Imported variable. +DEBUG="true" # Imported variable. +FREERDP_COMMAND="" # Imported variable. +MULTI_FLAG="" # Set based on value of $MULTIMON. # PERMISSIONS AND DIRECTORIES SUDO="" # Set to "sudo" if the user specifies '--system', or "" if the user specifies '--user'. From a2568be16f01a1587da8844687a42dffffaf67ce Mon Sep 17 00:00:00 2001 From: Sears Schulz <36250748+sears-s@users.noreply.github.com> Date: Fri, 23 May 2025 21:16:30 -0500 Subject: [PATCH 2/4] Update setup.patch to prevent need for fuzz --- packages/winapps/setup.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/winapps/setup.patch b/packages/winapps/setup.patch index 4f2cd87..b7c95fb 100644 --- a/packages/winapps/setup.patch +++ b/packages/winapps/setup.patch @@ -1,5 +1,5 @@ diff --git a/setup.sh b/setup.sh -index b7d930d6..18000c65 100755 +index 0debe4d..6aeea08 100755 --- a/setup.sh +++ b/setup.sh @@ -39,8 +39,8 @@ readonly SYS_BIN_PATH="/usr/local/bin" # UNIX path to 'bin' dir @@ -21,7 +21,7 @@ index b7d930d6..18000c65 100755 +readonly INQUIRER_PATH="@out@/src/install/inquirer.sh" # UNIX path to the 'inquirer' script, which is used to produce selection menus. # REMOTE DESKTOP CONFIGURATION - readonly VM_NAME="RDPWindows" # Name of the Windows VM (FOR 'libvirt' ONLY). + readonly RDP_PORT=3389 # Port used for RDP on Windows. @@ -155,13 +155,6 @@ function waGetSourceCode() { echo -e "${WARNING_TEXT}[WARNING]${CLEAR_TEXT} You might want to remove your old installation on '${SCRIPT_DIR_PATH}'." fi From 4019f9cb81edf10417ad6ab714635ce8091cef99 Mon Sep 17 00:00:00 2001 From: Sears Schulz <36250748+sears-s@users.noreply.github.com> Date: Fri, 23 May 2025 21:24:33 -0500 Subject: [PATCH 3/4] Update docs for VM_NAME --- README.md | 7 +++++++ docs/libvirt.md | 3 +++ 2 files changed, 10 insertions(+) diff --git a/README.md b/README.md index 24545d5..43bc23a 100644 --- a/README.md +++ b/README.md @@ -364,6 +364,13 @@ RDP_DOMAIN="" # - 'libvirt': '' (BLANK) RDP_IP="127.0.0.1" +# [VM NAME] +# NOTES: +# - Only applicable when using 'libvirt' +# - The libvirt VM name must match so that WinApps can determine VM IP, start the VM, etc. +# DEFAULT VALUE: 'RDPWindows' +VM_NAME="RDPWindows" + # [WINAPPS BACKEND] # DEFAULT VALUE: 'docker' # VALID VALUES: diff --git a/docs/libvirt.md b/docs/libvirt.md index 52a2f52..0f0ddc1 100644 --- a/docs/libvirt.md +++ b/docs/libvirt.md @@ -132,6 +132,9 @@ Together, these components form a powerful and flexible virtualization stack, wi

+> [!NOTE] +> A name other than `RDPWindows` can be used if `VM_NAME` is set in `~/.config/winapps/winapps.conf`. + 9. After clicking `Finish`, select `Copy host CPU configuration` under 'CPUs', and then click `Apply`. > [!NOTE] From b3969aa3b7b6d2d1867a48b7ba15ee7d0c05d490 Mon Sep 17 00:00:00 2001 From: Sears Schulz <36250748+sears-s@users.noreply.github.com> Date: Fri, 23 May 2025 21:50:50 -0500 Subject: [PATCH 4/4] More descriptive message for EC_NOT_EXIST --- bin/winapps | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/winapps b/bin/winapps index b35305b..0941ad9 100755 --- a/bin/winapps +++ b/bin/winapps @@ -124,7 +124,7 @@ Please run: ;; "$EC_NOT_EXIST") dprint "ERROR: WINDOWS NONEXISTENT. EXITING." - notify-send --expire-time=8000 --icon="dialog-error" --app-name="WinApps" --urgency="low" "WinApps" "Windows does not exist." + notify-send --expire-time=8000 --icon="dialog-error" --app-name="WinApps" --urgency="low" "WinApps" "Windows VM named '${VM_NAME}' does not exist." ;; "$EC_UNKNOWN") dprint "ERROR: UNKNOWN CONTAINER ERROR. EXITING."