mirror of
				https://github.com/winapps-org/winapps.git
				synced 2025-11-04 05:14:03 +01:00 
			
		
		
		
	Compare commits
	
		
			19 Commits
		
	
	
		
			31631b8b75
			...
			feat-optim
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					dcd662dc06 | ||
| 
						 | 
					a317ba41f4 | ||
| 
						 | 
					a7e465c704 | ||
| 
						 | 
					c3affa75a8 | ||
| 
						 | 
					2b2f4cea69 | ||
| 
						 | 
					026325d2bf | ||
| 
						 | 
					e7dfd56515 | ||
| 
						 | 
					fc3e5e0839 | ||
| 
						 | 
					b42449459e | ||
| 
						 | 
					b300444e15 | ||
| 
						 | 
					46de8a8caa | ||
| 
						 | 
					84308118c6 | ||
| 
						 | 
					805b479e45 | ||
| 
						 | 
					013cc42e07 | ||
| 
						 | 
					885d02079a | ||
| 
						 | 
					b3969aa3b7 | ||
| 
						 | 
					4019f9cb81 | ||
| 
						 | 
					a2568be16f | ||
| 
						 | 
					b9ef076dc8 | 
							
								
								
									
										47
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										47
									
								
								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:
 | 
			
		||||
@@ -396,18 +403,9 @@ REMOVABLE_MEDIA="/run/media"
 | 
			
		||||
# [ADDITIONAL FREERDP FLAGS & ARGUMENTS]
 | 
			
		||||
# NOTES:
 | 
			
		||||
# - You can try adding /network:lan to these flags in order to increase performance, however, some users have faced issues with this.
 | 
			
		||||
# DEFAULT VALUE: '/cert:tofu /sound /microphone'
 | 
			
		||||
# DEFAULT VALUE: '/cert:tofu /sound /microphone +home-drive'
 | 
			
		||||
# VALID VALUES: See https://github.com/awakecoding/FreeRDP-Manuals/blob/master/User/FreeRDP-User-Manual.markdown
 | 
			
		||||
RDP_FLAGS="/cert:tofu /sound /microphone"
 | 
			
		||||
 | 
			
		||||
# [MULTIPLE MONITORS]
 | 
			
		||||
# NOTES:
 | 
			
		||||
# - If enabled, a FreeRDP bug *might* produce a black screen.
 | 
			
		||||
# DEFAULT VALUE: 'false'
 | 
			
		||||
# VALID VALUES:
 | 
			
		||||
# - 'true'
 | 
			
		||||
# - 'false'
 | 
			
		||||
MULTIMON="false"
 | 
			
		||||
RDP_FLAGS="/cert:tofu /sound /microphone +home-drive"
 | 
			
		||||
 | 
			
		||||
# [DEBUG WINAPPS]
 | 
			
		||||
# NOTES:
 | 
			
		||||
@@ -445,6 +443,31 @@ AUTOPAUSE_TIME="300"
 | 
			
		||||
# DEFAULT VALUE: '' (BLANK)
 | 
			
		||||
# VALID VALUES: The command required to run FreeRDPv3 on your system (e.g., 'xfreerdp', 'xfreerdp3', etc.).
 | 
			
		||||
FREERDP_COMMAND=""
 | 
			
		||||
 | 
			
		||||
# [TIMEOUTS]
 | 
			
		||||
# NOTES:
 | 
			
		||||
# - These settings control various timeout durations within the WinApps setup.
 | 
			
		||||
# - Increasing the timeouts is only necessary if the corresponding errors occur.
 | 
			
		||||
# - Ensure you have followed all the Troubleshooting Tips in the error message first.
 | 
			
		||||
 | 
			
		||||
# PORT CHECK
 | 
			
		||||
# - The maximum time (in seconds) to wait when checking if the RDP port on Windows is open.
 | 
			
		||||
# - Corresponding error: "NETWORK CONFIGURATION ERROR" (exit status 13).
 | 
			
		||||
