From cdadd30428328a539151b408dcdb1f0355c50679 Mon Sep 17 00:00:00 2001 From: azerty9971 <3135352+azerty9971@users.noreply.github.com> Date: Sun, 18 Jan 2026 20:51:12 +0100 Subject: [PATCH] Add more flags when using full RDP sessions (winapps windows) and non-full RDP sessions (other winapps commands) (#860) Signed-off-by: Oskar Manhart <52569953+oskardotglobal@users.noreply.github.com> Signed-off-by: azerty9971 Co-authored-by: Oskar Manhart <52569953+oskardotglobal@users.noreply.github.com> --- README.md | 14 ++++++++++++++ bin/winapps | 10 ++++++++++ setup.sh | 6 ++++-- 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7e79d8d..f5acf00 100644 --- a/README.md +++ b/README.md @@ -452,6 +452,20 @@ REMOVABLE_MEDIA="/run/media" # VALID VALUES: See https://github.com/awakecoding/FreeRDP-Manuals/blob/master/User/FreeRDP-User-Manual.markdown RDP_FLAGS="/cert:tofu /sound /microphone +home-drive" +# [NON FULL WINDOWS RDP FLAGS] +# NOTES: +# - Use these flags to pass specific flags to the freerdp command when you are starting a non-full RDP session (any other command than winapps windows) +# DEFAULT_VALUES: '' +# VALID_VALUES: See https://github.com/awakecoding/FreeRDP-Manuals/blob/master/User/FreeRDP-User-Manual.markdown +RDP_FLAGS_NON_WINDOWS="" + +# [FULL WINDOWS RDP FLAGS] +# NOTES: +# - Use these flags to pass specific flags to the freerdp command when you are starting a full RDP session (winapps windows) +# DEFAULT_VALUES: '' +# VALID_VALUES: See https://github.com/awakecoding/FreeRDP-Manuals/blob/master/User/FreeRDP-User-Manual.markdown +RDP_FLAGS_WINDOWS="" + # [DEBUG WINAPPS] # NOTES: # - Creates and appends to ~/.local/share/winapps/winapps.log when running WinApps. diff --git a/bin/winapps b/bin/winapps index 0b73d34..1eaccc8 100755 --- a/bin/winapps +++ b/bin/winapps @@ -54,6 +54,8 @@ AUTOPAUSE_TIME="300" DEBUG="true" BOOT_TIMEOUT=120 HIDEF="on" +RDP_FLAGS_WINDOWS="" +RDP_FLAGS_NON_WINDOWS="" # OTHER FREERDP_PID=-1 @@ -604,7 +606,9 @@ function waRunCommand() { # Open Windows RDP session. dprint "WINDOWS" + # shellcheck disable=SC2086 #Disable warning for globbing and word splitting $FREERDP_COMMAND \ + $RDP_FLAGS_WINDOWS \ /d:"$RDP_DOMAIN" \ /u:"$RDP_USER" \ /p:"$RDP_PASS" \ @@ -620,7 +624,9 @@ function waRunCommand() { elif [ "$1" = "manual" ]; then # Open specified application. dprint "MANUAL: ${2}" + # shellcheck disable=SC2086 #Disable warning for globbing and word splitting $FREERDP_COMMAND \ + $RDP_FLAGS_NON_WINDOWS \ /d:"$RDP_DOMAIN" \ /u:"$RDP_USER" \ /p:"$RDP_PASS" \ @@ -652,7 +658,9 @@ function waRunCommand() { # Check if a file path was specified, and pass this to the application. if [ -z "$2" ]; then # No file path specified. + # shellcheck disable=SC2086 #Disable warning for globbing and word splitting $FREERDP_COMMAND \ + $RDP_FLAGS_NON_WINDOWS \ /d:"$RDP_DOMAIN" \ /u:"$RDP_USER" \ /p:"$RDP_PASS" \ @@ -673,7 +681,9 @@ function waRunCommand() { dprint "UNIX_FILE_PATH: ${2}" dprint "WINDOWS_FILE_PATH: ${FILE_PATH}" + # shellcheck disable=SC2086 #Disable warning for globbing and word splitting $FREERDP_COMMAND \ + $RDP_FLAGS_NON_WINDOWS \ /d:"$RDP_DOMAIN" \ /u:"$RDP_USER" \ /p:"$RDP_PASS" \ diff --git a/setup.sh b/setup.sh index 56c2ef2..7f9ae33 100755 --- a/setup.sh +++ b/setup.sh @@ -1035,8 +1035,9 @@ function waCheckRDPAccess() { # If the file is created, it means Windows received the command via FreeRDP successfully and can read and write to the Linux home folder. # Note: The following final line is expected within the log, indicating successful execution of the 'tsdiscon' command and termination of the RDP session. # [INFO][com.freerdp.core] - [rdp_print_errinfo]: ERRINFO_LOGOFF_BY_USER (0x0000000C):The disconnection was initiated by the user logging off their session on the server. - # shellcheck disable=SC2140,SC2027 # Disable warnings regarding unquoted strings. + # shellcheck disable=SC2140,SC2027,SC2086 # Disable warnings regarding unquoted strings. $FREERDP_COMMAND \ + $RDP_FLAGS_NON_WINDOWS \ /cert:tofu \ /d:"$RDP_DOMAIN" \ /u:"$RDP_USER" \ @@ -1167,8 +1168,9 @@ function waFindInstalled() { # Silently execute the batch script within Windows in the background (Log Output To File) # Note: The following final line is expected within the log, indicating successful execution of the 'tsdiscon' command and termination of the RDP session. # [INFO][com.freerdp.core] - [rdp_print_errinfo]: ERRINFO_LOGOFF_BY_USER (0x0000000C):The disconnection was initiated by the user logging off their session on the server. - # shellcheck disable=SC2140,SC2027 # Disable warnings regarding unquoted strings. + # shellcheck disable=SC2140,SC2027,SC2086 # Disable warnings regarding unquoted strings. $FREERDP_COMMAND \ + $RDP_FLAGS_NON_WINDOWS \ /cert:tofu \ /d:"$RDP_DOMAIN" \ /u:"$RDP_USER" \