diff --git a/.github/workflows/lictool.yaml b/.github/workflows/lictool.yaml deleted file mode 100644 index 6f09545..0000000 --- a/.github/workflows/lictool.yaml +++ /dev/null @@ -1,21 +0,0 @@ -on: - pull_request: - push: - branches: [main] - -jobs: - lictool: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - uses: actions/setup-python@v4 - with: - python-version: 3.x - - - uses: pre-commit/action@v3.0.1 - with: - extra_args: license-tools - - - uses: pre-commit-ci/lite-action@v1.0.2 - if: always() diff --git a/.github/workflows/update-nix.yaml b/.github/workflows/update-nix.yaml new file mode 100644 index 0000000..a1585a8 --- /dev/null +++ b/.github/workflows/update-nix.yaml @@ -0,0 +1,40 @@ +name: "Update Flake Packages" + +permissions: + contents: write + pull-requests: write + +on: + pull_request: + branches: [main] + types: [labeled] + schedule: + - cron: "0 10 * * 0" # https://crontab.guru/#0_10_*_*_0 + +jobs: + build: + if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'rebuild nix') + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install Nix + uses: DeterminateSystems/nix-installer-action@main + with: + trust-runner-user: true + + - name: Set up cache + uses: cachix/cachix-action@v15 + with: + name: winapps + authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" + + - name: Update flake packages + uses: winapps-org/nix-update-action@v1.4.0 + with: + extra-args: --version=branch + skip-pr: "${{ github.event_name == 'pull_request' }}" + + - name: Build packages + run: nix build .#winapps .#winapps-launcher diff --git a/.github/workflows/update.yaml b/.github/workflows/update-submodule.nix similarity index 58% rename from .github/workflows/update.yaml rename to .github/workflows/update-submodule.nix index f939450..461126d 100644 --- a/.github/workflows/update.yaml +++ b/.github/workflows/update-submodule.nix @@ -13,7 +13,13 @@ jobs: - name: Update module run: | - git submodule update --init --recursive --checkout -f + pushd WinApps-Launcher + branch=$(git rev-parse --abbrev-ref origin/HEAD | sed "s|origin/||") + git config remote.origin.fetch "+refs/heads/$branch:refs/remotes/origin/$branch" + git fetch --depth=1 origin "refs/heads/$branch" + popd + + git submodule update --init --remote WinApps-Launcher - name: Commit and push uses: EndBug/add-and-commit@v9 diff --git a/.license-tools-config.json b/.license-tools-config.json deleted file mode 100644 index c361afa..0000000 --- a/.license-tools-config.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "author": { - "from_git": true, - "latest_year_only": true - }, - "title": false, - "style_override_for_suffix": { - ".yaml": "POUND_STYLE", - ".ps1": "POUND_STYLE", - ".bat": "BATCH_STYLE", - "": "POUND_STYLE" - }, - "exclude": [ - "^\\.[^/]+", - "/\\.[^/]+", - "^(.+)\\.(md|svg|png|reg|gif)", - "^(fonts|WinApps-Launcher)(/.*)?", - "apps/access/info", - "apps/access-o365-x86/info", - "apps/access-x86/info", - "apps/acrobat-x-pro/info", - "apps/adobe-cc/info", - "apps/aftereffects-cc/info", - "apps/audition-cc/info", - "apps/bridge-cc/info", - "apps/bridge-cs6/info", - "apps/bridge-cs6-x86/info", - "apps/cmd/info", - "apps/excel/info", - "apps/excel-o365-x86/info", - "apps/excel-x86/info", - "apps/explorer/info", - "apps/iexplorer/info", - "apps/illustrator-cc/info", - "apps/indesign-cc/info", - "apps/lightroom-cc/info", - "apps/onenote/info", - "apps/onenote-o365-x86/info", - "apps/onenote-x86/info", - "apps/outlook/info", - "apps/outlook-o365-x86/info", - "apps/outlook-x86/info", - "apps/photoshop-cc/info", - "apps/photoshop-cs6/info", - "apps/photoshop-cs6-x86/info", - "apps/powerpoint/info", - "apps/powerpoint-o365-x86/info", - "apps/powerpoint-x86/info", - "apps/powershell/info", - "apps/publisher/info", - "apps/publisher-o365-x86/info", - "apps/publisher-x86/info", - "apps/word/info", - "apps/word-o365-x86/info", - "apps/word-x86/info", - "apps/access-o365/info", - "apps/excel-o365/info", - "apps/onenote-o365/info", - "apps/outlook-o365/info", - "apps/powerpoint-o365/info", - "apps/publisher-o365/info", - "apps/word-o365/info", - "install/inquirer.sh", - "oem/RDPApps.reg" - ], - "license": false, - "force_author": false, - "force_license": true, - "custom_license": "SPDX-License-Identifier: AGPL-3.0-or-later" -} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6dba837..04d95f8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,7 @@ ci: autoupdate_branch: "rewrite" - skip: [license-tools] + +exclude: ^(.+)\.patch$ repos: - repo: https://github.com/Lucas-C/pre-commit-hooks @@ -49,8 +50,3 @@ repos: rev: v0.10.0.1 hooks: - id: shellcheck - - - repo: https://github.com/emzeat/mz-lictools - rev: v2.7.0 - hooks: - - id: license-tools diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 09c30ec..dd2bfb1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -3,9 +3,6 @@ Thank you for contributing to winapps! Before you can contribute, we ask some things of you: - Please follow our Code of Conduct, the Contributor Covenant. You can find a copy in this repository or under https://www.contributor-covenant.org/ -- All Contributors have to sign [a CLA](https://gist.github.com/oskardotglobal/35f0a72eb45fcc7087e535561383dbc5) for legal reasons. When opening a PR, @cla-assitant will prompt you and guide you through the process. However, if you contribute on behalf of a legal entity, we ask of you to sign [a different CLA](https://gist.github.com/oskardotglobal/75a8cc056e56a439fa6a1551129ae47f). In that case, please contact us. +- All Contributors have to sign [a CLA](https://gist.github.com/oskardotglobal/35f0a72eb45fcc7087e535561383dbc5) for legal reasons. When opening a PR, @cla-assistant will prompt you and guide you through the process. However, if you contribute on behalf of a legal entity, we ask of you to sign [a different CLA](https://gist.github.com/oskardotglobal/75a8cc056e56a439fa6a1551129ae47f). In that case, please contact us. - Please follow code conventions enforced by `pre-commit`. To keep down CI usage, please run it locally before committing too. See for installation, then run `pre-commit install` inside the `winapps` repository you cloned. - -All source code files shall have a valid SPDX-Identifier. For more information, see . -This identifier will be generated by a pre-commit hook most of the time. diff --git a/COPYRIGHT.md b/COPYRIGHT.md new file mode 100644 index 0000000..a7f4b5c --- /dev/null +++ b/COPYRIGHT.md @@ -0,0 +1,8 @@ +Some of the files are + + Copyright (c) 2024 fmstrat + +Many files also contain contributions from third parties. +In this case the original copyright of the contributions can be traced through the history of the source version control system. + +When that is not the case, the files contain a prominent notice stating the original copyright and applicable license, or come with their own dedicated COPYRIGHT and/or LICENSE file. diff --git a/LICENSE.md b/LICENSE.md index 42b6cbc..cab3299 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,3 +1,5 @@ +For copyright information, please see the [COPYRIGHT.md](./COPYRIGHT.md) file. + This project has files licensed under different licenses. The original project by Fmstrat is not free software. diff --git a/README.md b/README.md index bde82e7..f63387f 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@

