From cfad9486608a02222ce8c7be9cad0436c747d023 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20G=C3=B3mez=20Garc=C3=ADa?= Date: Mon, 23 Mar 2015 12:22:45 +0100 Subject: [PATCH] Added multiple monitor support for windows clients & servers --- rdptransport/java/descrdp.jardesc | 2 +- rdptransport/java/src/es/virtualcable/rdp/WinRdpFile.java | 3 +++ rdptransport/java/src/es/virtualcable/rdp/WindowsApplet.java | 1 + server/src/uds/transports/RDP/BaseRDPTransport.py | 1 + server/src/uds/transports/RDP/RDPTransport.py | 4 +++- server/src/uds/transports/RDP/TSRDPTransport.py | 4 +++- server/src/uds/transports/RDP/web.py | 1 + 7 files changed, 13 insertions(+), 3 deletions(-) diff --git a/rdptransport/java/descrdp.jardesc b/rdptransport/java/descrdp.jardesc index 925a9ef5..5e6e4b77 100644 --- a/rdptransport/java/descrdp.jardesc +++ b/rdptransport/java/descrdp.jardesc @@ -14,8 +14,8 @@ - + diff --git a/rdptransport/java/src/es/virtualcable/rdp/WinRdpFile.java b/rdptransport/java/src/es/virtualcable/rdp/WinRdpFile.java index 00691279..87cc400c 100644 --- a/rdptransport/java/src/es/virtualcable/rdp/WinRdpFile.java +++ b/rdptransport/java/src/es/virtualcable/rdp/WinRdpFile.java @@ -24,6 +24,7 @@ public class WinRdpFile { public boolean compression = false; public boolean displayConnectionBar = true; public boolean showWallpaper = false; + public boolean multimon = false; public WinRdpFile(boolean fullScreen, String width, String height, String bpp) { this.width = width; @@ -44,6 +45,7 @@ public class WinRdpFile { String compression = this.compression ? "1" : "0"; String bar = displayConnectionBar ? "1" : "0"; String disableWallpaper = showWallpaper ? "0" : "1"; + String useMultimon = multimon ? "0" : "1"; FileWriter fstream = new FileWriter(fname); PrintWriter out = new PrintWriter(fstream); @@ -51,6 +53,7 @@ public class WinRdpFile { out.println("desktopwidth:i:"+this.width); out.println("desktopheight:i:"+this.height); out.println("session bpp:i:"+this.bpp); + out.println("use multimon:i:"+useMultimon); out.println("auto connect:i:1"); out.println("full address:s:"+this.address); out.println("compression:i:"+compression); diff --git a/rdptransport/java/src/es/virtualcable/rdp/WindowsApplet.java b/rdptransport/java/src/es/virtualcable/rdp/WindowsApplet.java index 6678930f..d1bd31e1 100644 --- a/rdptransport/java/src/es/virtualcable/rdp/WindowsApplet.java +++ b/rdptransport/java/src/es/virtualcable/rdp/WindowsApplet.java @@ -78,6 +78,7 @@ public class WindowsApplet implements OsApplet { rdp.redirectPrinters = params.get("pr").equals("1"); rdp.redirectAudio = params.get("au").equals("1"); rdp.compression = params.get("cr").equals("1"); + rdp.multimon = params.get("mm").equals("1"); if( params.get("sw") != null ) { rdp.showWallpaper = params.get("sw").equals("1"); diff --git a/server/src/uds/transports/RDP/BaseRDPTransport.py b/server/src/uds/transports/RDP/BaseRDPTransport.py index ee42e16a..2ef98f65 100644 --- a/server/src/uds/transports/RDP/BaseRDPTransport.py +++ b/server/src/uds/transports/RDP/BaseRDPTransport.py @@ -65,6 +65,7 @@ class BaseRDPTransport(Transport): allowDrives = gui.CheckBoxField(label=_('Allow Drives'), order=8, tooltip=_('If checked, this transport will allow the use of user drives')) allowSerials = gui.CheckBoxField(label=_('Allow Serials'), order=9, tooltip=_('If checked, this transport will allow the use of user serial ports')) wallpaper = gui.CheckBoxField(label=_('Show wallpaper'), order=10, tooltip=_('If checked, the wallpaper and themes will be shown on machine (better user experience, more bandwidth)')) + multimon = gui.CheckBoxField(label=_('Multiple monitors'), order=10, tooltip=_('If checked, all client monitors will be used for displaying (only works on windows clients)')) def isAvailableFor(self, ip): ''' diff --git a/server/src/uds/transports/RDP/RDPTransport.py b/server/src/uds/transports/RDP/RDPTransport.py index 90db67ed..30ff35c9 100644 --- a/server/src/uds/transports/RDP/RDPTransport.py +++ b/server/src/uds/transports/RDP/RDPTransport.py @@ -66,6 +66,7 @@ class RDPTransport(BaseRDPTransport): allowDrives = BaseRDPTransport.allowDrives allowSerials = BaseRDPTransport.allowSerials wallpaper = BaseRDPTransport.wallpaper + multimon = BaseRDPTransport.multimon def renderForHtml(self, userService, transport, ip, os, user, password): # We use helper to keep this clean @@ -87,7 +88,8 @@ class RDPTransport(BaseRDPTransport): 'drives': self.allowDrives.isTrue(), 'serials': self.allowSerials.isTrue(), 'compression': True, - 'wallpaper': self.wallpaper.isTrue() + 'wallpaper': self.wallpaper.isTrue(), + 'multimon': self.multimon.isTrue() } return generateHtmlForRdp(self, userService.uuid, transport.uuid, os, ip, '3389', username, password, domain, extra) diff --git a/server/src/uds/transports/RDP/TSRDPTransport.py b/server/src/uds/transports/RDP/TSRDPTransport.py index 517f9028..b4176709 100644 --- a/server/src/uds/transports/RDP/TSRDPTransport.py +++ b/server/src/uds/transports/RDP/TSRDPTransport.py @@ -76,6 +76,7 @@ class TSRDPTransport(BaseRDPTransport): allowDrives = BaseRDPTransport.allowDrives allowSerials = BaseRDPTransport.allowSerials wallpaper = BaseRDPTransport.wallpaper + multimon = BaseRDPTransport.multimon def initialize(self, values): if values is not None: @@ -114,7 +115,8 @@ class TSRDPTransport(BaseRDPTransport): 'serials': self.allowSerials.isTrue(), 'tun': tun, 'compression': True, - 'wallpaper': self.wallpaper.isTrue() + 'wallpaper': self.wallpaper.isTrue(), + 'multimon': self.multimon.isTrue() } return generateHtmlForRdp(self, userService.uuid, transport.uuid, os, ip, '-1', username, password, domain, extra) diff --git a/server/src/uds/transports/RDP/web.py b/server/src/uds/transports/RDP/web.py index 262925cb..70ea2775 100644 --- a/server/src/uds/transports/RDP/web.py +++ b/server/src/uds/transports/RDP/web.py @@ -77,6 +77,7 @@ def generateHtmlForRdp(transport, idUserService, idTransport, os, ip, port, user 'cr:' + (extra['compression'] and '1' or '0'), 'is:' + idUserService, 'sw:' + (extra['wallpaper'] and '1' or '0'), + 'mm:' + (extra['multimon'] and '1' or '0'), ] logger.debug('Data: {0}'.format(data))