FreeRDP Client for OS/2 & eComStation

This is the FreeRDP port for OS/2 and eComStation.
FreeRDP is a client for Remote Desktop Protocol (RDP), used in a number of
Microsoft Windows operation systems.


Installation
------------

1. You need RPM/YUM. Type command:

       yum install libc libgcc1 pthread openssl ffmpeg-libs libusb1 libicu (compat-openssl10) 

   or use Arca Noae Package Manager to install these packages.

2. Install FreeRDP from WPI installation package.


Starting FreeRDP Client
-----------------------

Simplest way to run FreeRDP Client.

Drag a template FreeRDP out of the templates folder to the desktop or other
folder and fill minimum required properties: host, user name and domain.

Or you can create program object to launch RDP session.

For example:
  Path and file name: *
  Parameters:         /c freerdp.exe /u:UserName /p:Password /v:HostName
  Working directory:  C:\Programs\freerdp


Freerdp.exe for OS/2 specific features
--------------------------------------

Environment variable FREERDP.
Format: [key1:(...),key2,...keyN]

Where the keys are:
  POSITION:(x,y,width,height)
    Coordinates of the lower left corner and size of the window. You can use
    the keys "P" or "POS" instead of "POSITION".

  MINIMIZE/MIN/M
    Create the main window minimized.

  DIVE or VMAN
    Use DIVE or VMan video output if command line switch /gdi:sw is specified.
    Default is VMAN.

  SHARESND
    Initializes the audio device as shareable.
    Default is acquired exclusively when the device plays the sound.
                            

You can hold SHIFT key while resizing the window to keep aspect ratio of the
remote desktop when command-line switch /smart-sizing (without size) is
specified.

You can drag a files to the FreeRDP main window or to the any remote
application window to copy these files into the remote clipboard.

You may use the keyboard shortcut Ctrl-Alt-Enter to toggle fullscreen mode.
Use Shift-Ctrl-Alt-Enter to keep aspect ratio.

If you already have a running remote application and you want to launch another
on the same server as the same user, enable the "Try to launch on an existing
connection" checkbox on the "RemoteApp" page of the WPS object settings
notebook. In this case, the WPS object, before starting FreeRDP, will try to
contact the already running FreeRDP connected to the same server and send a
start command through it. If no suitable instance is found, FreeRDP will be
executed in the usual way to launch the remote application.

An experimental feature: "*" can be specified as the name of the remote
application to connect to the server without launching any application. Can be
used to connect to existing sessions on the server with previously running
applications.


FreeRDP WPS Object Setup String
-------------------------------

A WPS setup string is a sequence of keyword=value pairs, each separated with a
semicolon. 

List of all keywords for FreeRDP WPS object. 

HOST=string
  Remote host name or IP address, and optionaly port number:
  hostname/IP-address[:port]

USER=string 
  User name.

DOMAIN=string
  Default is empty.
  Domain name.

PASSWORD=string
  Default is empty.
  Password.

PROMPT=YES/Y/ON/1 or NO/N/OFF/0
  Default: YES
  Prompt for the user name, domain and password on object instance start. 

WIDTH=nnn 
  Default: 800
  Remote desktop width (for SIZEMODE=ABSOLUTE).

HEIGHT=nnn 
  Default: 600
  Remote desktop height (for SIZEMODE=ABSOLUTE). 

PROPORTIONALSIZE=nnn 
  Default: 80
  Remote desktop size in percentages (for SIZEMODE=PROPORTIONAL).

SIZEMODE=ABSOLUTE/PROPORTIONAL/FULLSCREEN/WORKAREA
  Default: PROPORTIONAL
  Remote desktop size mode.

DEPTH=8/15/16/24/32
  Default: 16
  Remote desktop color depth (bits per pixel).

GDI=HW/SW_VMAN/SW_DIVE
  Default: HW

  HW      - Use system GPI API.
  SW_VMAN - Software GDI rendering, output with VMAN subsystem.
  SW_DIVE - Software GDI rendering, output with DIVE subsystem.

SCALEMODE=OFF/WIN/SIZE
  Default: OFF

  OFF - Do not scale remote desktop.
  WIN - Scale remote desktop to window size.
  SIZE - scale remote desktop to SCALEWIDTH x SCALEHEIGHT size.

SCALEWIDTH=nnn
  Default: 800

SCALEHEIGHT=nnn
  Default: 600

DYNAMICICON=YES/Y/ON/1 or NO/N/OFF/0
  Default: NO

  Use remote desktop screenshot or remote application icon for the WPS object
  instance icon.

