diff --git a/server/src/uds/transports/RDP/BaseRDPTransport.py b/server/src/uds/transports/RDP/BaseRDPTransport.py index c938996fa..d6df74764 100644 --- a/server/src/uds/transports/RDP/BaseRDPTransport.py +++ b/server/src/uds/transports/RDP/BaseRDPTransport.py @@ -42,7 +42,7 @@ from uds.core.util import connection import logging import os -__updated__ = '2017-12-18' +__updated__ = '2017-12-21' logger = logging.getLogger(__name__) @@ -104,9 +104,10 @@ class BaseRDPTransport(Transport): multimedia = gui.CheckBoxField(label=_('Multimedia sync'), order=40, tooltip=_('If checked. Linux client will use multimedia parameter for xfreerdp'), tab='Linux Client') alsa = gui.CheckBoxField(label=_('Use Alsa'), order=41, tooltip=_('If checked, Linux client will try to use ALSA, otherwise Pulse will be used'), tab='Linux Client') - printerString = gui.TextField(label=_('Printer string'), order=42, tooltip=_('If printer is checked, the printer string used with xfreerdp client'), tab='Linux Client') - smartcardString = gui.TextField(label=_('Smartcard string'), order=43, tooltip=_('If smartcard is checked, the smartcard string used with xfreerdp client'), tab='Linux Client') - customParameters = gui.TextField(label=_('Custom parameters'), order=44, tooltip=_('If not empty, extra parameter to include for Linux Client (for example /usb:id,dev:054c:0268, or aything compatible with your xfreerdp client)'), tab='Linux Client') + redirectHome = gui.CheckBoxField(label=_('Redirect home folder'), order=42, tooltip=_('If checked, Linux client will try to redirect /home local folder'), tab='Linux Client', defvalue=gui.FALSE) + printerString = gui.TextField(label=_('Printer string'), order=43, tooltip=_('If printer is checked, the printer string used with xfreerdp client'), tab='Linux Client') + smartcardString = gui.TextField(label=_('Smartcard string'), order=44, tooltip=_('If smartcard is checked, the smartcard string used with xfreerdp client'), tab='Linux Client') + customParameters = gui.TextField(label=_('Custom parameters'), order=45, tooltip=_('If not empty, extra parameter to include for Linux Client (for example /usb:id,dev:054c:0268, or aything compatible with your xfreerdp client)'), tab='Linux Client') def isAvailableFor(self, userService, ip): ''' diff --git a/server/src/uds/transports/RDP/RDPFile.py b/server/src/uds/transports/RDP/RDPFile.py index a3053d31b..335529919 100644 --- a/server/src/uds/transports/RDP/RDPFile.py +++ b/server/src/uds/transports/RDP/RDPFile.py @@ -39,7 +39,7 @@ from uds.core.util import OsDetector import six import shlex -__updated__ = '2017-12-19' +__updated__ = '2017-12-21' class RDPFile(object): @@ -54,6 +54,7 @@ class RDPFile(object): redirectSerials = False redirectPrinters = False redirectDrives = False + redirectHome = False redirectSmartcards = False redirectAudio = True compression = True @@ -120,13 +121,19 @@ class RDPFile(object): if self.redirectDrives is True: params.append('/drive:media,/media') - params.append('/home-drive') + # params.append('/home-drive') + + if self.redirectHome is True: + params.append('/drive:home,/home') if self.redirectSerials is True: params.append('/serial:/dev/ttyS0') - if self.redirectPrinters and self.printerString not in (None, ''): - params.append('/printer:{}'.format(self.printerString)) + if self.redirectPrinters: + if self.printerString not in (None, ''): + params.append('/printer:{}'.format(self.printerString)) + else: + params.append('/printer') if self.compression: params.append('/compression:on') diff --git a/server/src/uds/transports/RDP/RDPTransport.py b/server/src/uds/transports/RDP/RDPTransport.py index 178f4754f..cd9bf55a6 100644 --- a/server/src/uds/transports/RDP/RDPTransport.py +++ b/server/src/uds/transports/RDP/RDPTransport.py @@ -44,7 +44,7 @@ logger = logging.getLogger(__name__) READY_CACHE_TIMEOUT = 30 -__updated__ = '2017-12-20' +__updated__ = '2017-12-21' class RDPTransport(BaseRDPTransport): @@ -73,12 +73,13 @@ class RDPTransport(BaseRDPTransport): aero = BaseRDPTransport.aero smooth = BaseRDPTransport.smooth credssp = BaseRDPTransport.credssp - multimedia = BaseRDPTransport.multimedia screenSize = BaseRDPTransport.screenSize colorDepth = BaseRDPTransport.colorDepth alsa = BaseRDPTransport.alsa + multimedia = BaseRDPTransport.multimedia + redirectHome = BaseRDPTransport.redirectHome printerString = BaseRDPTransport.printerString smartcardString = BaseRDPTransport.smartcardString customParameters = BaseRDPTransport.customParameters @@ -103,6 +104,7 @@ class RDPTransport(BaseRDPTransport): r.redirectPrinters = self.allowPrinters.isTrue() r.redirectSmartcards = self.allowSmartcards.isTrue() r.redirectDrives = self.allowDrives.isTrue() + r.redirectHome = self.redirectHome.isTrue() r.redirectSerials = self.allowSerials.isTrue() r.enableClipboard = self.allowClipboard.isTrue() r.redirectAudio = self.allowAudio.isTrue() diff --git a/server/src/uds/transports/RDP/TRDPTransport.py b/server/src/uds/transports/RDP/TRDPTransport.py index 9bee4288d..752d36c37 100644 --- a/server/src/uds/transports/RDP/TRDPTransport.py +++ b/server/src/uds/transports/RDP/TRDPTransport.py @@ -48,7 +48,7 @@ import logging import random import string -__updated__ = '2017-12-20' +__updated__ = '2017-12-21' logger = logging.getLogger(__name__) @@ -89,12 +89,13 @@ class TRDPTransport(BaseRDPTransport): aero = BaseRDPTransport.aero smooth = BaseRDPTransport.smooth credssp = BaseRDPTransport.credssp - multimedia = BaseRDPTransport.multimedia screenSize = BaseRDPTransport.screenSize colorDepth = BaseRDPTransport.colorDepth alsa = BaseRDPTransport.alsa + multimedia = BaseRDPTransport.multimedia + redirectHome = BaseRDPTransport.redirectHome printerString = BaseRDPTransport.printerString smartcardString = BaseRDPTransport.smartcardString customParameters = BaseRDPTransport.customParameters @@ -131,6 +132,7 @@ class TRDPTransport(BaseRDPTransport): r.redirectPrinters = self.allowPrinters.isTrue() r.redirectSmartcards = self.allowSmartcards.isTrue() r.redirectDrives = self.allowDrives.isTrue() + r.redirectHome = self.redirectHome.isTrue() r.redirectSerials = self.allowSerials.isTrue() r.enableClipboard = self.allowClipboard.isTrue() r.redirectAudio = self.allowAudio.isTrue()