Add multi-monitor configuration option

This commit is contained in:
Fmstrat 2020-11-10 16:07:42 -05:00 committed by Oskar Manhart
parent d917f039c0
commit 08757c4ad1
2 changed files with 13 additions and 7 deletions

View File

@ -55,16 +55,17 @@ RDP_PASS="MyWindowsPassword"
#RDP_DOMAIN="MYDOMAIN" #RDP_DOMAIN="MYDOMAIN"
#RDP_IP="192.168.123.111" #RDP_IP="192.168.123.111"
#RDP_SCALE=100 #RDP_SCALE=100
#MULTIMON="true"
#DEBUG="true" #DEBUG="true"
``` ```
Options: Options:
- When using Option 2 below with a pre-existing non-KVM RDP server, you can use the `RDP_IP` to specify it's location. - When using Option 2 below with a pre-existing non-KVM RDP server, you can use the `RDP_IP` to specify it's location
- If you are running a VM in KVM with NAT enabled, leave `RDP_IP` commented out and WinApps will auto-detect the right local IP. - If you are running a VM in KVM with NAT enabled, leave `RDP_IP` commented out and WinApps will auto-detect the right local IP
- 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 [100|140|160|180] - On high-resolution (UHD) displays, you can set `RDP_SCALE` to the scale you would like [100|140|160|180]
- For multi-monitor setups, you can try enabling `MULTIMON`, however if you get a black screen (FreeRDP bug) you will need to revert back
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`
### Option 1 - Running KVM ### Option 1 - Running KVM
You can refer to the [KVM](https://www.linux-kvm.org) documentation for specifics, but the first thing you need to do is set up a Virtual Machine running Windows 10 Professional (or any version that supports RDP). Fist, clone WinApps and install KVM and FreeRDP: You can refer to the [KVM](https://www.linux-kvm.org) documentation for specifics, but the first thing you need to do is set up a Virtual Machine running Windows 10 Professional (or any version that supports RDP). Fist, clone WinApps and install KVM and FreeRDP:

View File

@ -67,6 +67,11 @@ dprint "1:${1}"
dprint "2:${2}" dprint "2:${2}"
dprint "@:${@}" dprint "@:${@}"
MULTI_FLAG="span"
if [ "${MULTIMON}" = "true" ]; then
MULTI_FLAG="multimon"
fi
if [ "${1}" = "windows" ]; then if [ "${1}" = "windows" ]; then
xfreerdp /d:"${RDP_DOMAIN}" /u:"${RDP_USER}" /p:"${RDP_PASS}" /v:${RDP_IP} /scale:${RDP_SCALE} /dynamic-resolution +auto-reconnect +home-drive /wm-class:"Microsoft Windows" 1> /dev/null 2>&1 & xfreerdp /d:"${RDP_DOMAIN}" /u:"${RDP_USER}" /p:"${RDP_PASS}" /v:${RDP_IP} /scale:${RDP_SCALE} /dynamic-resolution +auto-reconnect +home-drive /wm-class:"Microsoft Windows" 1> /dev/null 2>&1 &
elif [ "${1}" != "install" ]; then elif [ "${1}" != "install" ]; then
@ -76,9 +81,9 @@ elif [ "${1}" != "install" ]; then
dprint "HOME:${HOME}" dprint "HOME:${HOME}"
FILE=$(echo "${2}" | sed 's|'"${HOME}"'|\\\\tsclient\\home|;s|/|\\|g;s|\\|\\\\|g') FILE=$(echo "${2}" | sed 's|'"${HOME}"'|\\\\tsclient\\home|;s|/|\\|g;s|\\|\\\\|g')
dprint "FILE:${HOME}" dprint "FILE:${HOME}"
xfreerdp /d:"${RDP_DOMAIN}" /u:"${RDP_USER}" /p:"${RDP_PASS}" /v:${RDP_IP} +auto-reconnect +home-drive -wallpaper /scale:${RDP_SCALE} /dynamic-resolution /span /wm-class:"${FULL_NAME}" /app:"${WIN_EXECUTABLE}" /app-icon:"${DIR}/../apps/${1}/icon.svg" /app-cmd:"\"${FILE}\"" 1> /dev/null 2>&1 & xfreerdp /d:"${RDP_DOMAIN}" /u:"${RDP_USER}" /p:"${RDP_PASS}" /v:${RDP_IP} +auto-reconnect +home-drive -wallpaper /scale:${RDP_SCALE} /dynamic-resolution /${MULTI_FLAG} /wm-class:"${FULL_NAME}" /app:"${WIN_EXECUTABLE}" /app-icon:"${DIR}/../apps/${1}/icon.svg" /app-cmd:"\"${FILE}\"" 1> /dev/null 2>&1 &
else else
xfreerdp /d:"${RDP_DOMAIN}" /u:"${RDP_USER}" /p:"${RDP_PASS}" /v:${RDP_IP} +auto-reconnect +home-drive -wallpaper /scale:${RDP_SCALE} /dynamic-resolution /span /wm-class:"${FULL_NAME}" /app:"${WIN_EXECUTABLE}" /app-icon:"${DIR}/../apps/${1}/icon.svg" 1> /dev/null 2>&1 & xfreerdp /d:"${RDP_DOMAIN}" /u:"${RDP_USER}" /p:"${RDP_PASS}" /v:${RDP_IP} +auto-reconnect +home-drive -wallpaper /scale:${RDP_SCALE} /dynamic-resolution /${MULTI_FLAG} /wm-class:"${FULL_NAME}" /app:"${WIN_EXECUTABLE}" /app-icon:"${DIR}/../apps/${1}/icon.svg" #1> /dev/null 2>&1 &
fi fi
fi fi