FLOATBAR=item1,item2,item3,... 
  Default: FULLSCREEN,VISIBLE
  List of features separated by comma. 

  FULLSCREEN - Show floatbar in full screen mode.
  WINDOW     - Show floatbar in windowed mode.
  VISIBLE    - Show floatbar after connection and when switching modes.
  AUTOHIDE   - Hide floatbar automatically.

RAPPFILE=string
  Remote application program.

RAPPSWITCHES=string
  Remote application command-line parameters.

RAPPDIR=string
  Shell working directory.

MINIMIZE=YES/Y/ON/1 or NO/N/OFF/0
  Default: OFF
  Create an initial window minimized for the RemoteApp mode.

REDIRHOME=YES/Y/ON/1 or NO/N/OFF/0
  Default: OFF
  Redirect user home as share.

REDIRALLDRV=YES/Y/ON/1 or NO/N/OFF/0
  Default: OFF
  All local drives, including removable drives (dynamically).

REDIRDIR=name1=path1,name2=path2,... 
  Default is empty.
  Local directories redirection. 
  Example:
    dir1=D:\local_directory,dir2="D:\My local\directory"

REDIRCLIENT=string
  Default is empty.
  Client name to display in Windows Explorer and My Computer for redirected
  drives. 

REDIRCLIPBOARD=YES/Y/ON/1 or NO/N/OFF/0
  Default: ON
  Clipboard redirection.

REDIRAUDIO=LOCAL/SERVER/OFF
  Default: LOCAL
  Sound redirection. 

  LOCAL   - Redirect sound from server on local host. 
  REMOTE  - Would leave sound on server. 
  OFF     - All sound Off. 

PERFOMANCE=item1,item2,item3,... 
  Default: THEMES,GRABKBD,MOUSEMOTION
  List of features separated by comma. 

  AERO        - Enable desktop composition.
  THEMES      - Enable themes.
  WALLPAPER   - Enable wallpaper.
  FULLDRAG    - Enable full window drag.
  SMOOTHFNT   - Enable smooth fonts (ClearType).
  MENUANIM    - Enable menu animations.
  GRABKBD     - Grab keyboard (send ALT and ALT-F4 to the server).
  MOUSEMOTION - Send mouse motion.
  GFX         - RDP8 graphics pipeline.

CERTNAME=string
  Default is empty.
  Certificate name (hostname).

PROTOCOL=item1,item2,item3,... 
  List of protocol features separated by comma.

  CERTVERIF      - Certificate verification.
  CERTACCEPT     - Accept certificate on first connect.
  FIPS           - Enable FIPS mode.
  GLYPHCACHE     - Glyph cache.
  BITMAPCACHE    - Bitmap cache.
  ECHOCHAN       - Echo channel.
  HEARTBEAT      - Support heartbeat PDUs.
  MULTITRANSPORT - Support multitransport protocol.
  OLDLICENSE     - Use the old license workflow.
  RELAXORDERCHK  - Do not check if a RDP order was announced during capability
                   exchange, only use when connecting to a buggy server.


History of changes
------------------

2023-08-04  - Fixed a crash on systems without a sound output device.
            - Fixed reconnection when an interrupt signal occurs (Ctrl-C).
            - WPS class: On the Redirection/Sound page of the settings
              notebook the "Audio output" radio button was always set to
              "Local" - fixed.
            - Synchronized with latest sources from GitHub (3.0.0 beta).

2023-04-24  - WPS class: changes to parse the new log line format.
              In recent builds, due to the new format, the window position was
              not saved and the "Diconnect" item of the class pop-up menu was
              not available. Fixed.
            - Synchronized with latest sources from GitHub.

2022-12-16  - Fixed PM freezing during connection.
            - Measures have been taken to clean up artifacts on the screen
              after closing the remote application windows. Perhaps this
              is not enough...
            - Synchronized with latest sources from GitHub.

2022-12-08  - All text conversions are done through the icu library.
            - WPS class: changes for the new syntax of command line switches.
            - Synchronized with latest sources from GitHub.

2022-01-12  - Compiled with urbdrc channel support (redirect USB devices).
              See /usb switch. Requires libusb1.dll. Not tested!
            - Synchronized with latest sources from GitHub.

2021-04-20  - Persistent attempts to open an audio device if it was captured by
              another process at the start of playback.
            - WPS class: When launching remote applications, the command line
              switch +offscreen-cache is specified.
            - Synchronized with latest sources from GitHub.
            
2021-04-14  - Synchronized with latest sources from GitHub.
            - Porting new sections of the winpr library and channels subsystem
              code.
            - Calculation of audio playback delay.

2021-01-28  - Improved stability in audio output.
            - Synchronized with latest sources from GitHub.