-

+


Run Windows applications (including [Microsoft 365](https://www.microsoft365.com/) and [Adobe Creative Cloud](https://www.adobe.com/creativecloud.html)) on GNU/Linux with `KDE Plasma`, `GNOME` or `XFCE`, integrated seamlessly as if they were native to the OS. @@ -282,25 +282,34 @@ The following guides are available: - [Creating a Windows VM with `Docker` or `Podman`](docs/docker.md) - [Creating a Windows VM with `libvirt`](docs/libvirt.md) -If you already have a Windows VM or server you wish to use with WinApps, you will need to merge `install/RDPApps.reg` into the Windows Registry manually. +If you already have a Windows VM or server you wish to use with WinApps, you will still have to follow the [final steps described in the `libvirt` documentation](docs/libvirt.md#final-configuration-steps). ### Step 2: Install Dependencies Install the required dependencies. - Debian/Ubuntu: ```bash - sudo apt install -y dialog freerdp3-x11 iproute2 libnotify-bin netcat-openbsd + sudo apt install -y curl dialog freerdp3-x11 git iproute2 libnotify-bin netcat-openbsd ``` + +> [!NOTE] +> On Debian you need to enable the `backports` repository for the `freerdp3-x11` package to become available. +> For instructions, see https://backports.debian.org/Instructions. + - Fedora/RHEL: ```bash - sudo dnf install -y dialog freerdp iproute libnotify nmap-ncat + sudo dnf install -y curl dialog freerdp git iproute libnotify nmap-ncat ``` - Arch Linux: ```bash - sudo pacman -Syu --needed -y dialog freerdp iproute2 libnotify gnu-netcat + sudo pacman -Syu --needed -y curl dialog freerdp git iproute2 libnotify gnu-netcat + ``` + - OpenSUSE: + ```bash + sudo zypper install -y curl dialog freerdp git iproute2 libnotify netcat-openbsd ``` - Gentoo Linux: ```bash - sudo emerge --ask=n dev-util/dialog net-misc/freerdp:3 sys-apps/iproute2 x11-libs/libnotify net-analyzer/openbsd-netcat + sudo emerge --ask=n net-misc/curl dev-util/dialog net-misc/freerdp:3 dev-vcs/git sys-apps/iproute2 x11-libs/libnotify net-analyzer/openbsd-netcat ``` > [!NOTE] @@ -328,6 +337,8 @@ Create a configuration file at `~/.config/winapps/winapps.conf` containing the f RDP_USER="MyWindowsUser" # [WINDOWS PASSWORD] +# NOTES: +# - If using FreeRDP v3.9.0 or greater, you *have* to set a password RDP_PASS="MyWindowsPassword" # [WINDOWS DOMAIN] @@ -341,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' @@ -364,6 +375,8 @@ WAFLAVOR="docker" RDP_SCALE="100" # [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' # VALID VALUES: See https://github.com/awakecoding/FreeRDP-Manuals/blob/master/User/FreeRDP-User-Manual.markdown RDP_FLAGS="/cert:tofu /sound /microphone" @@ -415,10 +428,10 @@ AUTOPAUSE_TIME="300" FREERDP_COMMAND="" ``` -> [!NOTE] +> [!IMPORTANT] > `RDP_USER` and `RDP_PASS` must correspond to a complete Windows user account and password, such as those created during Windows setup or for a domain user. User/PIN combinations are not valid for RDP access. -> [!NOTE] +> [!IMPORTANT] > If you wish to use an alternative WinApps backend (other than `Docker`), uncomment and change `WAFLAVOR="docker"` to `WAFLAVOR="podman"` or `WAFLAVOR="libvirt"`. #### Configuration Options Explained @@ -431,13 +444,65 @@ FREERDP_COMMAND="" - 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`. -### Step 4: Run the WinApps Installer -Run the WinApps installer. +### Step 4: Test FreeRDP +1. Test establishing an RDP session by running the following command, replacing the `/u:`, `/p:`, and `/v:` values with the correct values specified in `~/.config/winapps/winapps.conf`. + + ```bash + xfreerdp3 /u:"Your Windows Username" /p:"Your Windows Password" /v:192.168.122.2 /cert:tofu + + # Or, if you installed FreeRDP using Flatpak + flatpak run --command=xfreerdp com.freerdp.FreeRDP /u:"Your Windows Username" /p:"Your Windows Password" /v:192.168.122.2 /cert:tofu + ``` + + - Please note that the correct `FreeRDP` command may vary depending on your system (e.g. `xfreerdp`, `xfreerdp3`, etc.). + - Ensure you use the correct IP address for your Windows instance in the above command. + - If prompted within the terminal window, choose to accept the certificate permanently. + + If the Windows desktop appears in a `FreeRDP` window, the configuration was successful and the correct RDP TLS certificate was enrolled on the Linux host. Disconnect from the RDP session and skip the following debugging step. + +2. [DEBUGGING STEP] If an outdated or expired certificate is detected, the `FreeRDP` command will display output resembling the following. In this case, the old certificate will need to be removed and a new RDP TLS certificate installed. + + ``` + @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ + @ WARNING: CERTIFICATE NAME MISMATCH! @ + @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ + + The hostname used for this connection (192.168.122.2:3389) + does not match the name given in the certificate: + Common Name (CN): + RDPWindows + A valid certificate for the wrong name should NOT be trusted! + + The host key for 192.168.122.2:3389 has changed + + @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ + @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ + @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ + + IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY! + Someone could be eavesdropping on you right now (man-in-the-middle attack)! + It is also possible that a host key has just been changed. + The fingerprint for the host key sent by the remote host is 8e:b4:d2:8e:4e:14:e7:4e:82:9b:07:5b:e1:68:40:18:bc:db:5f:bc:29:0d:91:83:f9:17:f9:13:e6:51:dc:36 + Please contact your system administrator. + Add correct host key in /home/rohanbarar/.config/freerdp/server/192.168.122.2_3389.pem to get rid of this message. + ``` + + If you experience the above error, delete any old or outdated RDP TLS certificates associated with Windows, as they can prevent `FreeRDP` from establishing a connection. + + These certificates are located within `~/.config/freerdp/server/` and follow the naming format `_.pem` (e.g., `192.168.122.2_3389.pem`, `127.0.0.1_3389.pem`, etc.). + + If you use FreeRDP for purposes other than WinApps, ensure you only remove certificates related to the relevant Windows VM. If no relevant certificates are found, no action is needed. + + Following deletion, re-attempt establishing an RDP session. + +### Step 5: Run the WinApps Installer +With Windows still powered on, run the WinApps installer. + ```bash bash <(curl https://raw.githubusercontent.com/winapps-org/winapps/main/setup.sh) ``` -A list of supported additional arguments can be accessed by running `./setup.sh --help`. +Once WinApps is installed, a list of additional arguments can be accessed by running `winapps-setup --help`. WinApps Installer Animation. @@ -462,6 +527,121 @@ The installer can be run multiple times. To update your installation of WinApps: 2. Pull the latest changes from the WinApps GitHub repository. 3. Re-install WinApps using the WinApps installer by running `winapps-setup`. +## Installation using Nix + +First, follow Step 1 of the normal installation guide to create your VM. +Then, install WinApps according to the following instructions. + +After installation, it will be available under `winapps`, with the installer being available under `winapps-setup` +and the optional launcher being available under `winapps-launcher.` + +### Using standalone Nix + +First, make sure Flakes and the `nix` command are enabled. +In your `~/.config/nix/nix.conf`: +``` +experimental-features = nix-command flakes +# specify to use binary cache (optional) +extra-substituters = https://winapps.cachix.org/ +extra-trusted-public-keys = winapps.cachix.org-1:HI82jWrXZsQRar/PChgIx1unmuEsiQMQq+zt05CD36g= +extra-trusted-users = # replace with your username +``` + +```bash +nix profile install github:winapps-org/winapps#winapps +nix profile install github:winapps-org/winapps#winapps-launcher # optional +``` + +### On NixOS using Flakes + +```nix +# flake.nix +{ + description = "My configuration"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + + winapps = { + url = "github:winapps-org/winapps"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + + outputs = + inputs@{ + nixpkgs, + winapps, + ... + }: + { + nixosConfigurations.hostname = nixpkgs.lib.nixosSystem rec { + system = "x86_64-linux"; + + specialArgs = { + inherit inputs system; + }; + + modules = [ + ./configuration.nix + ( + { + pkgs, + system ? pkgs.system, + ... + }: + { + # set up binary cache (optional) + nix.settings = { + substituters = [ "https://winapps.cachix.org/" ]; + trusted-public-keys = [ "winapps.cachix.org-1:HI82jWrXZsQRar/PChgIx1unmuEsiQMQq+zt05CD36g=" ]; + }; + + environment.systemPackages = [ + winapps.packages."${system}".winapps + winapps.packages."${system}".winapps-launcher # optional + ]; + } + ) + ]; + }; + }; +} +``` + +### On NixOS without Flakes + +[Flakes aren't real and they can't hurt you.](https://jade.fyi/blog/flakes-arent-real/). +However, if you still don't want to use flakes, you can use WinApps with flake-compat like: + +```nix +# configuration.nix +{ + pkgs, + system ? pkgs.system, + ... +}: +{ + # set up binary cache (optional) + nix.settings = { + substituters = [ "https://winapps.cachix.org/" ]; + trusted-public-keys = [ "winapps.cachix.org-1:HI82jWrXZsQRar/PChgIx1unmuEsiQMQq+zt05CD36g=" ]; + trusted-users = [ "" ]; # replace with your username + }; + + environment.systemPackages = + let + winapps = + (import (builtins.fetchTarball "https://github.com/winapps-org/winapps/archive/main.tar.gz")) + .packages."${system}"; + in + [ + winapps.winapps + winapps.winapps-launcher # optional + ]; +} +``` + ## Star History diff --git a/WinApps-Launcher b/WinApps-Launcher index eaa660d..ae1a9e9 160000 --- a/WinApps-Launcher +++ b/WinApps-Launcher @@ -1 +1 @@ -Subproject commit eaa660d39bf3f49b136c98c87c35e3e12f118f8f +Subproject commit ae1a9e9ea7c958255905cfd056196b3bdc4aad45 diff --git a/apps/access-o365-x86/info b/apps/access-o365-x86/info index 13de9d5..3c6739f 100644 --- a/apps/access-o365-x86/info +++ b/apps/access-o365-x86/info @@ -1,8 +1,3 @@ -# Copyright (c) 2024 winapps-org -# All rights reserved. -# -# SPDX-License-Identifier: Unlicense - # GNOME shortcut name NAME="Access" diff --git a/apps/access-x86/info b/apps/access-x86/info index 9bf0bf7..d37673c 100644 --- a/apps/access-x86/info +++ b/apps/access-x86/info @@ -1,8 +1,3 @@ -# Copyright (c) 2024 winapps-org -# All rights reserved. -# -# SPDX-License-Identifier: Unlicense - # GNOME shortcut name NAME="Access" diff --git a/apps/acrobat9/info b/apps/acrobat9/info index 05d285a..76e8261 100644 --- a/apps/acrobat9/info +++ b/apps/acrobat9/info @@ -1,9 +1,3 @@ -# Copyright (c) 2024 Adam -# Copyright (c) 2024 Oskar Manhart -# All rights reserved. -# -# SPDX-License-Identifier: AGPL-3.0-or-later - # GNOME shortcut name NAME="Acrobat 9" diff --git a/apps/excel-x86-2010/info b/apps/excel-x86-2010/info index 29df3dc..e027032 100644 --- a/apps/excel-x86-2010/info +++ b/apps/excel-x86-2010/info @@ -1,9 +1,3 @@ -# Copyright (c) 2024 Adam -# Copyright (c) 2024 Oskar Manhart -# All rights reserved. -# -# SPDX-License-Identifier: AGPL-3.0-or-later - # GNOME shortcut name NAME="Excel" diff --git a/apps/linqpad8/icon.svg b/apps/linqpad8/icon.svg new file mode 100644 index 0000000..79b88c0 --- /dev/null +++ b/apps/linqpad8/icon.svg @@ -0,0 +1 @@ + diff --git a/apps/linqpad8/info b/apps/linqpad8/info new file mode 100644 index 0000000..c24dfd7 --- /dev/null +++ b/apps/linqpad8/info @@ -0,0 +1,14 @@ +# GNOME shortcut name +NAME="LINQPad8" + +# Used for descriptions and window class +FULL_NAME="LINQPad 8" + +# The executable inside windows +WIN_EXECUTABLE="C:\Program Files\LINQPad8\LINQPad8.exe" + +# GNOME categories +CATEGORIES="WinApps;Development" + +# GNOME mimetypes +MIME_TYPES="text/cs" diff --git a/apps/mspaint/info b/apps/mspaint/info index 54e44e5..f9c91ad 100644 --- a/apps/mspaint/info +++ b/apps/mspaint/info @@ -1,9 +1,3 @@ -# Copyright (c) 2024 Adam -# Copyright (c) 2024 Oskar Manhart -# All rights reserved. -# -# SPDX-License-Identifier: AGPL-3.0-or-later - # GNOME shortcut name NAME="Paint" diff --git a/apps/powershell-ide/info b/apps/powershell-ide/info index 6ef8e4e..4eca7c5 100644 --- a/apps/powershell-ide/info +++ b/apps/powershell-ide/info @@ -1,9 +1,3 @@ -# Copyright (c) 2024 Adam -# Copyright (c) 2024 Oskar Manhart -# All rights reserved. -# -# SPDX-License-Identifier: AGPL-3.0-or-later - # GNOME shortcut name NAME="Powershell" diff --git a/apps/project-x86/info b/apps/project-x86/info index c20250d..5ebb988 100644 --- a/apps/project-x86/info +++ b/apps/project-x86/info @@ -1,9 +1,3 @@ -# Copyright (c) 2024 Oskar Manhart -# All rights reserved. -# -# SPDX-License-Identifier: AGPL-3.0-or-later - -# GNOME shortcut name NAME="Project" # Used for descriptions and window class diff --git a/apps/project/info b/apps/project/info index 0ac47a2..d5d904b 100644 --- a/apps/project/info +++ b/apps/project/info @@ -1,9 +1,3 @@ -# Copyright (c) 2024 Gordon Cheong -# Copyright (c) 2024 Oskar Manhart -# All rights reserved. -# -# SPDX-License-Identifier: AGPL-3.0-or-later - # GNOME shortcut name NAME="Project" diff --git a/apps/remarkable-desktop/icon.svg b/apps/remarkable-desktop/icon.svg new file mode 100644 index 0000000..0586794 --- /dev/null +++ b/apps/remarkable-desktop/icon.svg @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +rM diff --git a/apps/remarkable-desktop/info b/apps/remarkable-desktop/info new file mode 100644 index 0000000..34f47f5 --- /dev/null +++ b/apps/remarkable-desktop/info @@ -0,0 +1,17 @@ +# GNOME shortcut name +NAME="reMarkable" + +# Used for descriptions and window class +FULL_NAME="reMarkable Desktop App" + +# The executable inside windows +WIN_EXECUTABLE="C:\Program Files\reMarkable\reMarkable.exe" + +# GNOME categories +CATEGORIES="WinApps;Office" + +# GNOME mimetypes +MIME_TYPES="" + +# System Icon +ICON="reMarkable" diff --git a/apps/ssms20/icon.svg b/apps/ssms20/icon.svg new file mode 100644 index 0000000..656911f --- /dev/null +++ b/apps/ssms20/icon.svg @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/apps/ssms20/info b/apps/ssms20/info new file mode 100644 index 0000000..f24d12b --- /dev/null +++ b/apps/ssms20/info @@ -0,0 +1,14 @@ +# GNOME shortcut name +NAME="SQL Server Management Studio" + +# Used for descriptions and window class +FULL_NAME="SQL Server Management Studio" + +# The executable inside windows +WIN_EXECUTABLE="C:\Program Files (x86)\Microsoft SQL Server Management Studio 20\Common7\IDE\Ssms.exe" + +# GNOME categories +CATEGORIES="Development" + +# GNOME mimetypes +MIME_TYPES="text/sql" diff --git a/apps/visio-x86/info b/apps/visio-x86/info index 8adeb7d..dc8a193 100644 --- a/apps/visio-x86/info +++ b/apps/visio-x86/info @@ -1,9 +1,3 @@ -# Copyright (c) 2024 Gordon Cheong -# Copyright (c) 2024 Oskar Manhart -# All rights reserved. -# -# SPDX-License-Identifier: AGPL-3.0-or-later - # GNOME shortcut name NAME="Visio" diff --git a/apps/visio/info b/apps/visio/info index a0677fc..a7ad0be 100644 --- a/apps/visio/info +++ b/apps/visio/info @@ -1,9 +1,3 @@ -# Copyright (c) 2024 Gordon Cheong -# Copyright (c) 2024 Oskar Manhart -# All rights reserved. -# -# SPDX-License-Identifier: AGPL-3.0-or-later - # GNOME shortcut name NAME="Visio" diff --git a/apps/visual-studio-comm/info b/apps/visual-studio-comm/info index 93f2f91..c99a038 100644 --- a/apps/visual-studio-comm/info +++ b/apps/visual-studio-comm/info @@ -1,9 +1,3 @@ -# Copyright (c) 2024 Gordon Cheong -# Copyright (c) 2024 Oskar Manhart -# All rights reserved. -# -# SPDX-License-Identifier: AGPL-3.0-or-later - # GNOME shortcut name NAME="Visual Studio Community" diff --git a/apps/visual-studio-ent/info b/apps/visual-studio-ent/info index 4c598c6..81cc124 100644 --- a/apps/visual-studio-ent/info +++ b/apps/visual-studio-ent/info @@ -1,9 +1,3 @@ -# Copyright (c) 2024 Gordon Cheong -# Copyright (c) 2024 Oskar Manhart -# All rights reserved. -# -# SPDX-License-Identifier: AGPL-3.0-or-later - # GNOME shortcut name NAME="Visual Studio Enterprise" diff --git a/apps/visual-studio-pro/info b/apps/visual-studio-pro/info index 30cf6e7..0c08861 100644 --- a/apps/visual-studio-pro/info +++ b/apps/visual-studio-pro/info @@ -1,9 +1,3 @@ -# Copyright (c) 2024 Gordon Cheong -# Copyright (c) 2024 Oskar Manhart -# All rights reserved. -# -# SPDX-License-Identifier: AGPL-3.0-or-later - # GNOME shortcut name NAME="Visual Studio Professional" diff --git a/apps/word-x86-2010/info b/apps/word-x86-2010/info index 5aa5e9e..70f3881 100644 --- a/apps/word-x86-2010/info +++ b/apps/word-x86-2010/info @@ -1,9 +1,3 @@ -# Copyright (c) 2024 Adam -# Copyright (c) 2024 Oskar Manhart -# All rights reserved. -# -# SPDX-License-Identifier: AGPL-3.0-or-later - # GNOME shortcut name NAME="Word" diff --git a/bin/winapps b/bin/winapps index 3030aff..92280e0 100755 --- a/bin/winapps +++ b/bin/winapps @@ -1,12 +1,4 @@ #!/usr/bin/env bash -# Copyright (c) 2024 Felix Bartels -# Copyright (c) 2024 Rhea Barar -# Copyright (c) 2024 Rohan Barar -# Copyright (c) 2024 Oskar Manhart -# Copyright (c) 2024 escapefreeg -# All rights reserved. -# -# SPDX-License-Identifier: AGPL-3.0-or-later ### GLOBAL CONSTANTS ### # ERROR CODES @@ -42,7 +34,7 @@ readonly CONTAINER_NAME="WinApps" # FOR 'docker' AND 'podman' ONLY readonly RDP_PORT=3389 readonly DOCKER_IP="127.0.0.1" # shellcheck disable=SC2155 # Silence warnings regarding masking return values through simultaneous declaration and assignment. -readonly RUN="$(date)-${RANDOM}" +readonly RUNID="${RANDOM}" ### GLOBAL VARIABLES ### # WINAPPS CONFIGURATION FILE @@ -162,7 +154,7 @@ Please run: # Name: 'dprint' # Role: Conditionally print debug messages to a log file, creating it if it does not exist. function dprint() { - [ "$DEBUG" = "true" ] && echo "[$RUN] $1" >>"$LOG_PATH" + [ "$DEBUG" = "true" ] && echo "[$(date)-$RUNID] $1" >>"$LOG_PATH" } # Name: 'waFixScale' diff --git a/compose.yaml b/compose.yaml index d3758d3..6a2cf63 100644 --- a/compose.yaml +++ b/compose.yaml @@ -1,9 +1,3 @@ -# Copyright (c) 2024 Oskar Manhart -# Copyright (c) 2024 Rohan Barar -# All rights reserved. -# -# SPDX-License-Identifier: AGPL-3.0-or-later - # For documentation, FAQ, additional configuration options and technical help, visit: https://github.com/dockur/windows name: "winapps" # Docker Compose Project Name. @@ -14,7 +8,7 @@ volumes: data: services: windows: - image: dockurr/windows # https://hub.docker.com/r/dockurr/windows + image: ghcr.io/dockur/windows:latest container_name: WinApps # Created Docker VM Name. environment: # Version of Windows to configure. For valid options, visit: @@ -25,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" # 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: @@ -43,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 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/default.nix b/default.nix new file mode 100644 index 0000000..1d976a3 --- /dev/null +++ b/default.nix @@ -0,0 +1,11 @@ +(import ( + let + lock = builtins.fromJSON (builtins.readFile ./flake.lock); + in + fetchTarball { + url = + lock.nodes.flake-compat.locked.url + or "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz"; + sha256 = lock.nodes.flake-compat.locked.narHash; + } +) { src = ./.; }).defaultNix diff --git a/docs/docker.md b/docs/docker.md index afeccaa..7f7a130 100644 --- a/docs/docker.md +++ b/docs/docker.md @@ -6,13 +6,22 @@ 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. +> - 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. + +> [!IMPORTANT] +> The iptables kernel module must be loaded for folder sharing with the host to work. +> Check that the output of `lsmod | grep ip_tables` and `lsmod | grep iptable_nat` is non empty. +> If the output of one of the previous command is empty, run `echo -e "ip_tables\niptable_nat" | sudo tee /etc/modules-load.d/iptables.conf` and reboot. ## `Docker` ### Installation You can find a guide for installing `Docker Engine` [here](https://docs.docker.com/engine/install/). ### Setup `Docker` Container -WinApps utilises `docker compose` to configure Windows VMs. A template [`compose.yaml`](https://github.com/winapps-org/winapps/blob/main/compose.yaml) is provided. +WinApps utilises `docker compose` to configure Windows VMs. A template [`compose.yaml`](../compose.yaml) is provided. Prior to installing Windows, you can modify the RAM and number of CPU cores available to the Windows VM by changing `RAM_SIZE` and `CPU_CORES` within `compose.yaml`. @@ -23,6 +32,12 @@ 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 compose` with `podman-compose`. +> ```bash +> docker compose down --rmi=all --volumes +> ``` + ### Installing Windows You can initiate the Windows installation using `docker compose`. ```bash @@ -112,9 +127,6 @@ podman-compose --file ./compose.yaml down podman-compose --file ~/.config/winapps/compose.yaml up ``` -### Installing WinApps -Please follow the [`docker` instructions](#installing-winapps). - ### Changing `compose.yaml` Changes to `compose.yaml` require the Windows virtual machine to be removed and re-created. This should __NOT__ affect your data. diff --git a/docs/libvirt.md b/docs/libvirt.md index 6586913..52a2f52 100644 --- a/docs/libvirt.md +++ b/docs/libvirt.md @@ -28,24 +28,18 @@ Together, these components form a powerful and flexible virtualization stack, wi 3. Configure `libvirt` to use the 'system' URI by adding the line `LIBVIRT_DEFAULT_URI="qemu:///system"` to your preferred shell profile file (e.g., `.bashrc`, `.zshrc`, etc.). ```bash - echo "export LIBVIRT_DEFAULT_URI=\"qemu:///system\"" >> ~/.bashrc - ``` - -4. Install `QEMU Guest Agent`. - ```bash - sudo apt install qemu-guest-agent # Debian/Ubuntu - sudo dnf install qemu-guest-agent # Fedora/RHEL - sudo pacman -S qemu-guest-agent # Arch Linux - sudo emerge app-emulation/qemu-guest-agent # Gentoo Linux - sudo systemctl enable qemu-guest-agent - sudo systemctl start qemu-guest-agent + echo 'export LIBVIRT_DEFAULT_URI="qemu:///system"' >> ~/.bashrc ``` > [!NOTE] -> `QEMU Guest Agent` is a helper daemon used to exchange information and commands between host and guest operating systems. -> You can read more about `QEMU Guest Agent` [here](https://pve.proxmox.com/wiki/Qemu-guest-agent). +> WinApps may not read your shell's configuration. If you're having issues getting the installer to detect your VM, try adding +> `LIBVIRT_DEFAULT_URI="qemu:///system"` to your `/etc/environment` like: +> ```bash +> echo 'LIBVIRT_DEFAULT_URI="qemu:///system"' | sudo tee -a /etc/environment +> ``` +> Thanks to imoize for pointing this out: https://github.com/winapps-org/winapps/issues/310#issuecomment-2505348088 -5. Configure rootless `libvirt` and `kvm` by adding your user to groups of the same name. +4. Configure rootless `libvirt` and `kvm` by adding your user to groups of the same name. ``` bash sudo usermod -a -G kvm $(id -un) # Add the user to the 'kvm' group. sudo usermod -a -G libvirt $(id -un) # Add the user to the 'libvirt' group. @@ -65,7 +59,7 @@ Together, these components form a powerful and flexible virtualization stack, wi 3. Reboot your system to ensure that the user is correctly added to the relevant groups. -6. If relevant to your distribution, disable `AppArmor` for the `libvirt` daemon. +5. If relevant to your distribution, disable `AppArmor` for the `libvirt` daemon. ``` bash sudo ln -s /etc/apparmor.d/usr.sbin.libvirtd /etc/apparmor.d/disable/ # Disable AppArmor for the libvirt daemon by creating a symbolic link. ``` @@ -73,12 +67,12 @@ Together, these components form a powerful and flexible virtualization stack, wi > [!NOTE] > Systems with `SELinux` may also require security policy adjustments if virtual machine images are stored outside the default `/var/lib/libvirt/images` directory. Read [this guide](https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/5/html/virtualization/sect-virtualization-security_for_virtualization-selinux_and_virtualization#sect-Virtualization-Security_for_virtualization-SELinux_and_virtualization) for more information. -7. Download a [Windows 10](https://www.microsoft.com/software-download/windows10ISO) or [Windows 11](https://www.microsoft.com/software-download/windows11) installation `.ISO` image. +6. Download a [Windows 10](https://www.microsoft.com/software-download/windows10ISO) or [Windows 11](https://www.microsoft.com/software-download/windows11) installation `.ISO` image. > [!IMPORTANT] > 'Professional', 'Enterprise' or 'Server' editions of Windows are required to run RDP applications. Windows 'Home' will NOT suffice. -8. Download [VirtIO drivers](https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/latest-virtio/virtio-win.iso) for the Windows virtual machine. +7. Download [VirtIO drivers](https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/latest-virtio/virtio-win.iso) for the Windows virtual machine. > [!NOTE] > VirtIO drivers enhance system performance and minimize overhead by enabling the Windows virtual machine to use specialised network and disk device drivers. These drivers are aware that they are operating inside a virtual machine, and cooperate with the hypervisor. This approach eliminates the need for the hypervisor to emulate physical hardware devices, which is a computationally expensive process. This setup allows guests to achieve high-performance network and disk operations, leveraging the benefits of paravirtualisation. @@ -636,19 +630,32 @@ Status Name DisplayName Running QEMU-GA QEMU Guest Agent ``` -You can then test whether the host GNU/Linux system can communicate with Windows via `QEMU Guest Agent` by running `virsh qemu-agent-command RDPWindows '{"execute":"guest-info"}'`. The output should resemble: +You can then test whether the host GNU/Linux system can communicate with Windows via `QEMU Guest Agent` by running `virsh qemu-agent-command RDPWindows '{"execute":"guest-get-osinfo"}' --pretty`. The output should resemble: -``` -{"return":{"version":"107.0.1","supported_commands":[{"enabled":true,"name":"guest-get-cpustats","success-response":true},{"enabled":true,"name":"guest-get-diskstats","success-response":true},{"enabled":true,"name":"guest-get-devices","success-response":true},{"enabled":true,"name":"guest-get-osinfo","success-response":true},{"enabled":true,"name":"guest-get-timezone","success-response":true},{"enabled":true,"name":"guest-get-users","success-response":true},{"enabled":true,"name":"guest-get-host-name","success-response":true},{"enabled":true,"name":"guest-exec","success-response":true},{"enabled":true,"name":"guest-exec-status","success-response":true},{"enabled":false,"name":"guest-get-memory-block-info","success-response":true},{"enabled":false,"name":"guest-set-memory-blocks","success-response":true},{"enabled":false,"name":"guest-get-memory-blocks","success-response":true},{"enabled":true,"name":"guest-set-user-password","success-response":true},{"enabled":true,"name":"guest-get-fsinfo","success-response":true},{"enabled":true,"name":"guest-get-disks","success-response":true},{"enabled":false,"name":"guest-set-vcpus","success-response":true},{"enabled":true,"name":"guest-get-vcpus","success-response":true},{"enabled":true,"name":"guest-network-get-interfaces","success-response":true},{"enabled":false,"name":"guest-suspend-hybrid","success-response":false},{"enabled":true,"name":"guest-suspend-ram","success-response":false},{"enabled":true,"name":"guest-suspend-disk","success-response":false},{"enabled":true,"name":"guest-fstrim","success-response":true},{"enabled":true,"name":"guest-fsfreeze-thaw","success-response":true},{"enabled":true,"name":"guest-fsfreeze-freeze-list","success-response":true},{"enabled":true,"name":"guest-fsfreeze-freeze","success-response":true},{"enabled":true,"name":"guest-fsfreeze-status","success-response":true},{"enabled":true,"name":"guest-file-flush","success-response":true},{"enabled":true,"name":"guest-file-seek","success-response":true},{"enabled":true,"name":"guest-file-write","success-response":true},{"enabled":true,"name":"guest-file-read","success-response":true},{"enabled":true,"name":"guest-file-close","success-response":true},{"enabled":true,"name":"guest-file-open","success-response":true},{"enabled":true,"name":"guest-shutdown","success-response":false},{"enabled":true,"name":"guest-info","success-response":true},{"enabled":true,"name":"guest-set-time","success-response":true},{"enabled":true,"name":"guest-get-time","success-response":true},{"enabled":true,"name":"guest-ping","success-response":true},{"enabled":true,"name":"guest-sync","success-response":true},{"enabled":true,"name":"guest-sync-delimited","success-response":true}]}} +```json +{ + "return": { + "name": "Microsoft Windows", + "kernel-release": "26100", + "version": "Microsoft Windows 11", + "variant": "client", + "pretty-name": "Windows 10 Pro", + "version-id": "11", + "variant-id": "client", + "kernel-version": "10.0", + "machine": "x86_64", + "id": "mswindows" + } +} ``` -Next, you will need to make some registry changes to enable RDP Applications to run on the system. Start by downloading the [RDPApps.reg](https://github.com/winapps-org/winapps/blob/main/oem/RDPApps.reg) file, right-clicking on the `Raw` button, and clicking on `Save target as`. +Next, you will need to make some registry changes to enable RDP Applications to run on the system. Start by downloading the [RDPApps.reg](../oem/RDPApps.reg) file, right-clicking on the `Raw` button, and clicking on `Save target as`. Repeat the same thing for the [install.bat](../oem/install.bat) and the [NetProfileCleanup.ps1](../oem/NetProfileCleanup.ps1). **Do not download the Container.reg.**

-Once you have downloaded the registry file, right-click on it, and choose `Merge`. +Once you have downloaded all three files, right-click the install.bat and select "Run as administrator".

diff --git a/docs/libvirt_images/27.png b/docs/libvirt_images/27.png index 5e9a2fb..1da95db 100644 Binary files a/docs/libvirt_images/27.png and b/docs/libvirt_images/27.png differ diff --git a/docs/libvirt_images/Virtualisation_Stack.svg b/docs/libvirt_images/Virtualisation_Stack.svg index 9ebb272..1cf451b 100644 --- a/docs/libvirt_images/Virtualisation_Stack.svg +++ b/docs/libvirt_images/Virtualisation_Stack.svg @@ -6,7 +6,7 @@ height="394.31107" id="svg171" sodipodi:docname="Virtualisation_Stack.svg" - inkscape:version="1.3.2 (091e20ef0f, 2023-11-25)" + inkscape:version="1.4 (e7c3feb1, 2024-10-09)" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns="http://www.w3.org/2000/svg" @@ -27,14 +27,14 @@ inkscape:deskcolor="#d1d1d1" showgrid="false" inkscape:zoom="1.4142136" - inkscape:cx="157.68481" - inkscape:cy="190.56528" - inkscape:window-width="1920" - inkscape:window-height="1003" + inkscape:cx="158.03836" + inkscape:cy="190.56527" + inkscape:window-width="1680" + inkscape:window-height="1050" inkscape:window-x="0" inkscape:window-y="0" - inkscape:window-maximized="1" - inkscape:current-layer="Hardware" /> + inkscape:window-maximized="0" + inkscape:current-layer="svg171" /> Open-source-virtualization-stack