mirror of
https://github.com/winapps-org/winapps.git
synced 2025-07-17 18:31:45 +02:00
Compare commits
4 Commits
dd9a85aae1
...
feat-optim
Author | SHA1 | Date | |
---|---|---|---|
dcd662dc06 | |||
a317ba41f4 | |||
fc3e5e0839 | |||
b42449459e |
15
README.md
15
README.md
@ -403,18 +403,9 @@ REMOVABLE_MEDIA="/run/media"
|
|||||||
# [ADDITIONAL FREERDP FLAGS & ARGUMENTS]
|
# [ADDITIONAL FREERDP FLAGS & ARGUMENTS]
|
||||||
# NOTES:
|
# NOTES:
|
||||||
# - You can try adding /network:lan to these flags in order to increase performance, however, some users have faced issues with this.
|
# - 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
|
# VALID VALUES: See https://github.com/awakecoding/FreeRDP-Manuals/blob/master/User/FreeRDP-User-Manual.markdown
|
||||||
RDP_FLAGS="/cert:tofu /sound /microphone"
|
RDP_FLAGS="/cert:tofu /sound /microphone +home-drive"
|
||||||
|
|
||||||
# [MULTIPLE MONITORS]
|
|
||||||
# NOTES:
|
|
||||||
# - If enabled, a FreeRDP bug *might* produce a black screen.
|
|
||||||
# DEFAULT VALUE: 'false'
|
|
||||||
# VALID VALUES:
|
|
||||||
# - 'true'
|
|
||||||
# - 'false'
|
|
||||||
MULTIMON="false"
|
|
||||||
|
|
||||||
# [DEBUG WINAPPS]
|
# [DEBUG WINAPPS]
|
||||||
# NOTES:
|
# NOTES:
|
||||||
@ -491,7 +482,7 @@ APP_SCAN_TIMEOUT="60"
|
|||||||
- For domain users, you can uncomment and change `RDP_DOMAIN`.
|
- 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).
|
- 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.
|
- 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.
|
||||||
- If you enable `DEBUG`, a log will be created on each application start in `~/.local/share/winapps/winapps.log`.
|
- 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`.
|
- If using a system on which the FreeRDP command is not `xfreerdp` or `xfreerdp3`, the correct command can be specified using `FREERDP_COMMAND`.
|
||||||
|
|
||||||
|
25
bin/winapps
25
bin/winapps
@ -49,9 +49,7 @@ REMOVABLE_MEDIA=""
|
|||||||
RDP_SCALE=100
|
RDP_SCALE=100
|
||||||
AUTOPAUSE="off"
|
AUTOPAUSE="off"
|
||||||
AUTOPAUSE_TIME="300"
|
AUTOPAUSE_TIME="300"
|
||||||
MULTIMON="false"
|
|
||||||
DEBUG="true"
|
DEBUG="true"
|
||||||
MULTI_FLAG=""
|
|
||||||
|
|
||||||
# OTHER
|
# OTHER
|
||||||
FREERDP_PID=-1
|
FREERDP_PID=-1
|
||||||
@ -212,9 +210,6 @@ function waLoadConfig() {
|
|||||||
waThrowExit $EC_MISSING_CONFIG
|
waThrowExit $EC_MISSING_CONFIG
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Update 'MULTI_FLAG' based on 'MULTIMON'.
|
|
||||||
MULTI_FLAG=$([[ $MULTIMON == "true" ]] && echo "/multimon" || echo "+span")
|
|
||||||
|
|
||||||
# Update $RDP_SCALE.
|
# Update $RDP_SCALE.
|
||||||
waFixScale
|
waFixScale
|
||||||
# Update when $REMOVABLE_MEDIA is null
|
# Update when $REMOVABLE_MEDIA is null
|
||||||
@ -521,11 +516,8 @@ function waRunCommand() {
|
|||||||
/u:"$RDP_USER" \
|
/u:"$RDP_USER" \
|
||||||
/p:"$RDP_PASS" \
|
/p:"$RDP_PASS" \
|
||||||
/scale:"$RDP_SCALE" \
|
/scale:"$RDP_SCALE" \
|
||||||
+dynamic-resolution \
|
|
||||||
+auto-reconnect \
|
+auto-reconnect \
|
||||||
+home-drive \
|
+dynamic-resolution \
|
||||||
+clipboard \
|
|
||||||
-wallpaper \
|
|
||||||
/wm-class:"Microsoft Windows" \
|
/wm-class:"Microsoft Windows" \
|
||||||
/t:"Windows RDP Session [$RDP_IP]" \
|
/t:"Windows RDP Session [$RDP_IP]" \
|
||||||
/v:"$RDP_IP" &>/dev/null &
|
/v:"$RDP_IP" &>/dev/null &
|
||||||
@ -540,12 +532,7 @@ function waRunCommand() {
|
|||||||
/u:"$RDP_USER" \
|
/u:"$RDP_USER" \
|
||||||
/p:"$RDP_PASS" \
|
/p:"$RDP_PASS" \
|
||||||
/scale:"$RDP_SCALE" \
|
/scale:"$RDP_SCALE" \
|
||||||
+dynamic-resolution \
|
|
||||||
+auto-reconnect \
|
+auto-reconnect \
|
||||||
+home-drive \
|
|
||||||
+clipboard \
|
|
||||||
-wallpaper \
|
|
||||||
"$MULTI_FLAG" \
|
|
||||||
/app:program:"$2" \
|
/app:program:"$2" \
|
||||||
/v:"$RDP_IP" &>/dev/null &
|
/v:"$RDP_IP" &>/dev/null &
|
||||||
|
|
||||||
@ -577,12 +564,7 @@ function waRunCommand() {
|
|||||||
/u:"$RDP_USER" \
|
/u:"$RDP_USER" \
|
||||||
/p:"$RDP_PASS" \
|
/p:"$RDP_PASS" \
|
||||||
/scale:"$RDP_SCALE" \
|
/scale:"$RDP_SCALE" \
|
||||||
+dynamic-resolution \
|
|
||||||
+auto-reconnect \
|
+auto-reconnect \
|
||||||
+home-drive \
|
|
||||||
+clipboard \
|
|
||||||
-wallpaper \
|
|
||||||
"$MULTI_FLAG" \
|
|
||||||
/wm-class:"$FULL_NAME" \
|
/wm-class:"$FULL_NAME" \
|
||||||
/app:program:"$WIN_EXECUTABLE",icon:"$ICON",name:"$FULL_NAME" \
|
/app:program:"$WIN_EXECUTABLE",icon:"$ICON",name:"$FULL_NAME" \
|
||||||
/v:"$RDP_IP" &>/dev/null &
|
/v:"$RDP_IP" &>/dev/null &
|
||||||
@ -603,13 +585,8 @@ function waRunCommand() {
|
|||||||
/u:"$RDP_USER" \
|
/u:"$RDP_USER" \
|
||||||
/p:"$RDP_PASS" \
|
/p:"$RDP_PASS" \
|
||||||
/scale:"$RDP_SCALE" \
|
/scale:"$RDP_SCALE" \
|
||||||
+dynamic-resolution \
|
|
||||||
+auto-reconnect \
|
+auto-reconnect \
|
||||||
+home-drive \
|
|
||||||
+clipboard \
|
|
||||||
/drive:media,"$REMOVABLE_MEDIA" \
|
/drive:media,"$REMOVABLE_MEDIA" \
|
||||||
-wallpaper \
|
|
||||||
"$MULTI_FLAG" \
|
|
||||||
/wm-class:"$FULL_NAME" \
|
/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 &
|
/v:"$RDP_IP" &>/dev/null &
|
||||||
|
16
setup.sh
16
setup.sh
@ -92,10 +92,9 @@ VM_NAME="RDPWindows" # Name of the Windows VM (FOR 'libvirt' ONLY).
|
|||||||
WAFLAVOR="docker" # Imported variable.
|
WAFLAVOR="docker" # Imported variable.
|
||||||
RDP_SCALE=100 # Imported variable.
|
RDP_SCALE=100 # Imported variable.
|
||||||
RDP_FLAGS="" # Imported variable.
|
RDP_FLAGS="" # Imported variable.
|
||||||
MULTIMON="false" # Imported variable.
|
|
||||||
DEBUG="true" # Imported variable.
|
DEBUG="true" # Imported variable.
|
||||||
FREERDP_COMMAND="" # Imported variable.
|
FREERDP_COMMAND="" # Imported variable.
|
||||||
MULTI_FLAG="" # Set based on value of $MULTIMON.
|
|
||||||
PORT_TIMEOUT=5 # Default port check timeout.
|
PORT_TIMEOUT=5 # Default port check timeout.
|
||||||
RDP_TIMEOUT=30 # Default RDP connection test timeout.
|
RDP_TIMEOUT=30 # Default RDP connection test timeout.
|
||||||
APP_SCAN_TIMEOUT=60 # Default application scan timeout.
|
APP_SCAN_TIMEOUT=60 # Default application scan timeout.
|
||||||
@ -1047,9 +1046,6 @@ function waCheckRDPAccess() {
|
|||||||
/p:"$RDP_PASS" \
|
/p:"$RDP_PASS" \
|
||||||
/scale:"$RDP_SCALE" \
|
/scale:"$RDP_SCALE" \
|
||||||
+auto-reconnect \
|
+auto-reconnect \
|
||||||
+home-drive \
|
|
||||||
-wallpaper \
|
|
||||||
+dynamic-resolution \
|
|
||||||
/app:program:"C:\Windows\System32\cmd.exe",cmd:"/C type NUL > $TEST_PATH_WIN && tsdiscon" \
|
/app:program:"C:\Windows\System32\cmd.exe",cmd:"/C type NUL > $TEST_PATH_WIN && tsdiscon" \
|
||||||
/v:"$RDP_IP" &>"$FREERDP_LOG" &
|
/v:"$RDP_IP" &>"$FREERDP_LOG" &
|
||||||
|
|
||||||
@ -1177,9 +1173,6 @@ function waFindInstalled() {
|
|||||||
/p:"$RDP_PASS" \
|
/p:"$RDP_PASS" \
|
||||||
/scale:"$RDP_SCALE" \
|
/scale:"$RDP_SCALE" \
|
||||||
+auto-reconnect \
|
+auto-reconnect \
|
||||||
+home-drive \
|
|
||||||
-wallpaper \
|
|
||||||
+dynamic-resolution \
|
|
||||||
/app:program:"C:\Windows\System32\cmd.exe",cmd:"/C "$BATCH_SCRIPT_PATH_WIN"" \
|
/app:program:"C:\Windows\System32\cmd.exe",cmd:"/C "$BATCH_SCRIPT_PATH_WIN"" \
|
||||||
/v:"$RDP_IP" &>"$FREERDP_LOG" &
|
/v:"$RDP_IP" &>"$FREERDP_LOG" &
|
||||||
|
|
||||||
@ -1564,13 +1557,6 @@ function waInstall() {
|
|||||||
# Check for missing dependencies.
|
# Check for missing dependencies.
|
||||||
waCheckInstallDependencies
|
waCheckInstallDependencies
|
||||||
|
|
||||||
# Update $MULTI_FLAG.
|
|
||||||
if [[ $MULTIMON == "true" ]]; then
|
|
||||||
MULTI_FLAG="/multimon"
|
|
||||||
else
|
|
||||||
MULTI_FLAG="+span"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Update $RDP_SCALE.
|
# Update $RDP_SCALE.
|
||||||
waFixScale
|
waFixScale
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user