2020-11-09  - Fixed errors when selecting an existing session to launch a new
              remote application in the "Try to launch on an existing
              connection" mode.
            - The 'startra' utility for launching remote applications in
              already connected sessions.
            - Synchronized with latest sources from GitHub.

2020-10-28  - An experimental feature: "*" can be specified as the name of the
              remote application to connect to the server without launching any
              application.
            - The ability to launch remote applications in an existing session
              of the remote application. See the "Freerdp.exe for OS/2 specific
              features" chapter of the README.os2 file.
            - WPS class: The "Disconnect" command of the context menu of the
              WPS object. It can be used, for example, to disconnect a session
              without terminating remote applications.
            - Synchronized with latest sources from GitHub.

2020-10-02  - Support for AltGr key on German keyboard. Windows systems use the
              left CTRL scan code together with the right ALT scan code to
              indicate the AltGr key on a German keyboard.
            - Synchronized with latest sources from GitHub.

2020-09-01  - Optimized the creation of the system bitmap in GPI mode.

2020-08-19  - Fixed some confusion with audio buffers.
            - Fixed problem with data transmission to the system (Gpi) for
              building bitmaps.

2020-08-16  - A premature free memory was found. This caused a crash in the
              PMMERGE.DLL module. Removed serialization of function calls
              GpiQueryBitmapHandle, GpiQueryBitmapInfoHeader and
              GpiSetBitmapBits.

2020-08-14  - Serialization of GpiQueryBitmapHandle, GpiQueryBitmapInfoHeader
              and GpiSetBitmapBits functions calls with a mutex semaphore. It
              looks like it helps to get rid of the trap in the PMMERGE.DLL
              module.
            - Synchronized with latest sources from GitHub (ver. 2.2.0).

2020-06-24  - Stable work when an audio device is opened in shareable mode.
            - WPS class: The potential problem of saving the password for the
              gateway has been fixed.
            - WPS class: Separate properties notepad page for sound and "Audio
              device is shared" checkbox.
            - Synchronized with latest sources from GitHub (ver. 2.1.2).

2020-05-13  - Correct display and behavior of minimized to the desktop windows
              of the remote applications.
            - The connection prograss bar window is always on top of other
              windows.
            - Synchronized with latest sources from GitHub.

2020-04-23  - Optimized the operation of windows in remote application mode.
            - WPS class: Options "Glyph cache" and "Bitmap cache" are now
              turned off by default.
            - Synchronized with latest sources from GitHub.

2020-04-15  - New dialogs: request credentials for the server and gateway,
              verification of new and changed certificates, connection progress
              window.
            - The name of the executable file is changed to ofreerdp.exe. Now
              we can have separate * .xqs files for the dynamic library and the
              executable file.
            - WPS class: the credential request dialog and connection progress
              window has been removed since it is implemented in ofreerdp.exe.
            - WPS class: the new page of the properties notebook:
              Connection / Gateway (page 2 of 2).
            - Synchronized with latest sources from GitHub.

2020-03-17  - During the dynamic creation of icons in the remote application
              mode, the program crashed. Fixed (I hope).
            - WPS class: Option "RDP8 graphics pipeline" has been moved to the
              Perfomance page. New option "Do not check RDP order
              (/relax-order-checks)" on the protocol page.

2020-03-13  - Fixed a bug due to which the window of the remote application
              usually collapsed when increasing the size with the mouse.
            - Checking the size of the data provided in platform-dependent code
              to create a bitmap image.

2020-03-11  - The mp3lame library is no longer used for resampling.
            - Added support for some channels that were previously missing.
            - Updated environment in which the project is built. Used GCC 9.2
              compiler. Requires a pthr01.dll (pthread library) file no older
              than (bldlevel):
                Vendor:          bww bitwise works GmbH
                Revision:        0.01.1
                Date/Time:       2020-01-06 11:52:55
                Build Machine:   ECS26154618
                File Version:    0.1
                Description:     pthread implementation for OS/2
            - More precise use of support (compilation options) for SSE2, SSE3,
              SSSE3 and stack alignment for various source files.
            - Synchronized with latest sources from GitHub.

2020-02-11  - WPS class: The window position is correctly calculated for any
              XPager virtual desktop.
            - Sound output changed for compatibility with the current
              platform-independent code.
            - Synchronized with latest sources from GitHub.

2019-11-11  - Optimized processing and display of bitmaps.
            - Synchronized with latest sources from GitHub.

2019-10-23  - Fixed a bug due to which the contents of the RemoteApp windows
              were shifted up one line.
            - Changed RemoteApp window ordering control in the stack.
            - Synchronized with latest sources from GitHub.

