mirror of
https://github.com/winapps-org/winapps.git
synced 2025-08-03 01:16:45 +02:00
Compare commits
102 Commits
doc-arch-p
...
main
Author | SHA1 | Date | |
---|---|---|---|
![]() |
b5cb322827 | ||
![]() |
44f9df793d | ||
![]() |
887e282443 | ||
![]() |
c25ea7c2fc | ||
![]() |
88f1e4e96e | ||
![]() |
ab496b9ade | ||
![]() |
a04103b88c | ||
![]() |
6a7b57a064 | ||
![]() |
e8037948f4 | ||
![]() |
fdecd7a8da | ||
![]() |
bbf2da803f | ||
![]() |
7abe89ec3a | ||
![]() |
f0aa7d6fb8 | ||
![]() |
92686f0ae4 | ||
![]() |
ff0cef7841 | ||
![]() |
050384d255 | ||
![]() |
3ea6c614b3 | ||
![]() |
e5d6f60cc8 | ||
![]() |
708ad60d1c | ||
![]() |
8cac5af983 | ||
![]() |
cc13aac465 | ||
![]() |
a23fd713e7 | ||
![]() |
1c4b38b7ec | ||
![]() |
34c8168548 | ||
![]() |
9c0564cca4 | ||
![]() |
26854d9137 | ||
![]() |
f1441a5c12 | ||
![]() |
12530a6da1 | ||
![]() |
2f184cb525 | ||
![]() |
c6a8a43fdc | ||
![]() |
e62155cba5 | ||
![]() |
e4d4b915d5 | ||
![]() |
1c79a78c09 | ||
![]() |
0f3b43d92a | ||
![]() |
4136b1d6c0 | ||
![]() |
82b4d8bdfb | ||
![]() |
4b4fe93d86 | ||
![]() |
ba2ec0a047 | ||
![]() |
6e9e633616 | ||
![]() |
078c9b01c9 | ||
![]() |
4de47581c4 | ||
![]() |
03dff50916 | ||
![]() |
4010972963 | ||
![]() |
01d72eac5b | ||
![]() |
223ba8ecb0 | ||
![]() |
8e0ef40b1f | ||
![]() |
8796615775 | ||
![]() |
e48d50ff78 | ||
![]() |
5908f88ac5 | ||
![]() |
2068ab71ab | ||
![]() |
edca9d5b9a | ||
![]() |
ee967296a6 | ||
![]() |
abf4c7ae66 | ||
![]() |
d250907a3c | ||
![]() |
efa348d1b3 | ||
![]() |
ce9a84dc52 | ||
![]() |
7188ed4072 | ||
![]() |
fd5e7f0a90 | ||
![]() |
60b6c1215c | ||
![]() |
7548950a5e | ||
![]() |
051e2e5852 | ||
![]() |
0c057b722d | ||
![]() |
17a511230c | ||
![]() |
8ea5c2e079 | ||
![]() |
3e84f5efdf | ||
![]() |
3a71065db7 | ||
![]() |
2b806de133 | ||
![]() |
113abb3322 | ||
![]() |
aa5b3e9455 | ||
![]() |
109b2b1d9c | ||
![]() |
f075eab78d | ||
![]() |
9e6b659f48 | ||
![]() |
8b8e50aeaf | ||
![]() |
7d8f1e440d | ||
![]() |
12dee36bdc | ||
![]() |
4d3821d9aa | ||
![]() |
cd5b823ff7 | ||
![]() |
c604f49422 | ||
![]() |
c4d48e2087 | ||
![]() |
3298376f92 | ||
![]() |
e8105f9ea6 | ||
![]() |
dd9a85aae1 | ||
![]() |
c9fb729a50 | ||
![]() |
dcd662dc06 | ||
![]() |
9a0e9ee58e | ||
![]() |
e2e9fd9b7b | ||
![]() |
5594a23298 | ||
![]() |
a317ba41f4 | ||
![]() |
a7e465c704 | ||
![]() |
c3affa75a8 | ||
![]() |
2b2f4cea69 | ||
![]() |
026325d2bf | ||
![]() |
e7dfd56515 | ||
![]() |
fc3e5e0839 | ||
![]() |
b42449459e | ||
![]() |
b300444e15 | ||
![]() |
46de8a8caa | ||
![]() |
5946444c63 | ||
![]() |
afb333ab4f | ||
![]() |
97a3889ecc | ||
![]() |
c06ae550bc | ||
![]() |
bac0d08cf2 |
40
.github/workflows/update-nix.yaml
vendored
40
.github/workflows/update-nix.yaml
vendored
@@ -1,40 +0,0 @@
|
||||
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
|
37
.github/workflows/update-submodule.yaml
vendored
37
.github/workflows/update-submodule.yaml
vendored
@@ -1,37 +0,0 @@
|
||||
name: Update submodules
|
||||
on:
|
||||
repository_dispatch:
|
||||
types: update
|
||||
|
||||
jobs:
|
||||
update:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Update module
|
||||
run: |
|
||||
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
|
||||
with:
|
||||
add: WinApps-Launcher
|
||||
default_author: github_actions
|
||||
message: "Update submodules"
|
||||
push: false
|
||||
|
||||
- name: Create PR
|
||||
uses: peter-evans/create-pull-request@v7
|
||||
with:
|
||||
branch: chore/update_submodules
|
||||
delete-branch: true
|
||||
title: "Update submodules"
|
5
.gitignore
vendored
Normal file
5
.gitignore
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
/.idea
|
||||
/.vscode
|
||||
/result
|
||||
.DS_Store
|
||||
**/.DS_Store
|
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -1,3 +0,0 @@
|
||||
[submodule "WinApps-Launcher"]
|
||||
path = WinApps-Launcher
|
||||
url = https://github.com/winapps-org/WinApps-Launcher.git
|
@@ -8,7 +8,7 @@ Due to lack of a license, it is All Rights Reserved by the original author.
|
||||
We have tried contacting Fmstrat about this, but they abandoned the project and did not reply nor apply an open-source license to the project.
|
||||
However, almost all parts of the codebase have been rewritten and all new contributions require a Contributor License Agreement ([for individuals](https://gist.github.com/oskardotglobal/35f0a72eb45fcc7087e535561383dbc5), [for legal entities](https://gist.github.com/oskardotglobal/75a8cc056e56a439fa6a1551129ae47f)) to be signed. Therefore, the below license is applied to all new contributions made to the project.
|
||||
|
||||
Refer to a specific file for it's respective license.
|
||||
Refer to a specific file for its respective license.
|
||||
|
||||
# GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
|
||||
|
64
README.md
64
README.md
@@ -17,6 +17,7 @@ WinApps works by:
|
||||
- The GNU/Linux `/home` directory is accessible within Windows via the `\\tsclient\home` mount.
|
||||
- Integration with `Nautilus`, allowing you to right-click files to open them with specific Windows applications based on the file MIME type.
|
||||
- The [official taskbar widget](https://github.com/winapps-org/WinApps-Launcher) enables seamless administration of the Windows subsystem and offers an easy way to launch Windows applications.
|
||||
- Microsoft Office links (e.g. ms-word://) from the host system are automatically opened in the Windows subsystem. (Note: You may need to use a [User Agent Switcher](https://github.com/ray-lothian/UserAgent-Switcher/) browser extension and set the User-Agent to Windows, as the Office webapps typically hide the "Open in Desktop App" option for Linux users.)
|
||||
|
||||
## Supported Applications
|
||||
**WinApps supports <u>*ALL*</u> Windows applications.**
|
||||
@@ -397,24 +398,15 @@ RDP_SCALE="100"
|
||||
# This improves compatibility with most desktop environments (DEs).
|
||||
# ATTENTION: The Filesystem Hierarchy Standard (FHS) recommends /media instead. Verify your system's configuration.
|
||||
# - To manually mount devices, you may optionally use /mnt.
|
||||
# REFERRENCE: https://wiki.archlinux.org/title/Udisks#Mount_to_/media
|
||||
# REFERENCE: https://wiki.archlinux.org/title/Udisks#Mount_to_/media
|
||||
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:
|
||||
@@ -452,6 +444,36 @@ 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"
|
||||
|
||||
# WINDOWS BOOT
|
||||
# - The maximum time (in seconds) to wait for the Windows VM to boot if it is not running, before attempting to launch an application.
|
||||
# DEFAULT VALUE: '120'
|
||||
BOOT_TIMEOUT="120"
|
||||
|
||||
```
|
||||
|
||||
> [!IMPORTANT]
|
||||
@@ -466,7 +488,8 @@ 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.
|
||||
- To enable non-English input and seamless language switching, you can try adding `/kbd:unicode` to `RDP_FLAGS`. This ensures client inputs are sent as Unicode sequences.
|
||||
- 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`.
|
||||
|
||||
@@ -553,6 +576,11 @@ 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`.
|
||||
|
||||
## WinApps Launcher (Optional)
|
||||
The [WinApps Launcher](https://github.com/winapps-org/winapps-launcher) provides a simple system tray menu that makes it easy to launch your installed Windows applications, open a full desktop RDP session, and control your Windows VM or container. You can start, stop, pause, reboot or hibernate Windows, as well as access your installed applications from a convenient list. This lightweight, optional tool helps streamline your overall WinApps experience.
|
||||
|
||||
<img src="./demo/launcher.gif" width=1000 alt="WinApps Launcher Animation.">
|
||||
|
||||
## Installation using Nix
|
||||
|
||||
First, follow Step 1 of the normal installation guide to create your VM.
|
||||
@@ -567,10 +595,6 @@ 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 = <your-username> # replace with your username
|
||||
```
|
||||
|
||||
```bash
|
||||
@@ -617,12 +641,6 @@ nix profile install github:winapps-org/winapps#winapps-launcher # optional
|
||||
...
|
||||
}:
|
||||
{
|
||||
# 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
|
||||
|
Submodule WinApps-Launcher deleted from 9b3f6c5817
29
apps/adobe-digital-editions-4.5/icon.svg
Normal file
29
apps/adobe-digital-editions-4.5/icon.svg
Normal file
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 20.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="ai_x5F_cc_x5F_app_x5F_RGB.svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 240 234" width="320" height="312" enable-background="new 0 0 240 234" xml:space="preserve">
|
||||
<path fill="#260C00" d="M41.9,7.5C13.8,7.5,7.3,24.2,7.3,52.4L7.4,189c0,28.2,8.8,37.6,36.9,37.6H195c28.1,0,37.6-9.4,37.6-37.5
|
||||
V47.2c0-28.2-10.5-39.7-38.6-39.7C194,7.5,41.9,7.5,41.9,7.5z"/>
|
||||
<g>
|
||||
<g>
|
||||
<path fill="#FF6000" d="M0,43.1v148.2C0,214.9,18.2,234,41.9,234h155.3c23.7,0,42.9-19.1,42.9-42.8V42.8C240,19.2,220.8,0,197.1,0
|
||||
H41.9C18.2,0,0,19.2,0,42.8V43.1z M194,10.1c19.1,0,35.9,15.7,35.9,34.8v142.3c0,19.1-15.5,36.7-34.6,36.7H44.7
|
||||
c-19.1,0-34.6-16.2-34.6-35.3l0-141.7c0-19,15.5-36.8,34.5-36.8L194,10.1L194,10.1z"/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<g>
|
||||
<path fill="#FEDCCA" d="M182.3,171.3H57.7c-7.4,0-9.7-2.4-9.7-9.8V71.1c0-7.4,2.4-9.8,9.7-9.8h124.5c7.4,0,9.7,2.4,9.7,9.8v90.5
|
||||
C192,168.9,189.6,171.3,182.3,171.3z M57.7,65.3c-5.1,0-5.7,0.6-5.7,5.8v90.5c0,5.2,0.6,5.8,5.7,5.8h124.5c5.1,0,5.7-0.6,5.7-5.8
|
||||
V71.1c0-5.2-0.6-5.8-5.7-5.8H57.7z"/>
|
||||
</g>
|
||||
<g>
|
||||
<path fill="#FF6000" d="M57,162.3h61v-92H57V162.3z M67,93h44v2H67V93z M67,102.1h44v2H67V102.1z M67,111h44v2H67V111z M67,120h44
|
||||
v2H67V120z M67,129.1h44v2H67V129.1z M67,138h44v2H67V138z"/>
|
||||
<path fill="#FF6000" d="M158.7,70.3H122v92h61V94.2L158.7,70.3z M129.3,92.5h24.5v2h-24.5V92.5z M129.3,101.6l43.6,0.2l0,2
|
||||
l-43.6-0.2L129.3,101.6z M173.3,139.5h-44.1v-2h44.1V139.5z M173.3,130.6h-44.1v-2h44.1V130.6z M173.3,121.5h-44.1v-2h44.1V121.5z
|
||||
M173.3,112.5h-44.1v-2h44.1V112.5z M158.3,94.6V72.4L181,94.6H158.3z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.9 KiB |
17
apps/adobe-digital-editions-4.5/info
Normal file
17
apps/adobe-digital-editions-4.5/info
Normal file
@@ -0,0 +1,17 @@
|
||||
# GNOME shortcut name
|
||||
NAME="Adobe Digital Editions"
|
||||
|
||||
# Used for descriptions and window class
|
||||
FULL_NAME="Adobe Digital Editions"
|
||||
|
||||
# The executable inside windows
|
||||
WIN_EXECUTABLE="C:\Program Files (x86)\Adobe\Adobe Digital Editions 4.5\DigitalEditions.exe"
|
||||
|
||||
# GNOME categories
|
||||
CATEGORIES="WinApps;Adobe"
|
||||
|
||||
# GNOME mimetypes
|
||||
MIME_TYPES="application/epub+zip;application/vnd.adobe.adept+xml;"
|
||||
|
||||
# System Icon
|
||||
ICON="AdobeDigitalEditions"
|
9
apps/emclient/icon.svg
Normal file
9
apps/emclient/icon.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 20 KiB |
17
apps/emclient/info
Normal file
17
apps/emclient/info
Normal file
@@ -0,0 +1,17 @@
|
||||
# GNOME shortcut name
|
||||
NAME="eM Client"
|
||||
|
||||
# Used for descriptions and window class
|
||||
FULL_NAME="eM Client"
|
||||
|
||||
# The executable inside windows
|
||||
WIN_EXECUTABLE="C:\Program Files (x86)\eM Client\mailclient.exe"
|
||||
|
||||
# GNOME categories
|
||||
CATEGORIES="WinApps;Network;Office;"
|
||||
|
||||
# GNOME mimetypes
|
||||
MIME_TYPES=""
|
||||
|
||||
# System Icon
|
||||
ICON="eM Client"
|
@@ -1,8 +1,3 @@
|
||||
# Copyright (c) 2024 Fmstrat | App tested by whitewolf101 02/22/2025
|
||||
# All rights reserved.
|
||||
#
|
||||
# SPDX-License-Identifier: Proprietary
|
||||
|
||||
# GNOME shortcut name
|
||||
NAME="mIRC"
|
||||
|
||||
|
9
apps/ms-office-protocol-handler.desktop
Normal file
9
apps/ms-office-protocol-handler.desktop
Normal file
@@ -0,0 +1,9 @@
|
||||
[Desktop Entry]
|
||||
Name=Microsoft Office Protocol Handler
|
||||
Comment=Handle Microsoft Office URI schemes via WinApps
|
||||
Exec=winapps manual %u
|
||||
Terminal=false
|
||||
Type=Application
|
||||
MimeType=x-scheme-handler/ms-word;x-scheme-handler/ms-excel;x-scheme-handler/ms-powerpoint;x-scheme-handler/ms-outlook;x-scheme-handler/ms-access;x-scheme-handler/ms-visio;x-scheme-handler/ms-project;x-scheme-handler/ms-teams;x-scheme-handler/ms-whiteboard;x-scheme-handler/ms-officeapp;
|
||||
NoDisplay=true
|
||||
Categories=Office;Utility;
|
1
apps/paint.net/icon.svg
Normal file
1
apps/paint.net/icon.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 46 KiB |
17
apps/paint.net/info
Normal file
17
apps/paint.net/info
Normal file
@@ -0,0 +1,17 @@
|
||||
# GNOME shortcut name
|
||||
NAME="Paint.NET"
|
||||
|
||||
# Used for descriptions and window class
|
||||
FULL_NAME="Paint.NET"
|
||||
|
||||
# The executable inside windows
|
||||
WIN_EXECUTABLE="C:\Program Files\Paint.NET\paintdotnet.exe"
|
||||
|
||||
# GNOME categories
|
||||
CATEGORIES="WinApps;Graphic;"
|
||||
|
||||
# GNOME mimetypes
|
||||
MIME_TYPES=""
|
||||
|
||||
# System Icon
|
||||
ICON="Paint.Net"
|
129
bin/winapps
129
bin/winapps
@@ -49,12 +49,12 @@ REMOVABLE_MEDIA=""
|
||||
RDP_SCALE=100
|
||||
AUTOPAUSE="off"
|
||||
AUTOPAUSE_TIME="300"
|
||||
MULTIMON="false"
|
||||
DEBUG="true"
|
||||
MULTI_FLAG=""
|
||||
BOOT_TIMEOUT=120
|
||||
|
||||
# OTHER
|
||||
FREERDP_PID=-1
|
||||
NEEDED_BOOT=false
|
||||
|
||||
### TRAPS ###
|
||||
# Catch SIGINT (CTRL+C) to call 'waCleanUp'.
|
||||
@@ -107,15 +107,15 @@ Please run:
|
||||
notify-send --expire-time=8000 --icon="dialog-error" --app-name="WinApps" --urgency="low" "WinApps" "Windows failed to resume."
|
||||
;;
|
||||
"$EC_FAIL_DESTROY")
|
||||
dprint "ERROR: WINDOWS FAILED TO IMMEDIATELY UNGRACEFULLY SHUT DOWN WINDOWS. EXITING."
|
||||
notify-send --expire-time=8000 --icon="dialog-error" --app-name="WinApps" --urgency="low" "WinApps" "Failed to ungracefully shut down Windows."
|
||||
dprint "ERROR: FAILED TO FORCE STOP WINDOWS. EXITING."
|
||||
notify-send --expire-time=8000 --icon="dialog-error" --app-name="WinApps" --urgency="low" "WinApps" "Failed to forcibly stop Windows."
|
||||
;;
|
||||
"$EC_SD_TIMEOUT")
|
||||
dprint "ERROR: WINDOWS TOOK TOO LONG TO SHUT DOWN. EXITING."
|
||||
notify-send --expire-time=8000 --icon="dialog-error" --app-name="WinApps" --urgency="low" "WinApps" "Windows took too long to shut down."
|
||||
;;
|
||||
"$EC_DIE_TIMEOUT")
|
||||
dprint "ERROR: WINDOWS TOOK TOO LONG TO SHUT DOWN. EXITING."
|
||||
dprint "ERROR: WINDOWS TOOK TOO LONG TO DIE. EXITING."
|
||||
notify-send --expire-time=8000 --icon="dialog-error" --app-name="WinApps" --urgency="low" "WinApps" "Windows took too long to die."
|
||||
;;
|
||||
"$EC_RESTART_TIMEOUT")
|
||||
@@ -158,7 +158,7 @@ function dprint() {
|
||||
[ "$DEBUG" = "true" ] && echo "[$(date)-$RUNID] $1" >>"$LOG_PATH"
|
||||
}
|
||||
# Name: 'waFixRemovableMedia'
|
||||
# Role: If user left REMOVABLE_MEDIA config null,fallback to /run/media for udisks defaults ,warning.
|
||||
# Role: If REMOVABLE_MEDIA is empty, default to /run/media (udisks default) and show a warning.
|
||||
function waFixRemovableMedia() {
|
||||
if [ -z "$REMOVABLE_MEDIA" ]; then
|
||||
REMOVABLE_MEDIA="/run/media" # Default for udisks
|
||||
@@ -212,9 +212,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
|
||||
@@ -304,9 +301,10 @@ function waGetFreeRDPCommand() {
|
||||
function waCheckGroupMembership() {
|
||||
# Identify groups the current user belongs to.
|
||||
# shellcheck disable=SC2155 # Silence warnings regarding masking return values through simultaneous declaration and assignment.
|
||||
local USER_GROUPS=$(groups "$(whoami)")
|
||||
local USER_GROUPS=$(id -nG "$(whoami)")
|
||||
|
||||
if ! (echo "$USER_GROUPS" | grep -q -E "\blibvirt\b") || ! (echo "$USER_GROUPS" | grep -q -E "\bkvm\b"); then
|
||||
if ! echo "$USER_GROUPS" | grep -qE '\b(libvirt|libvirtd)\b' || \
|
||||
! echo "$USER_GROUPS" | grep -qE '\bkvm\b'; then
|
||||
waThrowExit "$EC_NOT_IN_GROUP"
|
||||
fi
|
||||
}
|
||||
@@ -328,6 +326,7 @@ function waCheckVMRunning() {
|
||||
if (virsh list --state-shutoff --name | xargs | grep -wq "$VM_NAME"); then
|
||||
dprint "WINDOWS SHUT OFF. BOOTING WINDOWS."
|
||||
notify-send --expire-time=4000 --icon="dialog-info" --app-name="WinApps" --urgency="low" "WinApps" "Booting Windows."
|
||||
NEEDED_BOOT=true
|
||||
virsh start "$VM_NAME" &>/dev/null || EXIT_STATUS=$EC_FAIL_START
|
||||
if (virsh list --state-paused --name | xargs | grep -wq "$VM_NAME"); then
|
||||
dprint "WINDOWS PAUSED. RESUMING WINDOWS."
|
||||
@@ -349,6 +348,7 @@ function waCheckVMRunning() {
|
||||
dprint "WINDOWS SHUT OFF. BOOTING WINDOWS."
|
||||
notify-send --expire-time=4000 --icon="dialog-info" --app-name="WinApps" --urgency="low" "WinApps" "Booting Windows."
|
||||
virsh start "$VM_NAME" &>/dev/null || EXIT_STATUS=$EC_FAIL_START
|
||||
NEEDED_BOOT=true
|
||||
break
|
||||
fi
|
||||
sleep $TIME_INTERVAL
|
||||
@@ -362,6 +362,7 @@ function waCheckVMRunning() {
|
||||
dprint "WINDOWS DESTROYED. BOOTING WINDOWS."
|
||||
notify-send --expire-time=4000 --icon="dialog-info" --app-name="WinApps" --urgency="low" "WinApps" "Booting Windows."
|
||||
virsh start "$VM_NAME" &>/dev/null || EXIT_STATUS=$EC_FAIL_START
|
||||
NEEDED_BOOT=true
|
||||
fi
|
||||
elif (virsh domstate "$VM_NAME" | xargs | grep -wq "dying"); then
|
||||
dprint "WINDOWS DYING. WAITING."
|
||||
@@ -377,6 +378,7 @@ function waCheckVMRunning() {
|
||||
dprint "WINDOWS DESTROYED. BOOTING WINDOWS."
|
||||
notify-send --expire-time=4000 --icon="dialog-info" --app-name="WinApps" --urgency="low" "WinApps" "Booting Windows."
|
||||
virsh start "$VM_NAME" &>/dev/null || EXIT_STATUS=$EC_FAIL_START
|
||||
NEEDED_BOOT=true
|
||||
fi
|
||||
break
|
||||
elif (virsh list --state-shutoff --name | xargs | grep -wq "$VM_NAME"); then
|
||||
@@ -384,6 +386,7 @@ function waCheckVMRunning() {
|
||||
dprint "WINDOWS SHUT OFF. BOOTING WINDOWS."
|
||||
notify-send --expire-time=4000 --icon="dialog-info" --app-name="WinApps" --urgency="low" "WinApps" "Booting Windows."
|
||||
virsh start "$VM_NAME" &>/dev/null || EXIT_STATUS=$EC_FAIL_START
|
||||
NEEDED_BOOT=true
|
||||
break
|
||||
fi
|
||||
sleep $TIME_INTERVAL
|
||||
@@ -400,6 +403,45 @@ function waCheckVMRunning() {
|
||||
|
||||
# Handle non-zero exit statuses.
|
||||
[ "$EXIT_STATUS" -ne 0 ] && waThrowExit "$EXIT_STATUS"
|
||||
|
||||
# Wait for VM to be fully ready
|
||||
if [[ "$NEEDED_BOOT" == "true" ]]; then
|
||||
dprint "WAITING FOR VM TO BE FULLY READY..."
|
||||
notify-send --expire-time=4000 --icon="dialog-info" --app-name="WinApps" --urgency="low" "WinApps" "Waiting for Windows to be ready..."
|
||||
|
||||
TIME_ELAPSED=0
|
||||
|
||||
while (( TIME_ELAPSED < BOOT_TIMEOUT )); do
|
||||
# Check if VM is running
|
||||
if (virsh list --state-running --name | xargs | grep -wq "$VM_NAME"); then
|
||||
# Try to connect to RDP port to verify it's ready
|
||||
if timeout 1 bash -c ">/dev/tcp/$RDP_IP/$RDP_PORT" 2>/dev/null; then
|
||||
dprint "VM IS READY"
|
||||
notify-send --expire-time=4000 --icon="dialog-info" --app-name="WinApps" --urgency="low" "WinApps" "Windows is ready."
|
||||
# Add a delay after Windows is ready
|
||||
if [ "$NEEDED_BOOT" = "true" ]; then
|
||||
sleep 10
|
||||
fi
|
||||
break
|
||||
fi
|
||||
fi
|
||||
|
||||
sleep 5
|
||||
TIME_ELAPSED=$((TIME_ELAPSED + 5))
|
||||
|
||||
# Show progress every 30 seconds
|
||||
if (( TIME_ELAPSED % 30 == 0 )); then
|
||||
notify-send --expire-time=4000 --icon="dialog-info" --app-name="WinApps" --urgency="low" "WinApps" "Still waiting for Windows to be ready... ($TIME_ELAPSED seconds elapsed)"
|
||||
fi
|
||||
done
|
||||
|
||||
# If we timed out waiting for the VM
|
||||
if (( TIME_ELAPSED >= BOOT_TIMEOUT )); then
|
||||
dprint "TIMEOUT WAITING FOR VM TO BE READY"
|
||||
notify-send --expire-time=4000 --icon="dialog-info" --app-name="WinApps" --urgency="low" "WinApps" "Timeout waiting for Windows to be ready. Please try again."
|
||||
waThrowExit $EC_FAIL_START
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# Name: 'waCheckContainerRunning'
|
||||
@@ -431,6 +473,7 @@ function waCheckContainerRunning() {
|
||||
dprint "WINDOWS CREATED. BOOTING WINDOWS."
|
||||
notify-send --expire-time=4000 --icon="dialog-info" --app-name="WinApps" --urgency="low" "WinApps" "Booting Windows."
|
||||
$COMPOSE_COMMAND --file "$COMPOSE_PATH" start &>/dev/null
|
||||
NEEDED_BOOT=true
|
||||
;;
|
||||
"restarting")
|
||||
dprint "WINDOWS RESTARTING. WAITING."
|
||||
@@ -441,6 +484,7 @@ function waCheckContainerRunning() {
|
||||
EXIT_STATUS=0
|
||||
dprint "WINDOWS RESTARTED."
|
||||
notify-send --expire-time=4000 --icon="dialog-info" --app-name="WinApps" --urgency="low" "WinApps" "Restarted Windows."
|
||||
NEEDED_BOOT=true
|
||||
break
|
||||
fi
|
||||
sleep $TIME_INTERVAL
|
||||
@@ -456,11 +500,13 @@ function waCheckContainerRunning() {
|
||||
dprint "WINDOWS SHUT OFF. BOOTING WINDOWS."
|
||||
notify-send --expire-time=4000 --icon="dialog-info" --app-name="WinApps" --urgency="low" "WinApps" "Booting Windows."
|
||||
$COMPOSE_COMMAND --file "$COMPOSE_PATH" start &>/dev/null
|
||||
NEEDED_BOOT=true
|
||||
;;
|
||||
"dead")
|
||||
dprint "WINDOWS DEAD. RECREATING WINDOWS CONTAINER."
|
||||
notify-send --expire-time=4000 --icon="dialog-info" --app-name="WinApps" --urgency="low" "WinApps" "Re-creating and booting Windows."
|
||||
$COMPOSE_COMMAND --file "$COMPOSE_PATH" down &>/dev/null && $COMPOSE_COMMAND --file "$COMPOSE_PATH" up -d &>/dev/null
|
||||
NEEDED_BOOT=true
|
||||
;;
|
||||
"unknown")
|
||||
EXIT_STATUS=$EC_UNKNOWN
|
||||
@@ -469,6 +515,45 @@ function waCheckContainerRunning() {
|
||||
|
||||
# Handle non-zero exit statuses.
|
||||
[ "$EXIT_STATUS" -ne 0 ] && waThrowExit "$EXIT_STATUS"
|
||||
|
||||
# Wait for container to be fully ready
|
||||
if [[ "$CONTAINER_STATE" == "created" || "$CONTAINER_STATE" == "exited" || "$CONTAINER_STATE" == "dead" || "$CONTAINER_STATE" == "restarting" ]]; then
|
||||
dprint "WAITING FOR CONTAINER TO BE FULLY READY..."
|
||||
notify-send --expire-time=4000 --icon="dialog-info" --app-name="WinApps" --urgency="low" "WinApps" "Waiting for Windows to be ready..."
|
||||
|
||||
TIME_ELAPSED=0
|
||||
|
||||
while (( TIME_ELAPSED < BOOT_TIMEOUT )); do
|
||||
# Check if container is running
|
||||
if [[ $("$WAFLAVOR" inspect --format='{{.State.Status}}' "$CONTAINER_NAME") == "running" ]]; then
|
||||
# Try to connect to RDP port to verify it's ready
|
||||
if timeout 1 bash -c ">/dev/tcp/$RDP_IP/$RDP_PORT" 2>/dev/null; then
|
||||
dprint "CONTAINER IS READY"
|
||||
notify-send --expire-time=4000 --icon="dialog-info" --app-name="WinApps" --urgency="low" "WinApps" "Windows is ready."
|
||||
# Add a delay after Windows is ready
|
||||
if [ "$NEEDED_BOOT" = "true" ]; then
|
||||
sleep 10
|
||||
fi
|
||||
break
|
||||
fi
|
||||
fi
|
||||
|
||||
sleep 5
|
||||
TIME_ELAPSED=$((TIME_ELAPSED + 5))
|
||||
|
||||
# Show progress every 30 seconds
|
||||
if (( TIME_ELAPSED % 30 == 0 )); then
|
||||
notify-send --expire-time=4000 --icon="dialog-info" --app-name="WinApps" --urgency="low" "WinApps" "Still waiting for Windows to be ready... ($TIME_ELAPSED seconds elapsed)"
|
||||
fi
|
||||
done
|
||||
|
||||
# If we timed out waiting for the container
|
||||
if (( TIME_ELAPSED >= BOOT_TIMEOUT )); then
|
||||
dprint "TIMEOUT WAITING FOR CONTAINER TO BE READY"
|
||||
notify-send --expire-time=4000 --icon="dialog-info" --app-name="WinApps" --urgency="low" "WinApps" "Timeout waiting for Windows to be ready. Please try again."
|
||||
waThrowExit $EC_FAIL_START
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# Name: 'waCheckPortOpen'
|
||||
@@ -521,11 +606,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 +622,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 +654,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,15 +675,10 @@ 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"\" \
|
||||
/app:program:"$WIN_EXECUTABLE",icon:"$ICON",name:"$FULL_NAME",cmd:\""$FILE_PATH"\" \
|
||||
/v:"$RDP_IP" &>/dev/null &
|
||||
|
||||
# Capture the process ID.
|
||||
|
@@ -44,6 +44,6 @@ services:
|
||||
# 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
|
||||
# - /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.
|
||||
|
BIN
demo/launcher.gif
Normal file
BIN
demo/launcher.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.6 MiB |
@@ -13,8 +13,8 @@ Although WinApps supports using `QEMU+KVM+libvirt` as a backend for running Wind
|
||||
|
||||
> [!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.
|
||||
> 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 commands is empty, run `echo -e "ip_tables\niptable_nat" | sudo tee /etc/modules-load.d/iptables.conf` and reboot.
|
||||
|
||||
## `Docker`
|
||||
### Installation
|
||||
|
@@ -46,6 +46,8 @@ Together, these components form a powerful and flexible virtualization stack, wi
|
||||
sudo reboot # Reboot the system to ensure the user is added to the relevant groups.
|
||||
```
|
||||
|
||||
Note: On NixOS, the group name for libvirt is `libvirtd` and not `libvirt`. In addition, user and group management on NixOS is handled through the Nix configuration files and not via traditional tools like `usermod`. Please see "Adding User to a group" on [this NixOS Wiki page](https://wiki.nixos.org/wiki/User_management).
|
||||
|
||||
Note: Due to a known bug in `rpm-ostree`, which affects various distributions such as Silverblue, Bazzite, Bluefin, Kinoite, Aurora, UCore, and others, the commands provided earlier may not properly add your user to all required groups. If the `groups $USER` command does not show your user as being part of the necessary groups, you'll need to manually add these groups to `/etc/group` if they are present in `/usr/lib/group`.
|
||||
|
||||
To resolve this:
|
||||
@@ -193,7 +195,7 @@ Together, these components form a powerful and flexible virtualization stack, wi
|
||||
|
||||
Example 1:
|
||||
- CPU cores share the same singular L3 cache, so this cannot be optimised.
|
||||
- CPU cores utilise different L1 and L2 caches, so isolatng corresponding thread pairs will help improve performance.
|
||||
- CPU cores utilise different L1 and L2 caches, so isolating corresponding thread pairs will help improve performance.
|
||||
- Thus, if limiting the virtual machine to a maximum of 4 threads, there are 10 possible optimal configurations:
|
||||
- T<sub>0</sub>+T<sub>4</sub>
|
||||
- T<sub>1</sub>+T<sub>5</sub>
|
||||
|
22
flake.lock
generated
22
flake.lock
generated
@@ -32,13 +32,28 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-filter": {
|
||||
"locked": {
|
||||
"lastModified": 1731533336,
|
||||
"narHash": "sha256-oRam5PS1vcrr5UPgALW0eo1m/5/pls27Z/pabHNy2Ms=",
|
||||
"owner": "numtide",
|
||||
"repo": "nix-filter",
|
||||
"rev": "f7653272fd234696ae94229839a99b73c9ab7de0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "nix-filter",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1724819573,
|
||||
"narHash": "sha256-GnR7/ibgIH1vhoy8cYdmXE6iyZqKqFxQSVkFgosBh6w=",
|
||||
"lastModified": 1751984180,
|
||||
"narHash": "sha256-LwWRsENAZJKUdD3SpLluwDmdXY9F45ZEgCb0X+xgOL0=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "71e91c409d1e654808b2621f28a327acfdad8dc2",
|
||||
"rev": "9807714d6944a957c2e036f84b0ff8caf9930bc0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -52,6 +67,7 @@
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat",
|
||||
"flake-utils": "flake-utils",
|
||||
"nix-filter": "nix-filter",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
},
|
||||
|
22
flake.nix
22
flake.nix
@@ -1,17 +1,29 @@
|
||||
{
|
||||
description = "WinApps Nix packages & NixOS module";
|
||||
description = "WinApps Nix packages";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
|
||||
flake-compat.url = "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
nix-filter.url = "github:numtide/nix-filter";
|
||||
};
|
||||
|
||||
nixConfig = {
|
||||
extra-substituters = [
|
||||
"https://cache.garnix.io"
|
||||
];
|
||||
|
||||
extra-trusted-public-keys = [
|
||||
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
|
||||
];
|
||||
};
|
||||
|
||||
outputs =
|
||||
{
|
||||
nixpkgs,
|
||||
flake-utils,
|
||||
nix-filter,
|
||||
...
|
||||
}:
|
||||
flake-utils.lib.eachDefaultSystem (
|
||||
@@ -19,11 +31,13 @@
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
in
|
||||
{
|
||||
rec {
|
||||
formatter = pkgs.nixfmt-rfc-style;
|
||||
|
||||
packages.winapps = pkgs.callPackage ./packages/winapps { };
|
||||
packages.winapps-launcher = pkgs.callPackage ./packages/winapps-launcher { };
|
||||
packages.winapps = pkgs.callPackage ./packages/winapps { inherit nix-filter; };
|
||||
packages.winapps-launcher = pkgs.callPackage ./packages/winapps-launcher {
|
||||
inherit (packages) winapps;
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
|
@@ -1,93 +0,0 @@
|
||||
Copyright 2023 The Unageo Project Authors (https://github.com/RichardSepsi/Unageo)
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
https://scripts.sil.org/OFL
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
@@ -1,16 +0,0 @@
|
||||
## Unageo typeface
|
||||
|
||||
Unageo is a simple, geometric typeface with variable weight and italic angle support, that was made with digital use in mind, however it works in print just as well .
|
||||
|
||||
It's designed to use perfect geometric shapes where possible while still maintaining great readability and it uses almost uniform stroke width all across each glyph on all weights.
|
||||
|
||||
Other than latin, Unageo also supports cyrillic and greek scripts.
|
||||
Unageo cyrillic was made in bulgarian style, that uses more rounded shapes and differentiated letter heights which makes it easier to tell letters apart and further improves readability.
|
||||
Greek uses the same rounded shapes and adds smooth lines to give it a more unique style.
|
||||
|
||||
### How was it made?
|
||||
Unageo is my first attempt at making a font, and since I had almost no prior experience with font creation and limited software avalability, I worked on Unageo with an unusual workflow. I designed the characters in inkscape and imported the outlines into fontforge. Since I'm familiar with inkscape, designing the glyphs wasn't too hard and inkscape has great tools for working with perfect geometry. It wasn't as great with fontforge, but I got accustomed to it quite fine and I was able to finish my font. After it was done, I used fontmake to generate my variable fonts and then fonttools mutator to generate the static fonts. Static fonts can also be exported directly from fontforge as the sources are interpolable.
|
||||
|
||||
##
|
||||
|
||||

|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -49,7 +49,7 @@ Function GetApplicationIcon {
|
||||
# Args:
|
||||
# - 'Names': An array of application names.
|
||||
# - 'Paths': An array of executable paths.
|
||||
# - 'Source': The source of the applications (e.g. Windows Registry, Package manangers, Universal Windows Platform (UWP), etc.)
|
||||
# - 'Source': The source of the applications (e.g. Windows Registry, Package managers, Universal Windows Platform (UWP), etc.)
|
||||
function PrintArrayData {
|
||||
param (
|
||||
[string[]]$Names,
|
||||
@@ -240,7 +240,7 @@ function AppSearchUWP {
|
||||
PrintArrayData -Names $exeNames -Paths $exePaths -Source "uwp"
|
||||
}
|
||||
|
||||
# Name: 'AppSearchWinReg'
|
||||
# Name: 'AppSearchChocolatey'
|
||||
# Role: Search for chocolatey shims.
|
||||
function AppSearchChocolatey {
|
||||
# Initialise empty arrays.
|
||||
@@ -272,7 +272,7 @@ function AppSearchChocolatey {
|
||||
}
|
||||
}
|
||||
|
||||
# Name: 'AppSearchWinReg'
|
||||
# Name: 'AppSearchScoop'
|
||||
# Role: Search for scoop shims.
|
||||
function AppSearchScoop {
|
||||
# Initialise empty arrays.
|
||||
|
@@ -1,25 +1,66 @@
|
||||
@echo off
|
||||
title WinApps Setup Wizard
|
||||
|
||||
reg import %~dp0\RDPApps.reg
|
||||
|
||||
if exists %~dp0\Container.reg (
|
||||
reg import %~dp0\Container.reg
|
||||
REM Check for administrative privileges
|
||||
fltmc >nul 2>&1 || (
|
||||
echo [INFO] Script not running as administrator. Attempting to relaunch with elevation...
|
||||
powershell -Command "Start-Process '%~f0' -Verb runAs"
|
||||
exit /b 0
|
||||
)
|
||||
|
||||
REM Create network profile cleanup scheduled task
|
||||
copy %~dp0\NetProfileCleanup.ps1 %windir%
|
||||
set "taskname=NetworkProfileCleanup"
|
||||
set "command=powershell.exe -ExecutionPolicy Bypass -File "%windir%\NetProfileCleanup.ps1^""
|
||||
REM Confirm the user wants to proceed with setup
|
||||
echo ============================================
|
||||
echo WinApps Setup Wizard
|
||||
echo ============================================
|
||||
echo.
|
||||
echo Press any key to continue or close this window to cancel...
|
||||
pause >nul
|
||||
echo.
|
||||
echo [INFO] Starting setup...
|
||||
|
||||
schtasks /query /tn "%taskname%" >nul 2>&1
|
||||
REM Apply RDP and system configuration tweaks
|
||||
echo [INFO] Importing "RDPApps.reg"...
|
||||
reg import "%~dp0RDPApps.reg" >nul 2>&1
|
||||
if %ERRORLEVEL% equ 0 (
|
||||
echo Task "%taskname%" already exists, deleting it first...
|
||||
schtasks /delete /tn "%taskname%" /f
|
||||
)
|
||||
|
||||
schtasks /create /tn "%taskname%" /tr "%command%" /sc onstart /ru "SYSTEM" /rl HIGHEST /f
|
||||
if %ERRORLEVEL% equ 0 (
|
||||
echo Scheduled task "%taskname%" created successfully.
|
||||
echo [SUCCESS] Imported "RDPApps.reg".
|
||||
) else (
|
||||
echo Failed to create scheduled task.
|
||||
echo [ERROR] Failed to import "RDPApps.reg".
|
||||
)
|
||||
|
||||
REM Configure the system clock to use UTC instead of local time
|
||||
if exist "%~dp0Container.reg" (
|
||||
echo [INFO] Importing "Container.reg"...
|
||||
reg import "%~dp0Container.reg" >nul 2>&1
|
||||
if %ERRORLEVEL% equ 0 (
|
||||
echo [SUCCESS] Imported "Container.reg".
|
||||
) else (
|
||||
echo [ERROR] Failed to import "Container.reg".
|
||||
)
|
||||
) else (
|
||||
echo [WARNING] "Container.reg" not found. Skipping...
|
||||
)
|
||||
|
||||
REM Create a startup task to clean up stale network profiles
|
||||
echo [INFO] Creating network profile cleanup task...
|
||||
|
||||
REM Initialise values required to create the startup task
|
||||
set "scriptpath=%windir%\NetProfileCleanup.ps1"
|
||||
set "taskname=WinApps_NetworkProfileCleanup"
|
||||
set "command=powershell.exe -ExecutionPolicy Bypass -File ""%scriptpath%"""
|
||||
|
||||
REM Copy the script to the Windows directory
|
||||
copy /Y "%~dp0NetProfileCleanup.ps1" "%scriptpath%" >nul
|
||||
if %ERRORLEVEL% neq 0 (
|
||||
echo [ERROR] Failed to copy "NetProfileCleanup.ps1" to "%windir%".
|
||||
) else (
|
||||
schtasks /create /tn "%taskname%" /tr "%command%" /sc onstart /ru "SYSTEM" /rl HIGHEST /f >nul 2>&1
|
||||
if %ERRORLEVEL% equ 0 (
|
||||
echo [SUCCESS] Created scheduled task "%taskname%".
|
||||
) else (
|
||||
echo [ERROR] Failed to create scheduled task "%taskname%".
|
||||
)
|
||||
)
|
||||
|
||||
echo.
|
||||
echo Press any key to exit...
|
||||
pause >nul
|
||||
|
@@ -4,8 +4,8 @@
|
||||
fetchFromGitHub,
|
||||
makeWrapper,
|
||||
makeDesktopItem,
|
||||
callPackage,
|
||||
yad,
|
||||
winapps ? throw "Pass in the winapps package",
|
||||
...
|
||||
}:
|
||||
let
|
||||
@@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
buildInputs = [
|
||||
yad
|
||||
(callPackage ../winapps { })
|
||||
winapps
|
||||
];
|
||||
|
||||
patches = [ ./WinApps-Launcher.patch ];
|
||||
|
@@ -1,33 +1,36 @@
|
||||
{
|
||||
stdenv,
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
makeWrapper,
|
||||
freerdp3,
|
||||
freerdp,
|
||||
dialog,
|
||||
libnotify,
|
||||
netcat,
|
||||
iproute2,
|
||||
writeShellScriptBin,
|
||||
nix-filter ? throw "Pass github:numtide/nix-filter as an argument!",
|
||||
...
|
||||
}:
|
||||
let
|
||||
rev = "885d02079a36aa9696de46440c5b29b95278f904";
|
||||
hash = "sha256-hkD1siuwlRNOnXpDETZEQlIb/j91hkCspAUl/m5BB6g=";
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "winapps";
|
||||
version = "0-unstable-2025-05-26";
|
||||
version = "0-unstable-2025-07-02";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "winapps-org";
|
||||
repo = "winapps";
|
||||
|
||||
inherit rev hash;
|
||||
src = nix-filter {
|
||||
root = ./../..;
|
||||
include = [
|
||||
"apps"
|
||||
"install"
|
||||
"bin"
|
||||
"icons"
|
||||
"LICENSE.md"
|
||||
"COPYRIGHT.md"
|
||||
"setup.sh"
|
||||
];
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
buildInputs = [
|
||||
freerdp3
|
||||
(writeShellScriptBin "xfreerdp3" ''${lib.getExe' freerdp "xfreerdp"} "$@"'')
|
||||
libnotify
|
||||
dialog
|
||||
netcat
|
||||
@@ -35,7 +38,6 @@ stdenv.mkDerivation rec {
|
||||
];
|
||||
|
||||
patches = [
|
||||
./winapps.patch
|
||||
./setup.patch
|
||||
];
|
||||
|
||||
|
@@ -7,9 +7,9 @@ index 0debe4d..6aeea08 100755
|
||||
readonly USER_BIN_PATH_WIN='\\tsclient\home\.local\bin' # WINDOWS path to 'bin' directory for a '--user' WinApps installation.
|
||||
# 'SOURCE'
|
||||
-readonly SYS_SOURCE_PATH="${SYS_BIN_PATH}/winapps-src" # UNIX path to WinApps source directory for a '--system' WinApps installation.
|
||||
-readonly USER_SOURCE_PATH="${USER_BIN_PATH}/winapps-src" # UNIX path to WinApps source directory for a '--system' WinApps installation.
|
||||
-readonly USER_SOURCE_PATH="${USER_BIN_PATH}/winapps-src" # UNIX path to WinApps source directory for a '--user' WinApps installation.
|
||||
+readonly SYS_SOURCE_PATH="@out@/src" # UNIX path to WinApps source directory for a '--system' WinApps installation.
|
||||
+readonly USER_SOURCE_PATH="@out@/src" # UNIX path to WinApps source directory for a '--system' WinApps installation.
|
||||
+readonly USER_SOURCE_PATH="@out@/src" # UNIX path to WinApps source directory for a '--user' WinApps installation.
|
||||
# 'APP'
|
||||
readonly SYS_APP_PATH="/usr/share/applications" # UNIX path to 'applications' directory for a '--system' WinApps installation.
|
||||
readonly USER_APP_PATH="${HOME}/.local/share/applications" # UNIX path to 'applications' directory for a '--user' WinApps installation.
|
||||
|
@@ -1,11 +0,0 @@
|
||||
--- a/bin/winapps
|
||||
+++ b/bin/winapps
|
||||
@@ -295,7 +295,7 @@ function waCheckGroupMembership() {
|
||||
# shellcheck disable=SC2155 # Silence warnings regarding masking return values through simultaneous declaration and assignment.
|
||||
local USER_GROUPS=$(groups "$(whoami)")
|
||||
|
||||
- if ! (echo "$USER_GROUPS" | grep -q -E "\blibvirt\b") || ! (echo "$USER_GROUPS" | grep -q -E "\bkvm\b"); then
|
||||
+ if ! (echo "$USER_GROUPS" | grep -q -E "\blibvirtd\b") || ! (echo "$USER_GROUPS" | grep -q -E "\bkvm\b"); then
|
||||
waThrowExit "$EC_NOT_IN_GROUP"
|
||||
fi
|
||||
}
|
74
setup.sh
74
setup.sh
@@ -21,7 +21,7 @@ readonly EC_BAD_ARGUMENT="2" # Unsupported argument passed to script.
|
||||
readonly EC_EXISTING_INSTALL="3" # Existing conflicting WinApps installation.
|
||||
readonly EC_NO_CONFIG="4" # Absence of a valid WinApps configuration file.
|
||||
readonly EC_MISSING_DEPS="5" # Missing dependencies.
|
||||
readonly EC_NO_SUDO="6" # Insufficient privilages to invoke superuser access.
|
||||
readonly EC_NO_SUDO="6" # Insufficient privileges to invoke superuser access.
|
||||
readonly EC_NOT_IN_GROUP="7" # Current user not in group 'libvirt' and/or 'kvm'.
|
||||
readonly EC_VM_OFF="8" # Windows 'libvirt' VM powered off.
|
||||
readonly EC_VM_PAUSED="9" # Windows 'libvirt' VM paused.
|
||||
@@ -40,7 +40,7 @@ readonly USER_BIN_PATH="${HOME}/.local/bin" # UNIX path to 'bin' dir
|
||||
readonly USER_BIN_PATH_WIN='\\tsclient\home\.local\bin' # WINDOWS path to 'bin' directory for a '--user' WinApps installation.
|
||||
# 'SOURCE'
|
||||
readonly SYS_SOURCE_PATH="${SYS_BIN_PATH}/winapps-src" # UNIX path to WinApps source directory for a '--system' WinApps installation.
|
||||
readonly USER_SOURCE_PATH="${USER_BIN_PATH}/winapps-src" # UNIX path to WinApps source directory for a '--system' WinApps installation.
|
||||
readonly USER_SOURCE_PATH="${USER_BIN_PATH}/winapps-src" # UNIX path to WinApps source directory for a '--user' WinApps installation.
|
||||
# 'APP'
|
||||
readonly SYS_APP_PATH="/usr/share/applications" # UNIX path to 'applications' directory for a '--system' WinApps installation.
|
||||
readonly USER_APP_PATH="${HOME}/.local/share/applications" # UNIX path to 'applications' directory for a '--user' WinApps installation.
|
||||
@@ -92,10 +92,12 @@ 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'.
|
||||
@@ -149,7 +151,7 @@ function waGetSourceCode() {
|
||||
SCRIPT_DIR_PATH=$(readlink -f "$(dirname "${BASH_SOURCE[0]}")")
|
||||
|
||||
# Check if winapps is currently installed on $SOURCE_PATH
|
||||
if [[ -f "$SCRIPT_DIR_PATH/winapps" && "$SCRIPT_DIR_PATH" -ne "$SOURCE_PATH" ]]; then
|
||||
if [[ -f "$SCRIPT_DIR_PATH/winapps" && "$SCRIPT_DIR_PATH" != "$SOURCE_PATH" ]]; then
|
||||
# Display a warning.
|
||||
echo -e "${WARNING_TEXT}[WARNING]${CLEAR_TEXT} You are running a WinApps installation located outside of default location '${SOURCE_PATH}'. A new installation will be created."
|
||||
echo -e "${WARNING_TEXT}[WARNING]${CLEAR_TEXT} You might want to remove your old installation on '${SCRIPT_DIR_PATH}'."
|
||||
@@ -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."
|
||||
@@ -1137,6 +1138,10 @@ function waFindInstalled() {
|
||||
# Extract the name of the application from the absolute path of the folder.
|
||||
APPLICATION="$(basename "$APPLICATION")"
|
||||
|
||||
if [[ "$APPLICATION" == "ms-office-protocol-handler.desktop" ]]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
# Source 'Info' File Containing:
|
||||
# - The Application Name (FULL_NAME)
|
||||
# - The Shortcut Name (NAME)
|
||||
@@ -1151,7 +1156,7 @@ function waFindInstalled() {
|
||||
echo "IF EXIST \"${WIN_EXECUTABLE}\" ECHO ${APPLICATION} >> ${TMP_INST_FILE_PATH_WIN}" >>"$BATCH_SCRIPT_PATH"
|
||||
done
|
||||
|
||||
# Append a command to the batch script to run the PowerShell script and store it's output in the 'detected' file.
|
||||
# Append a command to the batch script to run the PowerShell script and store its output in the 'detected' file.
|
||||
# shellcheck disable=SC2129 # Silence warning regarding repeated redirects.
|
||||
echo "powershell.exe -ExecutionPolicy Bypass -File ${PS_SCRIPT_HOME_PATH_WIN} > ${DETECTED_FILE_PATH_WIN}" >>"$BATCH_SCRIPT_PATH"
|
||||
|
||||
@@ -1172,9 +1177,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 +1186,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 +1218,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.
|
||||
@@ -1276,7 +1279,7 @@ function waConfigureApp() {
|
||||
|
||||
# Source 'Info' File Containing:
|
||||
# - The Application Name (FULL_NAME)
|
||||
# - The Shortcut Nsame (NAME)
|
||||
# - The Shortcut Name (NAME)
|
||||
# - Application Categories (CATEGORIES)
|
||||
# - Executable Path (WIN_EXECUTABLE)
|
||||
# - Supported MIME Types (MIME_TYPES)
|
||||
@@ -1320,9 +1323,9 @@ MimeType=${MIME_TYPES}"
|
||||
function waConfigureOfficiallySupported() {
|
||||
# Declare variables.
|
||||
local OSA_LIST=() # Stores a list of all officially supported applications installed on Windows.
|
||||
local OFFICE_APPS=("access" "access-o365" "access-o365-x86" "access-x86" "adobe-cc" "acrobat9" "acrobat-x-pro" "aftereffects-cc" "audition-cc" "bridge-cc" "bridge-cc-x86" "bridge-cs6" "bridge-cs6-x86" "cmd" "dymo-connect" "excel" "excel-o365" "excel-o365-x86" "excel-x86" "excel-x86-2010" "explorer" "iexplorer" "illustrator-cc" "lightroom-cc" "linqpad8" "mirc" "mspaint" "onenote" "onenote-o365" "onenote-o365-x86" "onenote-x86" "outlook" "outlook-o365" "outlook-o365-x86" "powerpoint" "powerpoint-o365" "powerpoint-o365-x86" "powerpoint-x86" "publisher" "publisher-o365" "publisher-o365-x86" "publisher-x86" "project" "project-x86" "remarkable-desktop" "ssms20" "visual-studio-comm" "visual-studio-ent" "visual-studio-pro" "visio" "visio-x86" "word" "word-o365" "word-o365-x86" "word-x86" "word-x86-2010")
|
||||
|
||||
# Read the list of officially supported applications that are installed on Windows into an array, returning an empty array if no such files exist.
|
||||
# This will remove leading and trailing whitespace characters as well as ignore empty lines.
|
||||
readarray -t OSA_LIST < <(grep -v '^[[:space:]]*$' "$INST_FILE_PATH" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//' 2>/dev/null || true)
|
||||
|
||||
# Create application entries for each officially supported application.
|
||||
@@ -1336,6 +1339,19 @@ function waConfigureOfficiallySupported() {
|
||||
# Configure the application.
|
||||
waConfigureApp "$OSA" svg
|
||||
|
||||
# Check if the application is an Office app and copy the protocol handler.
|
||||
if [[ " ${OFFICE_APPS[*]} " == *" $OSA "* ]]; then
|
||||
# Determine the target directory based on whether the installation is for the system or user.
|
||||
if [[ "$OPT_SYSTEM" -eq 1 ]]; then
|
||||
TARGET_DIR="$SYS_APP_PATH"
|
||||
else
|
||||
TARGET_DIR="$USER_APP_PATH"
|
||||
fi
|
||||
|
||||
# Copy the protocol handler to the appropriate directory.
|
||||
$SUDO cp "./apps/ms-office-protocol-handler.desktop" "$TARGET_DIR/ms-office-protocol-handler.desktop"
|
||||
fi
|
||||
|
||||
# Print feedback.
|
||||
echo -e "${DONE_TEXT}Done!${CLEAR_TEXT}"
|
||||
done
|
||||
@@ -1363,7 +1379,7 @@ function waConfigureApps() {
|
||||
for OSA in "${OSA_LIST[@]}"; do
|
||||
# Source 'Info' File Containing:
|
||||
# - The Application Name (FULL_NAME)
|
||||
# - The Shortcut Nsame (NAME)
|
||||
# - The Shortcut Name (NAME)
|
||||
# - Application Categories (CATEGORIES)
|
||||
# - Executable Path (WIN_EXECUTABLE)
|
||||
# - Supported MIME Types (MIME_TYPES)
|
||||
@@ -1558,13 +1574,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
|
||||
|
||||
@@ -1667,10 +1676,21 @@ function waEnsureOnPath() {
|
||||
# Name: 'waUninstall'
|
||||
# Role: Uninstalls WinApps.
|
||||
function waUninstall() {
|
||||
|
||||
# Print feedback.
|
||||
[ "$OPT_SYSTEM" -eq 1 ] && echo -e "${BOLD_TEXT}REMOVING SYSTEM INSTALLATION.${CLEAR_TEXT}"
|
||||
[ "$OPT_USER" -eq 1 ] && echo -e "${BOLD_TEXT}REMOVING USER INSTALLATION.${CLEAR_TEXT}"
|
||||
|
||||
# Determine the target directory for the protocol handler based on the installation type.
|
||||
if [[ "$OPT_SYSTEM" -eq 1 ]]; then
|
||||
TARGET_DIR="$SYS_APP_PATH"
|
||||
else
|
||||
TARGET_DIR="$USER_APP_PATH"
|
||||
fi
|
||||
|
||||
# Remove the 'ms-office-protocol-handler.desktop' file if it exists.
|
||||
$SUDO rm -f "$TARGET_DIR/ms-office-protocol-handler.desktop"
|
||||
|
||||
# Declare variables.
|
||||
local WINAPPS_DESKTOP_FILES=() # Stores a list of '.desktop' file paths.
|
||||
local WINAPPS_APP_BASH_SCRIPTS=() # Stores a list of bash script paths.
|
||||
|
Reference in New Issue
Block a user