From 4ce6204881bf97efdfde90b517171cdb19bebb6f Mon Sep 17 00:00:00 2001 From: Feyaz Baker <44121644+starbr3aker@users.noreply.github.com> Date: Sun, 12 Jan 2025 22:59:38 +0530 Subject: [PATCH 1/6] doc: docker.md added Win10 instructions Added some steps I found useful while setting up with win10 --- docs/docker.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/docker.md b/docs/docker.md index ec03a39..308f364 100644 --- a/docs/docker.md +++ b/docs/docker.md @@ -6,6 +6,12 @@ Although WinApps supports using `QEMU+KVM+libvirt` as a backend for running Wind > [!IMPORTANT] > WinApps does __NOT__ officially support versions of Windows prior to Windows 10. Despite this, it may be possible to achieve a successful installation with some additional experimentation. If you find a way to achieve this, please share your solution through a pull request for the benefit of other users. +> Possible setup instructions for Windows 10: +> - 'Professional', 'Enterprise' or 'Server' editions of Windows are required to run RDP applications. Windows 'Home' will NOT suffice. It is recommended to download the ISO from a reputed source, as the built in downloader (default set to `tiny11` will take longer than it would to download from a browser/torrent. +> - It is recommended to edit the initial `compose.yaml` file to keep your required username and password from the beginning. +> - It is recommended to not use `sudo` to force commands to run. Add your user to the relevant permissions group wherever possible. + + ## `Docker` ### Installation @@ -23,6 +29,17 @@ It is also possible to specify the version of Windows you wish to install within Please refer to the [original GitHub repository](https://github.com/dockur/windows) for more information on additional configuration options. +> [!NOTE] +> If you want to undo all your changes and start from scratch, run the following. For `podman`, replace `docker` with `podman`. +> ```bash +> docker ps # verify if you have any dockers created +> docker rm -v -f $(docker ps -qa) # will remove all running dockers (EXERCISE CAUTION) +> docker container ls # see if you have any containers running +> docker container rm containerName # to remove any old containers +> docker volume ls # for old volumes. Docker will reuse old volumes which may have previous installations of windows +> docker volume rm volumeName +> ``` + ### Installing Windows You can initiate the Windows installation using `docker compose`. ```bash From 8cd9dd7919af06a33bdac9710c4a6f667575bbee Mon Sep 17 00:00:00 2001 From: starbr3aker Date: Sun, 12 Jan 2025 23:19:27 +0530 Subject: [PATCH 2/6] doc: default installation is via docker, changed files to reflect this. --- README.md | 8 +++++++- compose.yaml | 8 ++++---- docs/docker.md | 2 +- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index a060cd7..8e6a6ec 100644 --- a/README.md +++ b/README.md @@ -352,7 +352,7 @@ RDP_DOMAIN="" # - 'docker': '127.0.0.1' # - 'podman': '127.0.0.1' # - 'libvirt': '' (BLANK) -RDP_IP="" +RDP_IP="127.0.0.1" # [WINAPPS BACKEND] # DEFAULT VALUE: 'docker' @@ -434,6 +434,12 @@ FREERDP_COMMAND="" > [!NOTE] > If you wish to use an alternative WinApps backend (other than `Docker`), uncomment and change `WAFLAVOR="docker"` to `WAFLAVOR="podman"` or `WAFLAVOR="libvirt"`. +> [!NOTE] +> If you encounter issues with tls certificate getting rejected, delete the existing `.pem` file with +> `rm -rf .config/freerdp/server/127.0.0.1_3389.pem` and run +> `xfreerdp3 /u:MyWindowsUser /p:MyWindowsPassword /v:127.0.0.1 /cert:tofu` +> to set up Trust On First Authentication. Then retry the `setup.sh` script. + #### Configuration Options Explained - If using a pre-existing Windows RDP server on your LAN, you must use `RDP_IP` to specify the location of the Windows server. You may also wish to configure a static IP address for this server. - If running a Windows VM using `libvirt` with NAT enabled, leave `RDP_IP` commented out and WinApps will auto-detect the local IP address for the VM. diff --git a/compose.yaml b/compose.yaml index e9570d9..1fc3721 100644 --- a/compose.yaml +++ b/compose.yaml @@ -19,8 +19,8 @@ services: CPU_CORES: "4" # CPU cores allocated to the Windows VM. DISK_SIZE: "64G" # Size of the primary hard disk. #DISK2_SIZE: "32G" # Uncomment to add an additional hard disk to the Windows VM. Ensure it is mounted as a volume below. - #USERNAME: "Docker" # Uncomment to set a custom Windows username. The default is 'Docker'. - #PASSWORD: "" # Uncomment to set a password for the Windows user. There is no default password. + USERNAME: "MyWindowsUser" # Uncomment to set a custom Windows username. The default is 'Docker'. + PASSWORD: "MyWindowsPassword" # Uncomment to set a password for the Windows user. There is no default password. HOME: "${HOME}" # Set path to Linux user home folder. privileged: true # Grant the Windows VM extended privileges. ports: @@ -37,5 +37,5 @@ services: #- /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/sdX:/disk1 # Uncomment to mount a disk directly within the Windows VM (Note: 'disk1' will be mounted as the main drive). - #- /dev/sdY:/disk2 # Uncomment to mount a disk directly within the Windows VM (Note: 'disk2' and higher will be mounted as secondary drives). + #- /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 DURING COMPOSE). + #- /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). \ No newline at end of file diff --git a/docs/docker.md b/docs/docker.md index 308f364..9b61336 100644 --- a/docs/docker.md +++ b/docs/docker.md @@ -7,7 +7,7 @@ Although WinApps supports using `QEMU+KVM+libvirt` as a backend for running Wind > [!IMPORTANT] > WinApps does __NOT__ officially support versions of Windows prior to Windows 10. Despite this, it may be possible to achieve a successful installation with some additional experimentation. If you find a way to achieve this, please share your solution through a pull request for the benefit of other users. > Possible setup instructions for Windows 10: -> - 'Professional', 'Enterprise' or 'Server' editions of Windows are required to run RDP applications. Windows 'Home' will NOT suffice. It is recommended to download the ISO from a reputed source, as the built in downloader (default set to `tiny11` will take longer than it would to download from a browser/torrent. +> - 'Professional', 'Enterprise' or 'Server' editions of Windows are required to run RDP applications. Windows 'Home' will NOT suffice. It is recommended to download the ISO from a reputed source, as the built in downloader from dockur (default set to `tiny11`) will take longer than it would to download from a browser/torrent. > - It is recommended to edit the initial `compose.yaml` file to keep your required username and password from the beginning. > - It is recommended to not use `sudo` to force commands to run. Add your user to the relevant permissions group wherever possible. From 0826a238bc6aed3f5e4dcb8c20d795e8b88c8085 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 12 Jan 2025 17:50:28 +0000 Subject: [PATCH 3/6] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- README.md | 6 +++--- compose.yaml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8e6a6ec..81530a8 100644 --- a/README.md +++ b/README.md @@ -435,9 +435,9 @@ FREERDP_COMMAND="" > If you wish to use an alternative WinApps backend (other than `Docker`), uncomment and change `WAFLAVOR="docker"` to `WAFLAVOR="podman"` or `WAFLAVOR="libvirt"`. > [!NOTE] -> If you encounter issues with tls certificate getting rejected, delete the existing `.pem` file with -> `rm -rf .config/freerdp/server/127.0.0.1_3389.pem` and run -> `xfreerdp3 /u:MyWindowsUser /p:MyWindowsPassword /v:127.0.0.1 /cert:tofu` +> If you encounter issues with tls certificate getting rejected, delete the existing `.pem` file with +> `rm -rf .config/freerdp/server/127.0.0.1_3389.pem` and run +> `xfreerdp3 /u:MyWindowsUser /p:MyWindowsPassword /v:127.0.0.1 /cert:tofu` > to set up Trust On First Authentication. Then retry the `setup.sh` script. #### Configuration Options Explained diff --git a/compose.yaml b/compose.yaml index 1fc3721..c4fea0c 100644 --- a/compose.yaml +++ b/compose.yaml @@ -38,4 +38,4 @@ services: devices: - /dev/kvm # Enable KVM. #- /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 DURING COMPOSE). - #- /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). \ No newline at end of file + #- /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). From 9c0c39845c454e212a92d29a7edd25bae6bb535d Mon Sep 17 00:00:00 2001 From: starbr3aker Date: Mon, 13 Jan 2025 23:17:06 +0530 Subject: [PATCH 4/6] Resolved comments --- README.md | 6 +++--- compose.yaml | 2 +- docs/docker.md | 11 +++-------- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 81530a8..30dfb43 100644 --- a/README.md +++ b/README.md @@ -435,9 +435,9 @@ FREERDP_COMMAND="" > If you wish to use an alternative WinApps backend (other than `Docker`), uncomment and change `WAFLAVOR="docker"` to `WAFLAVOR="podman"` or `WAFLAVOR="libvirt"`. > [!NOTE] -> If you encounter issues with tls certificate getting rejected, delete the existing `.pem` file with -> `rm -rf .config/freerdp/server/127.0.0.1_3389.pem` and run -> `xfreerdp3 /u:MyWindowsUser /p:MyWindowsPassword /v:127.0.0.1 /cert:tofu` +> If you encounter issues with tls certificate getting rejected, delete the existing `.pem` file with +> `rm ~/.config/freerdp/server/127.0.0.1_3389.pem` and run +> `xfreerdp3 /u:MyWindowsUser /p:MyWindowsPassword /v:127.0.0.1 /cert:tofu` > to set up Trust On First Authentication. Then retry the `setup.sh` script. #### Configuration Options Explained diff --git a/compose.yaml b/compose.yaml index c4fea0c..29d86b6 100644 --- a/compose.yaml +++ b/compose.yaml @@ -37,5 +37,5 @@ services: #- /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/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 DURING COMPOSE). + #- /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). diff --git a/docs/docker.md b/docs/docker.md index 9b61336..7059bb5 100644 --- a/docs/docker.md +++ b/docs/docker.md @@ -7,7 +7,7 @@ Although WinApps supports using `QEMU+KVM+libvirt` as a backend for running Wind > [!IMPORTANT] > WinApps does __NOT__ officially support versions of Windows prior to Windows 10. Despite this, it may be possible to achieve a successful installation with some additional experimentation. If you find a way to achieve this, please share your solution through a pull request for the benefit of other users. > Possible setup instructions for Windows 10: -> - 'Professional', 'Enterprise' or 'Server' editions of Windows are required to run RDP applications. Windows 'Home' will NOT suffice. It is recommended to download the ISO from a reputed source, as the built in downloader from dockur (default set to `tiny11`) will take longer than it would to download from a browser/torrent. +> - 'Professional', 'Enterprise' or 'Server' editions of Windows are required to run RDP applications. Windows 'Home' will __NOT__ suffice. It is recommended to download the ISO from a reputed source, as the built in downloader from dockur (default set to `tiny11`) will take longer than it would to download from a browser/torrent. > - It is recommended to edit the initial `compose.yaml` file to keep your required username and password from the beginning. > - It is recommended to not use `sudo` to force commands to run. Add your user to the relevant permissions group wherever possible. @@ -30,14 +30,9 @@ It is also possible to specify the version of Windows you wish to install within Please refer to the [original GitHub repository](https://github.com/dockur/windows) for more information on additional configuration options. > [!NOTE] -> If you want to undo all your changes and start from scratch, run the following. For `podman`, replace `docker` with `podman`. +> If you want to undo all your changes and start from scratch, run the following. For `podman`, replace `docker` with `podman`. > ```bash -> docker ps # verify if you have any dockers created -> docker rm -v -f $(docker ps -qa) # will remove all running dockers (EXERCISE CAUTION) -> docker container ls # see if you have any containers running -> docker container rm containerName # to remove any old containers -> docker volume ls # for old volumes. Docker will reuse old volumes which may have previous installations of windows -> docker volume rm volumeName +> docker compose down --rmi=all --volumes > ``` ### Installing Windows From 9a1ed82053df4d38fd902a5bec12c8bd06eebddc Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 13 Jan 2025 17:49:34 +0000 Subject: [PATCH 5/6] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- README.md | 6 +++--- docs/docker.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 30dfb43..d015ead 100644 --- a/README.md +++ b/README.md @@ -435,9 +435,9 @@ FREERDP_COMMAND="" > If you wish to use an alternative WinApps backend (other than `Docker`), uncomment and change `WAFLAVOR="docker"` to `WAFLAVOR="podman"` or `WAFLAVOR="libvirt"`. > [!NOTE] -> If you encounter issues with tls certificate getting rejected, delete the existing `.pem` file with -> `rm ~/.config/freerdp/server/127.0.0.1_3389.pem` and run -> `xfreerdp3 /u:MyWindowsUser /p:MyWindowsPassword /v:127.0.0.1 /cert:tofu` +> If you encounter issues with tls certificate getting rejected, delete the existing `.pem` file with +> `rm ~/.config/freerdp/server/127.0.0.1_3389.pem` and run +> `xfreerdp3 /u:MyWindowsUser /p:MyWindowsPassword /v:127.0.0.1 /cert:tofu` > to set up Trust On First Authentication. Then retry the `setup.sh` script. #### Configuration Options Explained diff --git a/docs/docker.md b/docs/docker.md index 7059bb5..39fa2b6 100644 --- a/docs/docker.md +++ b/docs/docker.md @@ -30,7 +30,7 @@ It is also possible to specify the version of Windows you wish to install within Please refer to the [original GitHub repository](https://github.com/dockur/windows) for more information on additional configuration options. > [!NOTE] -> If you want to undo all your changes and start from scratch, run the following. For `podman`, replace `docker` with `podman`. +> If you want to undo all your changes and start from scratch, run the following. For `podman`, replace `docker` with `podman`. > ```bash > docker compose down --rmi=all --volumes > ``` From 09abdb747e26cbf066707717c7af3c161eaacfea Mon Sep 17 00:00:00 2001 From: starbr3aker Date: Wed, 15 Jan 2025 08:30:13 +0530 Subject: [PATCH 6/6] Resolved comments --- compose.yaml | 6 +++--- docs/docker.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/compose.yaml b/compose.yaml index 29d86b6..6a2cf63 100644 --- a/compose.yaml +++ b/compose.yaml @@ -19,8 +19,8 @@ services: CPU_CORES: "4" # CPU cores allocated to the Windows VM. DISK_SIZE: "64G" # Size of the primary hard disk. #DISK2_SIZE: "32G" # Uncomment to add an additional hard disk to the Windows VM. Ensure it is mounted as a volume below. - USERNAME: "MyWindowsUser" # Uncomment to set a custom Windows username. The default is 'Docker'. - PASSWORD: "MyWindowsPassword" # Uncomment to set a password for the Windows user. There is no default password. + USERNAME: "MyWindowsUser" # Edit here to set a custom Windows username. The default is 'MyWindowsUser'. + PASSWORD: "MyWindowsPassword" # Edit here to set a password for the Windows user. The default is 'MyWindowsPassword'. HOME: "${HOME}" # Set path to Linux user home folder. privileged: true # Grant the Windows VM extended privileges. ports: @@ -38,4 +38,4 @@ services: devices: - /dev/kvm # Enable KVM. #- /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). + #- /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). diff --git a/docs/docker.md b/docs/docker.md index 39fa2b6..0d3e00e 100644 --- a/docs/docker.md +++ b/docs/docker.md @@ -30,7 +30,7 @@ It is also possible to specify the version of Windows you wish to install within Please refer to the [original GitHub repository](https://github.com/dockur/windows) for more information on additional configuration options. > [!NOTE] -> If you want to undo all your changes and start from scratch, run the following. For `podman`, replace `docker` with `podman`. +> If you want to undo all your changes and start from scratch, run the following. For `podman`, replace `docker compose` with `podman-compose`. > ```bash > docker compose down --rmi=all --volumes > ```