2019-10-03  - Support for RDP8 graphics pipeline (see command line options /gfx
              and /gfx-h264). Not tested with remote applications.
              Check if RDP8, RFX and GFX features are activated on the server,
              sometimes they are not:
                gpedit.msc 'Computer Configuration > Administrative Templates >
                Windows Components > Remote Desktop Services >
                Remote Desktop Session Host'.
            - This build does not require a kernel and processor supporting AVX.
            - WPS class: Option "Asynchronous update"on page "Protocol" removed.
              New option "RDP8 graphics pipeline" added.
            - WPS class: Setup string, option PROTOCOL, new items: OLDLICENSE
              and GFX. Unused items removed: ASYNCTRANSPORT and ASYNCUPDATE.
            - Synchronized with latest sources from GitHub.

2019-05-31  - The main window lost icon after switching from full-screen mode.
              Fixed.
            - The main window lost input focus after switching from full-screen
              mode when scrollbars existed. Fixed.
            - Prevent infinite reconnections when a remote application fails to
              start.
            - Removed OS/2-specific feature that allows you to immediately
              disconnect when closing the last window of a remote application.
              This no longer works with the latest source codes. Now the
              connection will be broken by the server, as it usually happens in
              FreeRDP on other platforms.
            - WPS class: The negative coordinates of the window were
              incorrectly maintained. Fixed.
            - Synchronized with latest sources from GitHub.

2019-03-27  - Processing the missed command to hide remote application window.
            - Floatbar released.
            - New item "Full screen" in the system menu of the window.
            - Fixed window size when remote desktop is larger than screen size.
            - A new environment variable FREERDP is used instead of the old
              FREERDP_VIDEO and FREERDP_WINDOW.
            - Reducing the number of extra mouse messages sent to the server.
            - msoffice.cmd: The unique disk name and "minimize" configuration
              variable to minimize initial window.
            - WPS class: New page Graphics 2/2 (Floatbar).
            - WPS class: The progress window is not listed in the window list
              until it is visible.
            - WPS class: Check box "Create an initial window minimized." added
              (page RemoteApp).
            - Synchronized with latest sources from GitHub.

2019-03-12  - The default value of the command line switch "bitmap-cache" was
              changed some time ago from ON to OFF. Corresponding changes are
              made in the WPS class.
              Synchronized with latest sources from GitHub.

2019-01-31  - WPS class properties: Undo/Default buttons on pages Prfomance and
              Protocol now work, the context menu of bookmarks sub-menu
              Redirection is presented in normal form.
              Synchronized with latest sources from GitHub.

2019-01-27  - New checkbox in WPS class properties: "Use the old license
              workflow". This controls the command line switch +old-license.

2019-01-25  - Synchronized with latest sources from GitHub.

2019-01-24  - Fixed file truncation error in common platform-independent code
              (channel "drive").

2019-01-18  - Fixed intermediate buffer overflow when using a-law and mu-law
              audio decoders.

2019-01-17  - Fixed crash when hostname could not be found.
            - Fixed deadlock between two FreeRDP windows when the clipboard is
              used.

2019-01-12  - Synchronized with latest sources from GitHub.
            - Implemented support for audio stream formats a-law and mu-law.
            - Small changes in the audio subsystem.
            - Removed option "Asynchronous transport (experimental)" (which no
              longer exists in FreeRDP) from the WPS class.
            - Removed non significant command line switches for launching
              remote applications from the WPS class.

2018-08-13  - Compiled without annoying message about demo version.

2018-08-07  - Locked audio device does not cause the program to fall any more.

2018-07-24  - Linked to avcode56.dll and avutil54.dll (ffmpeg 2.8.6-2) instead
              avcode58.dll and avutil56.dll.
            - Build from the latest sources from GitHub.
            - Some fixes in the OS/2 ralated audio output code.
            - Sound quality control in the WPS class.

2018-06-26  - sleep() function call in connection procedure to avoid high CPU
              load.
            - Fixed several problems with the RS232 port.

2018-06-01  - Libraries freerdp and winpr are compiled as dynamic libraries
              like for the original project design. These DLLs are marked
              so that they are loaded in "high memory".
            - WPS class and msoffice.cmd are modified to set the current
              directory for freerdp.exe.

2018-05-27  - Using high memory.
            - More optimal use of memory for bitmaps.

2018-05-03  - The memory leak bug (with /gdi:hw) is fixed.
            - The PM will not freeze during reconnection.
            - Updated with latest sources 2.0.0 rc2.

2018-04-12  The first public version for testing. It is compiled for the
            CPU with AVX instruction set (OS/4 kernel is required).


---

http://os2.snc.ru/product-freerdp.html

Donations are most welcome!
PayPal: digi@os2.snc.ru

Andrey Vasilkin, 2018-2022
E-mail: digi@os2.snc.ru