# DEFAULT VALUE: '5'
 | 
			
		||||
PORT_TIMEOUT="5"
 | 
			
		||||
 | 
			
		||||
# RDP CONNECTION TEST
 | 
			
		||||
# - The maximum time (in seconds) to wait when testing the initial RDP connection to Windows.
 | 
			
		||||
# - Corresponding error: "REMOTE DESKTOP PROTOCOL FAILURE" (exit status 14).
 | 
			
		||||
# DEFAULT VALUE: '30'
 | 
			
		||||
RDP_TIMEOUT="30"
 | 
			
		||||
 | 
			
		||||
# APPLICATION SCAN
 | 
			
		||||
# - The maximum time (in seconds) to wait for the script that scans for installed applications on Windows to complete.
 | 
			
		||||
# - Corresponding error: "APPLICATION QUERY FAILURE" (exit status 15).
 | 
			
		||||
# DEFAULT VALUE: '60'
 | 
			
		||||
APP_SCAN_TIMEOUT="60"
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
> [!IMPORTANT]
 | 
			
		||||
@@ -459,7 +482,7 @@ FREERDP_COMMAND=""
 | 
			
		||||
- For domain users, you can uncomment and change `RDP_DOMAIN`.
 | 
			
		||||
- On high-resolution (UHD) displays, you can set `RDP_SCALE` to the scale you would like to use (100, 140 or 180).
 | 
			
		||||
- To add additional flags to the FreeRDP call (e.g. `/prevent-session-lock 120`), uncomment and use the `RDP_FLAGS` configuration option.
 | 
			
		||||
- For multi-monitor setups, you can try enabling `MULTIMON`. A FreeRDP bug may result in a black screen however, in which case you should revert this change.
 | 
			
		||||
- For multi-monitor setups, you can try adding `/multimon` to `RDP_FLAGS`. A FreeRDP bug may result in a black screen however, in which case you should revert this change.
 | 
			
		||||
- If you enable `DEBUG`, a log will be created on each application start in `~/.local/share/winapps/winapps.log`.
 | 
			
		||||
- If using a system on which the FreeRDP command is not `xfreerdp` or `xfreerdp3`, the correct command can be specified using `FREERDP_COMMAND`.
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										29
									
								
								bin/winapps
									
									
									
									
									
								
							
							
						
						
									
										29
									
								
								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=""
 | 
			
		||||
@@ -49,9 +49,7 @@ REMOVABLE_MEDIA=""
 | 
			
		||||
RDP_SCALE=100
 | 
			
		||||
AUTOPAUSE="off"
 | 
			
		||||
AUTOPAUSE_TIME="300"
 | 
			
		||||
MULTIMON="false"
 | 
			
		||||
DEBUG="true"
 | 
			
		||||
MULTI_FLAG=""
 | 
			
		||||
 | 
			
		||||
# OTHER
 | 
			
		||||
FREERDP_PID=-1
 | 
			
		||||
@@ -124,7 +122,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."
 | 
			
		||||
