16 Commits

Author SHA1 Message Date
Oskar Manhart
e8105f9ea6 Merge pull request #558 from winapps-org/chore/nix_update_actions
Packages: update
2025-06-15 13:48:19 +02:00
github-actions[bot]
dd9a85aae1 winapps: 0-unstable-2025-06-05 -> 0-unstable-2025-06-10
Diff: 2b2f4cea69...e2e9fd9b7b
2025-06-15 10:04:14 +00:00
Oskar Manhart
e2e9fd9b7b Merge pull request #509 from egvrl/main
Add protocol handler for Microsoft Office links (e.g. ms-office://)
2025-06-10 16:13:25 +02:00
Oskar Manhart
5594a23298 feat: don't hardcode winapps path 2025-06-10 16:12:53 +02:00
Oskar Manhart
a7e465c704 Merge pull request #538 from winapps-org/chore/nix_update_actions
Packages: update
2025-06-08 19:31:08 +02:00
github-actions[bot]
c3affa75a8 winapps: 0-unstable-2025-05-26 -> 0-unstable-2025-06-05
Diff: 885d02079a...2b2f4cea69
2025-06-08 10:04:07 +00:00
Oskar Manhart
2b2f4cea69 Merge pull request #524 from JoAllg/increase-timelimits
fix(setup.sh): increase timeout durations for RDP port check and process completion
2025-06-05 11:22:03 +02:00
pre-commit-ci[bot]
026325d2bf [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-06-05 08:32:07 +00:00
Joshua Allgeier
e7dfd56515 feat: add configurable timeout settings for RDP operations in README and setup.sh 2025-06-05 10:31:03 +02:00
pre-commit-ci[bot]
b300444e15 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-06-04 20:44:52 +00:00
Joshua Allgeier
46de8a8caa fix(setup.sh): increase timeout durations for RDP port check and process completion 2025-06-04 22:37:57 +02:00
pre-commit-ci[bot]
5946444c63 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-05-15 14:26:58 +00:00
eddie g.
afb333ab4f small README.md fixes 2025-05-15 16:19:14 +02:00
eddie g.
97a3889ecc return to original link to be able to merge + readme update 2025-05-15 16:13:39 +02:00
eddie g.
c06ae550bc fix for application loop 2025-05-15 14:09:17 +02:00
eddie g.
bac0d08cf2 testing ms-office-protocol install 2025-05-15 14:01:17 +02:00
5 changed files with 79 additions and 10 deletions

View File

@@ -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 an [User Agent switcher](https://github.com/ray-lothian/UserAgent-Switcher/) Browser Extension and set the User-Agent to Windows, as as the Office webapps typically hide the "Open in Desktop App" option for Linux users.)
## Supported Applications
**WinApps supports <u>*ALL*</u> Windows applications.**
@@ -452,6 +453,31 @@ AUTOPAUSE_TIME="300"
# DEFAULT VALUE: '' (BLANK)
# VALID VALUES: The command required to run FreeRDPv3 on your system (e.g., 'xfreerdp', 'xfreerdp3', etc.).
FREERDP_COMMAND=""
# [TIMEOUTS]
# NOTES:
# - These settings control various timeout durations within the WinApps setup.
# - Increasing the timeouts is only necessary if the corresponding errors occur.
# - Ensure you have followed all the Troubleshooting Tips in the error message first.
# PORT CHECK
# - The maximum time (in seconds) to wait when checking if the RDP port on Windows is open.
# - Corresponding error: "NETWORK CONFIGURATION ERROR" (exit status 13).
# DEFAULT VALUE: '5'
PORT_TIMEOUT="5"
# RDP CONNECTION TEST
# - The maximum time (in seconds) to wait when testing the initial RDP connection to Windows.
# - Corresponding error: "REMOTE DESKTOP PROTOCOL FAILURE" (exit status 14).
# DEFAULT VALUE: '30'
RDP_TIMEOUT="30"
# APPLICATION SCAN
# - The maximum time (in seconds) to wait for the script that scans for installed applications on Windows to complete.
# - Corresponding error: "APPLICATION QUERY FAILURE" (exit status 15).
# DEFAULT VALUE: '60'
APP_SCAN_TIMEOUT="60"
```
> [!IMPORTANT]

View 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;

View File

@@ -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.

View File

@@ -11,12 +11,12 @@
...
}:
let
rev = "885d02079a36aa9696de46440c5b29b95278f904";
hash = "sha256-hkD1siuwlRNOnXpDETZEQlIb/j91hkCspAUl/m5BB6g=";
rev = "e2e9fd9b7b66bd1432c2a7186017da5c281d5b9e";
hash = "sha256-N6ArgdiJyhWNALqpRxLR6RDDMsiqEf2RxWLQ2z7T23Y=";
in
stdenv.mkDerivation rec {
pname = "winapps";
version = "0-unstable-2025-05-26";
version = "0-unstable-2025-06-10";
src = fetchFromGitHub {
owner = "winapps-org";

View File

@@ -96,6 +96,9 @@ MULTIMON="false" # Imported variable.
DEBUG="true" # Imported variable.
FREERDP_COMMAND="" # Imported variable.
MULTI_FLAG="" # Set based on value of $MULTIMON.
PORT_TIMEOUT=5 # Default port check timeout.
RDP_TIMEOUT=30 # Default RDP connection test timeout.
APP_SCAN_TIMEOUT=60 # Default application scan timeout.
# PERMISSIONS AND DIRECTORIES
SUDO="" # Set to "sudo" if the user specifies '--system', or "" if the user specifies '--user'.
@@ -988,7 +991,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 +1004,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.
@@ -1055,8 +1059,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 +1095,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 +1142,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)
@@ -1184,8 +1193,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 +1225,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.
@@ -1320,9 +1330,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 +1346,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
@@ -1667,10 +1690,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.