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

Fixes on RDP for Linux.

On linux client freerdp 1.1, seems that /home-drive with
/drive:media,/media and /printer makes the client fail. (Works fine with
2.0).
We have replaced so:
1.- Now by default, on linux, redirect drives redirects /media
2.- You can check "redirect home" so /home is also redirected (take
care, /home, not home folder)
3.- If you want /home-drives, you can include it on "custom parameters"
This commit is contained in:
Adolfo Gómez García 2017-12-21 19:04:06 +01:00
parent 6fbf419064
commit bbcc06f503
4 changed files with 24 additions and 12 deletions

View File

@ -42,7 +42,7 @@ from uds.core.util import connection
import logging import logging
import os import os
__updated__ = '2017-12-18' __updated__ = '2017-12-21'
logger = logging.getLogger(__name__) 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') 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') 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') 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)
smartcardString = gui.TextField(label=_('Smartcard string'), order=43, tooltip=_('If smartcard is checked, the smartcard string used with xfreerdp client'), tab='Linux Client') printerString = gui.TextField(label=_('Printer string'), order=43, tooltip=_('If printer is checked, the printer 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') 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): def isAvailableFor(self, userService, ip):
''' '''

View File

@ -39,7 +39,7 @@ from uds.core.util import OsDetector
import six import six
import shlex import shlex
__updated__ = '2017-12-19' __updated__ = '2017-12-21'
class RDPFile(object): class RDPFile(object):
@ -54,6 +54,7 @@ class RDPFile(object):
redirectSerials = False redirectSerials = False
redirectPrinters = False redirectPrinters = False
redirectDrives = False redirectDrives = False
redirectHome = False
redirectSmartcards = False redirectSmartcards = False
redirectAudio = True redirectAudio = True
compression = True compression = True
@ -120,13 +121,19 @@ class RDPFile(object):
if self.redirectDrives is True: if self.redirectDrives is True:
params.append('/drive:media,/media') 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: if self.redirectSerials is True:
params.append('/serial:/dev/ttyS0') params.append('/serial:/dev/ttyS0')
if self.redirectPrinters and self.printerString not in (None, ''): if self.redirectPrinters:
if self.printerString not in (None, ''):
params.append('/printer:{}'.format(self.printerString)) params.append('/printer:{}'.format(self.printerString))
else:
params.append('/printer')
if self.compression: if self.compression:
params.append('/compression:on') params.append('/compression:on')

View File

@ -44,7 +44,7 @@ logger = logging.getLogger(__name__)
READY_CACHE_TIMEOUT = 30 READY_CACHE_TIMEOUT = 30
__updated__ = '2017-12-20' __updated__ = '2017-12-21'
class RDPTransport(BaseRDPTransport): class RDPTransport(BaseRDPTransport):
@ -73,12 +73,13 @@ class RDPTransport(BaseRDPTransport):
aero = BaseRDPTransport.aero aero = BaseRDPTransport.aero
smooth = BaseRDPTransport.smooth smooth = BaseRDPTransport.smooth
credssp = BaseRDPTransport.credssp credssp = BaseRDPTransport.credssp
multimedia = BaseRDPTransport.multimedia
screenSize = BaseRDPTransport.screenSize screenSize = BaseRDPTransport.screenSize
colorDepth = BaseRDPTransport.colorDepth colorDepth = BaseRDPTransport.colorDepth
alsa = BaseRDPTransport.alsa alsa = BaseRDPTransport.alsa
multimedia = BaseRDPTransport.multimedia
redirectHome = BaseRDPTransport.redirectHome
printerString = BaseRDPTransport.printerString printerString = BaseRDPTransport.printerString
smartcardString = BaseRDPTransport.smartcardString smartcardString = BaseRDPTransport.smartcardString
customParameters = BaseRDPTransport.customParameters customParameters = BaseRDPTransport.customParameters
@ -103,6 +104,7 @@ class RDPTransport(BaseRDPTransport):
r.redirectPrinters = self.allowPrinters.isTrue() r.redirectPrinters = self.allowPrinters.isTrue()
r.redirectSmartcards = self.allowSmartcards.isTrue() r.redirectSmartcards = self.allowSmartcards.isTrue()
r.redirectDrives = self.allowDrives.isTrue() r.redirectDrives = self.allowDrives.isTrue()
r.redirectHome = self.redirectHome.isTrue()
r.redirectSerials = self.allowSerials.isTrue() r.redirectSerials = self.allowSerials.isTrue()
r.enableClipboard = self.allowClipboard.isTrue() r.enableClipboard = self.allowClipboard.isTrue()
r.redirectAudio = self.allowAudio.isTrue() r.redirectAudio = self.allowAudio.isTrue()

View File

@ -48,7 +48,7 @@ import logging
import random import random
import string import string
__updated__ = '2017-12-20' __updated__ = '2017-12-21'
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
@ -89,12 +89,13 @@ class TRDPTransport(BaseRDPTransport):
aero = BaseRDPTransport.aero aero = BaseRDPTransport.aero
smooth = BaseRDPTransport.smooth smooth = BaseRDPTransport.smooth
credssp = BaseRDPTransport.credssp credssp = BaseRDPTransport.credssp
multimedia = BaseRDPTransport.multimedia
screenSize = BaseRDPTransport.screenSize screenSize = BaseRDPTransport.screenSize
colorDepth = BaseRDPTransport.colorDepth colorDepth = BaseRDPTransport.colorDepth
alsa = BaseRDPTransport.alsa alsa = BaseRDPTransport.alsa
multimedia = BaseRDPTransport.multimedia
redirectHome = BaseRDPTransport.redirectHome
printerString = BaseRDPTransport.printerString printerString = BaseRDPTransport.printerString
smartcardString = BaseRDPTransport.smartcardString smartcardString = BaseRDPTransport.smartcardString
customParameters = BaseRDPTransport.customParameters customParameters = BaseRDPTransport.customParameters
@ -131,6 +132,7 @@ class TRDPTransport(BaseRDPTransport):
r.redirectPrinters = self.allowPrinters.isTrue() r.redirectPrinters = self.allowPrinters.isTrue()
r.redirectSmartcards = self.allowSmartcards.isTrue() r.redirectSmartcards = self.allowSmartcards.isTrue()
r.redirectDrives = self.allowDrives.isTrue() r.redirectDrives = self.allowDrives.isTrue()
r.redirectHome = self.redirectHome.isTrue()
r.redirectSerials = self.allowSerials.isTrue() r.redirectSerials = self.allowSerials.isTrue()
r.enableClipboard = self.allowClipboard.isTrue() r.enableClipboard = self.allowClipboard.isTrue()
r.redirectAudio = self.allowAudio.isTrue() r.redirectAudio = self.allowAudio.isTrue()