@@ -212,9 +210,6 @@ function waLoadConfig() {
 | 
			
		||||
        waThrowExit $EC_MISSING_CONFIG
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    # Update 'MULTI_FLAG' based on 'MULTIMON'.
 | 
			
		||||
    MULTI_FLAG=$([[ $MULTIMON == "true" ]] && echo "/multimon" || echo "+span")
 | 
			
		||||
 | 
			
		||||
    # Update $RDP_SCALE.
 | 
			
		||||
    waFixScale
 | 
			
		||||
    # Update when $REMOVABLE_MEDIA is null
 | 
			
		||||
@@ -521,11 +516,8 @@ function waRunCommand() {
 | 
			
		||||
            /u:"$RDP_USER" \
 | 
			
		||||
            /p:"$RDP_PASS" \
 | 
			
		||||
            /scale:"$RDP_SCALE" \
 | 
			
		||||
            +dynamic-resolution \
 | 
			
		||||
            +auto-reconnect \
 | 
			
		||||
            +home-drive \
 | 
			
		||||
            +clipboard \
 | 
			
		||||
            -wallpaper \
 | 
			
		||||
            +dynamic-resolution \
 | 
			
		||||
            /wm-class:"Microsoft Windows" \
 | 
			
		||||
            /t:"Windows RDP Session [$RDP_IP]" \
 | 
			
		||||
            /v:"$RDP_IP" &>/dev/null &
 | 
			
		||||
@@ -540,12 +532,7 @@ function waRunCommand() {
 | 
			
		||||
            /u:"$RDP_USER" \
 | 
			
		||||
            /p:"$RDP_PASS" \
 | 
			
		||||
            /scale:"$RDP_SCALE" \
 | 
			
		||||
            +dynamic-resolution \
 | 
			
		||||
            +auto-reconnect \
 | 
			
		||||
            +home-drive \
 | 
			
		||||
            +clipboard \
 | 
			
		||||
            -wallpaper \
 | 
			
		||||
            "$MULTI_FLAG" \
 | 
			
		||||
            /app:program:"$2" \
 | 
			
		||||
            /v:"$RDP_IP" &>/dev/null &
 | 
			
		||||
 | 
			
		||||
@@ -577,12 +564,7 @@ function waRunCommand() {
 | 
			
		||||
                /u:"$RDP_USER" \
 | 
			
		||||
                /p:"$RDP_PASS" \
 | 
			
		||||
                /scale:"$RDP_SCALE" \
 | 
			
		||||
                +dynamic-resolution \
 | 
			
		||||
                +auto-reconnect \
 | 
			
		||||
                +home-drive \
 | 
			
		||||
                +clipboard \
 | 
			
		||||
                -wallpaper \
 | 
			
		||||
                "$MULTI_FLAG" \
 | 
			
		||||
                /wm-class:"$FULL_NAME" \
 | 
			
		||||
                /app:program:"$WIN_EXECUTABLE",icon:"$ICON",name:"$FULL_NAME" \
 | 
			
		||||
                /v:"$RDP_IP" &>/dev/null &
 | 
			
		||||
@@ -603,13 +585,8 @@ function waRunCommand() {
 | 
			
		||||
                /u:"$RDP_USER" \
 | 
			
		||||
                /p:"$RDP_PASS" \
 | 
			
		||||
                /scale:"$RDP_SCALE" \
 | 
			
		||||
                +dynamic-resolution \
 | 
			
		||||
                +auto-reconnect \
 | 
			
		||||
                +home-drive \
 | 
			
		||||
                +clipboard \
 | 
			
		||||
                /drive:media,"$REMOVABLE_MEDIA" \
 | 
			
		||||
                -wallpaper \
 | 
			
		||||
                "$MULTI_FLAG" \
 | 
			
		||||
                /wm-class:"$FULL_NAME" \
 | 
			
		||||
                /app:program:"$WIN_EXECUTABLE",icon:"$ICON",name:$"FULL_NAME",cmd:\""$FILE_PATH"\" \
 | 
			
		||||
                /v:"$RDP_IP" &>/dev/null &
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										10
									
								
								compose.yaml
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								compose.yaml
									
									
									
									
									
								
							@@ -33,13 +33,17 @@ services:
 | 
			
		||||
    volumes:
 | 
			
		||||
      - data:/storage # Mount volume 'data' to use as Windows 'C:' drive.
 | 
			
		||||
      - ${HOME}:/shared # Mount Linux user home directory @ '\\host.lan\Data'.
 | 
			
		||||
      #- /path/to/second/hard/disk:/storage2 # Uncomment to mount the second hard disk within the Windows VM. Ensure 'DISK2_SIZE' is specified above.
 | 
			
		||||
      #- /path/to/second/hard/disk:/storage2 # Uncomment to create a virtual second hard disk and mount it within the Windows VM. Ensure 'DISK2_SIZE' is specified above.
 | 
			
		||||
      - ./oem:/oem # Enables automatic post-install execution of 'oem/install.bat', applying Windows registry modifications contained within 'oem/RDPApps.reg'.
 | 
			
		||||
      #- /path/to/windows/install/media.iso:/custom.iso # Uncomment to use a custom Windows ISO. If specified, 'VERSION' (e.g. 'tiny11') will be ignored.
 | 
			
		||||
    devices:
 | 
			
		||||
      - /dev/kvm # Enable KVM.
 | 
			
		||||
      - /dev/net/tun # Enable tuntap
 | 
			
		||||
      #- /dev/sdX:/disk1 # Uncomment to mount a disk directly within the Windows VM (Note: 'disk1' will be mounted as the main drive. THIS DISK WILL BE FORMATTED BY DOCKER).
 | 
			
		||||
      #- /dev/sdY:/disk2 # Uncomment to mount a disk directly within the Windows VM (Note: 'disk2' and higher will be mounted as secondary drives. THIS DISK WILL NOT BE FORMATTED).
 | 
			
		||||
      # Uncomment to mount a disk directly within the Windows VM.
 | 
			
		||||
      # WARNING: /dev/sdX paths may change after reboot. Use persistent identifiers!
 | 
			
		||||
      # NOTE: 'disk1' will be mounted as the main drive. THIS DISK WILL BE FORMATTED BY DOCKER.
 | 
			
		||||
      # All following disks (disk2, ...) WILL NOT BE FORMATTED.
 | 
			
		||||
      # - /dev/disk/by-id/<id>:/disk1
 | 
			
		||||
      # - dev/disk/by-id/<id>:/disk2
 | 
			
		||||
    # group_add:      # uncomment this line and the next one for using rootless podman containers
 | 
			
		||||
    #   - keep-groups # to make /dev/kvm work with podman. needs "crun" installed, "runc" will not work! Add your user to the 'kvm' group or another that can access /dev/kvm.
 | 
			
		||||
 
 | 
			
		||||
@@ -132,6 +132,9 @@ Together, these components form a powerful and flexible virtualization stack, wi
 | 
			
		||||
    <img src="./libvirt_images/07.png" width="500px"/>
 | 
			
		||||
</p>
 | 
			
		||||
 | 
			
		||||
> [!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]
 | 
			
		||||
 
 | 
			
		||||
@@ -11,12 +11,12 @@
 | 
			
		||||
  ...
 | 
			
		||||
}:
 | 
			
		||||
let
 | 
			
		||||
  rev = "1edae785f4ca5d1ce162bfc86bc7d9f9e053eae9";
 | 
			
		||||
  hash = "sha256-KEelw4sbmknUfuflYU1+4L+awH70aaQpbAA/Hwoub7A=";
 | 
			
		||||
  rev = "2b2f4cea698096829fbd1c3c15970034a6f53261";
 | 
			
		||||
  hash = "sha256-km8q3IL5sETbFsscNy4dDxYTytuKPJQJY81p7tSk63A=";
 | 
			
		||||
in
 | 
			
		||||
stdenv.mkDerivation rec {
 | 
			
		||||
  pname = "winapps";
 | 
			
		||||
  version = "0-unstable-2025-05-11";
 | 
			
		||||
  version = "0-unstable-2025-06-05";
 | 
			
		||||
 | 
			
		||||
  src = fetchFromGitHub {
 | 
			
		||||
    owner = "winapps-org";
 | 
			
		||||
 
 | 
			
		||||
@@ -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
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										34
									
								
								setup.sh
									
									
									
									
									
								
							
							
						
						
									
										34
									
								
								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.
 | 
			
		||||
 | 
			
		||||
@@ -89,13 +88,16 @@ 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.
 | 
			
		||||
 | 
			
		||||
PORT_TIMEOUT=5      # Default port check timeout.
 | 
			
		||||
RDP_TIMEOUT=30      # Default RDP connection test timeout.
 | 
			
		||||
APP_SCAN_TIMEOUT=60 # Default application scan timeout.
 | 
			
		||||
 | 
			
		||||
# PERMISSIONS AND DIRECTORIES
 | 
			
		||||
SUDO=""         # Set to "sudo" if the user specifies '--system', or "" if the user specifies '--user'.
 | 
			
		||||
@@ -988,7 +990,7 @@ function waCheckPortOpen() {
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    # Check for an open RDP port.
 | 
			
		||||
    if ! timeout 5 nc -z "$RDP_IP" "$RDP_PORT" &>/dev/null; then
 | 
			
		||||
    if ! timeout "$PORT_TIMEOUT" nc -z "$RDP_IP" "$RDP_PORT" &>/dev/null; then
 | 
			
		||||
        # Complete the previous line.
 | 
			
		||||
        echo -e "${FAIL_TEXT}Failed!${CLEAR_TEXT}\n"
 | 
			
		||||
 | 
			
		||||
@@ -1001,6 +1003,7 @@ function waCheckPortOpen() {
 | 
			
		||||
        # Display the suggested action(s).
 | 
			
		||||
        echo "--------------------------------------------------------------------------------"
 | 
			
		||||
        echo "Please ensure Remote Desktop is configured on Windows as per the WinApps README."
 | 
			
		||||
        echo -e "Then you can try increasing the ${COMMAND_TEXT}PORT_TIMEOUT${CLEAR_TEXT} in ${COMMAND_TEXT}${CONFIG_PATH}${CLEAR_TEXT}."
 | 
			
		||||
        echo "--------------------------------------------------------------------------------"
 | 
			
		||||
 | 
			
		||||
        # Terminate the script.
 | 
			
		||||
@@ -1043,9 +1046,6 @@ function waCheckRDPAccess() {
 | 
			
		||||
        /p:"$RDP_PASS" \
 | 
			
		||||
        /scale:"$RDP_SCALE" \
 | 
			
		||||
        +auto-reconnect \
 | 
			
		||||
        +home-drive \
 | 
			
		||||
        -wallpaper \
 | 
			
		||||
        +dynamic-resolution \
 | 
			
		||||
        /app:program:"C:\Windows\System32\cmd.exe",cmd:"/C type NUL > $TEST_PATH_WIN && tsdiscon" \
 | 
			
		||||
        /v:"$RDP_IP" &>"$FREERDP_LOG" &
 | 
			
		||||
 | 
			
		||||
@@ -1055,8 +1055,8 @@ function waCheckRDPAccess() {
 | 
			
		||||
    # Initialise the time counter.
 | 
			
		||||
    ELAPSED_TIME=0
 | 
			
		||||
 | 
			
		||||
    # Wait a maximum of 30 seconds for the background process to complete.
 | 
			
		||||
    while [ "$ELAPSED_TIME" -lt 30 ]; do
 | 
			
		||||
    # Wait a maximum of $RDP_TIMEOUT seconds for the background process to complete.
 | 
			
		||||
    while [ "$ELAPSED_TIME" -lt "$RDP_TIMEOUT" ]; do
 | 
			
		||||
        # Check if the FreeRDP process is complete or if the test file exists.
 | 
			
		||||
        if ! ps -p "$FREERDP_PROC" &>/dev/null || [ -f "$TEST_PATH" ]; then
 | 
			
		||||
            break
 | 
			
		||||
@@ -1091,6 +1091,7 @@ function waCheckRDPAccess() {
 | 
			
		||||
        echo "  - Ensure the user is logged out of Windows prior to initiating the WinApps installation."
 | 
			
		||||
        echo "  - Ensure the credentials within the WinApps configuration file are correct."
 | 
			
		||||
        echo -e "  - Utilise a new certificate by removing relevant certificate(s) in ${COMMAND_TEXT}${HOME}/.config/freerdp/server${CLEAR_TEXT}."
 | 
			
		||||
        echo -e "  - Try increasing the ${COMMAND_TEXT}RDP_TIMEOUT${CLEAR_TEXT} in ${COMMAND_TEXT}${CONFIG_PATH}${CLEAR_TEXT}."
 | 
			
		||||
        echo "  - If using 'libvirt', ensure the Windows VM is correctly named as specified within the README."
 | 
			
		||||
        echo "  - If using 'libvirt', ensure 'Remote Desktop' is enabled within the Windows VM."
 | 
			
		||||
        echo "  - If using 'libvirt', ensure you have merged 'RDPApps.reg' into the Windows VM's registry."
 | 
			
		||||
@@ -1172,9 +1173,6 @@ function waFindInstalled() {
 | 
			
		||||
        /p:"$RDP_PASS" \
 | 
			
		||||
        /scale:"$RDP_SCALE" \
 | 
			
		||||
        +auto-reconnect \
 | 
			
		||||
        +home-drive \
 | 
			
		||||
        -wallpaper \
 | 
			
		||||
        +dynamic-resolution \
 | 
			
		||||
        /app:program:"C:\Windows\System32\cmd.exe",cmd:"/C "$BATCH_SCRIPT_PATH_WIN"" \
 | 
			
		||||
        /v:"$RDP_IP" &>"$FREERDP_LOG" &
 | 
			
		||||
 | 
			
		||||
@@ -1184,8 +1182,8 @@ function waFindInstalled() {
 | 
			
		||||
    # Initialise the time counter.
 | 
			
		||||
    ELAPSED_TIME=0
 | 
			
		||||
 | 
			
		||||
    # Wait a maximum of 60 seconds for the batch script to finish running.
 | 
			
		||||
    while [ $ELAPSED_TIME -lt 60 ]; do
 | 
			
		||||
    # Wait a maximum of $APP_SCAN_TIMEOUT seconds for the batch script to finish running.
 | 
			
		||||
    while [ $ELAPSED_TIME -lt "$APP_SCAN_TIMEOUT" ]; do
 | 
			
		||||
        # Check if the FreeRDP process is complete or if the 'installed' file exists.
 | 
			
		||||
        if ! ps -p "$FREERDP_PROC" &>/dev/null || [ -f "$INST_FILE_PATH" ]; then
 | 
			
		||||
            break
 | 
			
		||||
@@ -1216,6 +1214,7 @@ function waFindInstalled() {
 | 
			
		||||
        # Display the suggested action(s).
 | 
			
		||||
        echo "--------------------------------------------------------------------------------"
 | 
			
		||||
        echo -e "Please view the log at ${COMMAND_TEXT}${FREERDP_LOG}${CLEAR_TEXT}."
 | 
			
		||||
        echo -e "You can try increasing the ${COMMAND_TEXT}APP_SCAN_TIMEOUT${CLEAR_TEXT} in ${COMMAND_TEXT}${CONFIG_PATH}${CLEAR_TEXT}."
 | 
			
		||||
        echo "--------------------------------------------------------------------------------"
 | 
			
		||||
 | 
			
		||||
        # Terminate the script.
 | 
			
		||||
@@ -1558,13 +1557,6 @@ function waInstall() {
 | 
			
		||||
    # Check for missing dependencies.
 | 
			
		||||
    waCheckInstallDependencies
 | 
			
		||||
 | 
			
		||||
    # Update $MULTI_FLAG.
 | 
			
		||||
    if [[ $MULTIMON == "true" ]]; then
 | 
			
		||||
        MULTI_FLAG="/multimon"
 | 
			
		||||
    else
 | 
			
		||||
        MULTI_FLAG="+span"
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    # Update $RDP_SCALE.
 | 
			
		||||
    waFixScale
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user