1
0
mirror of https://github.com/dkmstr/openuds.git synced 2024-12-22 13:34:04 +03:00

Merge remote-tracking branch 'origin/v1.7'

This commit is contained in:
Adolfo Gómez García 2015-03-23 12:24:42 +01:00
commit 38b7ac892e
7 changed files with 13 additions and 3 deletions

View File

@ -14,8 +14,8 @@
</sealing>
</manifest>
<selectedElements exportClassFiles="true" exportJavaFiles="false" exportOutputFolder="false">
<javaElement handleIdentifier="=rdptransport/src&lt;net.sourceforge.jdpapi"/>
<javaElement handleIdentifier="=rdptransport/src&lt;"/>
<javaElement handleIdentifier="=rdptransport/src&lt;net.sourceforge.jdpapi"/>
<javaElement handleIdentifier="=rdptransport/src&lt;es.virtualcable.rdp"/>
</selectedElements>
</jardesc>

View File

@ -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);

View File

@ -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");

View File

@ -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):
'''

View File

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

View File

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

View File

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