Search by Tags

Remote Desktop Protocol (Linux)

 

Compare with Revision


Subscribe for this article updates

Overview

Remote Desktop Protocol (RDP) is a protocol developed by Microsoft that provides a desktop sharing system. RDP makes it possible to remotely control & display the screen of one computer (server) from another computer (client) over a network.

FreeRDP is available for inclusion into Toradex V2.3 Linux image builds. Thus far, it has been tested with the Colibri VF, Colibri iMX6 and Apalis iMX6 modules.

Video Demonstration

The following video demonstrates the Colibri VF61 connecting to a Windows PC using FreeRDP on the Toradex Linux image. In this demonstration the Colibri VF61 is used as a client to remotely display and control the Windows PC.

Building the FreeRDP client into the Linux image

Prepare for the Linux image build by setting up the OpenEmbedded build environment as described in the article: OpenEmbedded (core)....

Once the build environment is ready to bitbake the default image, you'll need to create a new "recipe" for FreeRDP.

For this example, we'll place the recipe in the meta-toradex layer. So, create a "freerdp" directory inside meta-toradex/recipes-support:

$ cd oe-core/stuff
$ mkdir meta-toradex/recipes-support/freerdp
$ cd meta-toradex/recipes-support/freerdp

Create the recipe files:

$ touch freerdp_git.bb
$ touch freerdp.inc

Paste the following contents into the 'freerdp_git.bb' file:

# Copyright (C) 2010-2012, O.S. Systems Software Ltda.
# Released under the MIT license

include freerdp.inc

inherit gitpkgv

PV = "1.0.2+gitr${SRCPV}"
PKGV = "${GITPKGVTAG}"

EXTRA_OECMAKE += "-DWITH_MANPAGES=OFF"

SRCREV = "f311acaffb9190567e2b478a98d7cbfaf2709f6b"
SRC_URI = "git://github.com/FreeRDP/FreeRDP.git;branch=stable-1.0"

S = "${WORKDIR}/git"

Paste the following contents into the 'freerdp.inc' file:

# Copyright (C) 2010-2012 O.S. Systems Software Ltda. All Rights Reserved
# Released under the MIT license

DESCRIPTION = "FreeRDP RDP client"
HOMEPAGE = "http://www.freerdp.com"
DEPENDS = "virtual/libx11 openssl libxcursor libxv cups alsa-lib pulseaudio pcsc-lite libxkbfile libxinerama"
SECTION = "x11/network"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"

inherit pkgconfig cmake

EXTRA_OECMAKE += "-DWITH_PULSEAUDIO=ON \
                  -DWITH_PCSC=ON \
                  -DWITH_CUPS=ON \
                  -DWITH_FFMPEG=OFF \
                  -DWITH_CUNIT=OFF \
                  -DWITH_X11=ON \
                  -DWITH_XKBFILE=ON \
                  -DWITH_XINERAMA=ON"

PACKAGES =+ "libfreerdp"

LEAD_SONAME = "libfreerdp.so"
FILES_libfreerdp = "${libdir}/lib*${SOLIBS}"

PACKAGES_DYNAMIC += "^libfreerdp-plugin-.*"

python populate_packages_prepend () {
    freerdp_root = d.expand('${libdir}/freerdp')

    do_split_packages(d, freerdp_root, '^(audin_.*)\.so$',
        output_pattern='libfreerdp-plugin-%s',
        description='FreeRDP plugin %s',
        prepend=True, extra_depends='libfreerdp-plugin-audin')

    do_split_packages(d, freerdp_root, '^(rdpsnd_.*)\.so$',
        output_pattern='libfreerdp-plugin-%s',
        description='FreeRDP plugin %s',
        prepend=True, extra_depends='libfreerdp-plugin-rdpsnd')

    do_split_packages(d, freerdp_root, '^(tsmf_.*)\.so$',
        output_pattern='libfreerdp-plugin-%s',
        description='FreeRDP plugin %s',
        prepend=True, extra_depends='libfreerdp-plugin-tsmf')

    do_split_packages(d, freerdp_root, '^([^-]*)\.so$',
        output_pattern='libfreerdp-plugin-%s',
        description='FreeRDP plugin %s',
        prepend=True, extra_depends='')
}

Return to the oe-core directory to proceed with the image build.

$ cd ../../../..
$ . export 


### Shell environment set up for builds. ###



You can now run 'bitbake '

Common targets are:
    core-image-minimal
    core-image-sato
    meta-toolchain
    adt-installer
    meta-ide-support

You can also run generated qemu images with a command like 'runqemu qemux86'
$ 

Add the recipe to the build by adding the following line to the end of the "local.conf" file:

IMAGE_INSTALL_append = "freerdp"

Bitbake the image to generate a Linux image with FreeRDP included.

$ bitbake -k angstrom-lxde-image

Fianlly, install the image on the module using the update.sh script and boot the system.

Executing the FreeRDP client

Verify that the program "xfreerdp" is installed.

$ xfreerdp --help

FreeRDP - A Free Remote Desktop Protocol Client
See http://freerdp.sourceforge.net for more information

Usage: xfreerdp [options] server:port
    -a: color depth (8, 15, 16, 24 or 32)
    -u: username
    -p: password
    -d: domain
    -k: keyboard layout ID
    --kbd-list: list all keyboard layout IDs
    -s: shell
    -c: directory
    -g: geometry, using format WxH or X%, default is 1024x768
    -t: alternative port number, default is 3389
    -n: hostname
    -o: console audio
    -0: console session
    -f: fullscreen mode
    -D: hide window decorations
    -z: enable bulk compression
    -x: performance flags (m, b or l for modem, broadband or lan)
    -X: embed into another window with a given XID.
    --no-rdp: disable Standard RDP encryption
    --no-tls: disable TLS encryption
    --no-nla: disable network level authentication
    --sec: force protocol security (rdp, tls or nla)
    --plugin: load a virtual channel plugin
    --no-osb: disable off screen bitmaps, default on
    --version: Print out the version and exit
    -h: show this help

Connect the system to a network and try to connect to another system that has the RDP server service enabled. Example command:

$ xfreerdp --no-osb --sec rdp -u "user" -p "password" "192.168.1.10"