Oct 252013

We have already blogged about a better approach to use FreeRDP (with the DirectFB rendering backend) on the Raspberry Pi (here). We have been promising an easy-to-install package. Now we are deliviring this promise!

(This article will be updated with more information shortly. Please refer to our original article for more hints & information about setting up and running dfreerdp).

This post will give instructions on how to use the pi3g package repository to install the dfreerdp package. This means that if you’re running Raspbian, you don’t have to compile anything and will receive updates to this and other packages automatically.

The quick version

Add our repository (repository.pi3g.com) and install dfreerdp.

You may need to update the package cache (sudo aptitude update) to see the package.

The long version

Add the pi3g repository

Adding the repository is pretty easy and, in principle, works the same as for every other software repository. Create the file /etc/apt/sources.list.d/repository.pi3g.com.list with the following line:

deb http://repository.pi3g.com/debian/ wheezy main

A quick way to do that is this command:

sudo wget -O /etc/apt/sources.list.d/repository.pi3g.com.list http://repository.pi3g.com/sources.list

Then add our public key, which will ensure the packages are not intercepted and altered during download. The command apt-key add <keyfile> will let you do just that. Or in one command:

wget -O - http://repository.pi3g.com/pubkey | sudo apt-key add -

Install the dfreerdp package

First make sure your system is up to date:

sudo aptitude update
sudo aptitude upgrade

(It’s a good idea to run these two commands every now and then so your system doesn’t fall too far behind.)

Then simply install the package dfreerdp like any other package. For example with this command:

aptitude install dfreerdp
  • Pingback: High-performance RDP on the Raspberry Pi » pi3g Blog()

  • AndydnA

    You are talking about “fly” and I don’t understand! :(
    Can you giving me a real value that I can compare, please?!
    Have you tried the standard rdesktop package?!

    Well, I tried dfreerdp from your repo and I had also tried to compile it myself about one week ago.

    I follow all your steps and suggestions! In both case I obtain a standard raspberry RDP session, with some inverted colors and dirty spots. When I go back to the linux desktop it’s are totally dirty and graphically corrupted until the mouse cursor or a dragged window clean up the screen.
    When I use the standard rdesktop client linux package I have a perfect vision (without any errors) and more performance.
    In another words, I can understand witch is the difference with your method that have a lower performance and graphic/visual issue.
    In my personal experience obtain a standard fast RDP session over a LAN with raspberry fail! :(
    All my test are made with Windows 7 64bit on server side. I use only wire, never wireless.

    I used some option to speed up and optimize my experiences (don’t report the various “-r” option) like this:

    rdesktop -d domain -u user -p password -f -b -D -a 15 -E -x l -z -P host:port

    This is the best way that I found for a low, but good performance at 1920×1080 obviously with terrible video and audio performance in multimedia application. For example youtube is not usable as some “grid” program like Excel if you use often vertical scrolling.


    • pi3g

      Did you leave XWindows running during the test? This should be started from the command line, without XWindows. Look at top, what processes use up the most time?

      And, yes, YouTube is not usable – is it with rdesktop?

      We will try rdesktop and compare it’s performance.

      • AndydnA

        If I execute dfreerdp from the command line there are less graphics errors on screen, but the inverted colors persist. Specially I see a limbo brown color with dirty spots behind buttons menu and windows bars.
        The performance, with or without XWindows are the same. I don’t have any task or other that eat my cpu.
        YouTube/video is not usable with rdesktop too.
        I obtain a better performance with raspberry and RDP over a LTSP session, but deliver to a customer an LTSP infrastructure for use raspberry as terminal server client have no sense.

        • Lukas

          The brown color and artifacts afterwards seem to be caused by the –no-desktop option, which can improve performance but isn’t necessary.

          I haven’t been able to connect with rdesktop yet, so I can’t compare the performance, but I’ll try again.

          • AndydnA

            All my servers environment are virtual (I use KVM) so I setup a minimal custom ltsp server near the win7 virtual machine (physical raspberry client use berryterminal) that directly launch an RDP session.
            With this method I doubling 10 times the performances that I had with optimized rdesktop standard session on rasbian or any other distro. In another words, ltsp have mega-fantastic performance (linux use) and RDP over ltsp have also very great performance! 😉
            If anybody find a better way please tell me. My idea is that is not possible to make better with raspberry hardware until great project like wayland will arrive.

          • pi3g

            Can you elaborate a bit, please?

            I understand, that the Raspberry Pi (berryterminal) connects to your main machine using the LTSP protocol, which in turn connects to your KVM machine inside of it with RDP, correct?

            Is it possible to carry sound through the LTSP protocol?

            We will try that, thank you for the input!

          • AndydnA

            You can do that in many way, all depends of your customer network/server infrastructure and your know how.
            In my case all the server are was customized for maximum performance in a complex environment. I like to work without graphic interface and heavy components, but I like have virt-manager into my ssh -x session to manage it.
            The most simply schema is:
            – 1 physical linux PC/server (KVM server)
            – 1 VM Windows into the KVM server above
            – 1 VM LTSP server into the KVM server above
            – n raspberry (berryterminal) clients
            N.B.: You don’t need a complete ltsp server installation with berryterminal, just install ldm-server and few other packages (no tftp, no dhcp, ecc.). My ltsp server installation is less the 350MB, about 120-150 packages only.
            If you use a multi Ethernet physical PC/server you can put inside the above server also a firewall, a samba PDC and much more! 😉
            For a small group of user 5-10-15 is a very one box cool solution, because you can backup the various servers every night (for example) on a NAS or another network storage to do a “few hours&indipend hardware” disaster recovery solution if something bad or nasty append. You will must find any another PC/server, install KVM and then you will simply transfer/copy all virtual data.
            P.S. Yes, you can carry sound, usb, ecc. through ltsp protocol.

          • pi3g

            I have tried berryterminal / LTSP and I am very impressed by the speed for an Ubuntu session. I will try RDP next.

            The only problem is in the keyboard layout. Are you using the default US keyboard layout, or do you have a different one?

            About USB: I do believe that berryterminal does not support that (yet). Did you try it already?

            And RDP: Although LTSP supports direct RDP sessions through xfreerdp, I believe, this possibility is also not realized directly in berryterminal -> you would need to use xfreerdp from your Linux desktop, or set up the session to go into it fullscreen mode as only application. Correct, or am I overlooking something?

            Unfortunately the berryterminal.com homepage has not much documentation on it …

            Most probably we will abandon the dfreerdp route, now. Thank you for pointing us in the right (more performance!) direction.

          • heinz2k

            Just placed some research into making the raspberry a thin client for
            my company. Unfortunatly Berryterminal ist not a real LTSP Client, just
            a client forwarding the LDM session from the LTSP server.

            it is possible making the RPi a full LTSP Client by building a
            LTSP-Client image (ltsp-build-client command ) using the packages
            provided trough the raspbian repositories. After that u just have to
            tell the PI to boot that image via nfs from the Server and ur done.

            I can switch to multiple rdp sessions without the need of the LDM. Just by hitting strg+alt+function keys.

            So far performance is quit good, very responsive even with FullHD
            resolution. Played a bit with rdp options, used the modified Xorg driver
            “fbturbo” and overclocked the pi. Office experience is very good, no
            real stuttering in word or large excel files. Youtube is ok if u resize
            the window. Got sound working and the use local devs in the rdp session.

            Just used rdesktop and will give xfreerdp a try next.

            Im still looking for tweaks of X11, the biggest impact would be a real gpu driver for X11.

          • Probably Wayland / Weston will be a big step in this direction. Thank you for the very useful info!

            dfreerdp performance was better than xfreerdp performance in our opinion but came with it’s own issues (e.g. some key bindings, … )

          • Edgar Mendez

            How execute dfreerdp ?

  • Yoshi

    I’ve read about wayland and the possibility to use wayland directly with the RDP Protocol. Do you have a solution for that?

    Ich habe davon gelesen, dass Wayland das RDP-Protokol direkt integriert hat. Hast du dafür auch eine Anleitung parat oder das ganze schonmal ausprobiert? Auf phoronix.com findet man dazu einiges. Allerdings viel theoretisches, aber keine “Anleitung” an die man sich halten könnte.

    • pi3g

      Hallo Yoshi,

      ich habe auch darüber gelesen. Da Wayland am Raspberry noch recht in den Anfängen steckt (mehr als vielleicht noch auf x86 Desktop Systemen), habe ich diese spezielle Möglichkeit nicht ausprobiert.

      Ich vermute allerdings, dass der Wayland Server hier als RDP Server dienen soll, nicht als Client – korrigiere mich bitte, falls du das anders verstanden hast.


      • Yoshi

        Ja, das leuchtet mir jetzt ein, wenn ich nochmal darüber nachdenke. *ups* Gleich noch eine andere Frage: Hab das Pakt mal installiert, alles soweit eingestellt und kann auch Verbindungen zu Windows XP und Windows 7 Stationen aufbauen. Allerdings geht das nur, solange ich ein lokales Konto der Station verwende. Möchte ich mich mit “DOMAINbenutzername” anmelden, bekomme ich immer einen Fehler, dass die Angaben nicht korrekt wären oder es am Protokol läge. Das ist jetzt nicht kriegsentscheidend, bin nur ein bisschen am rumprobieren, aber für weitere Anmerkungen bin ich sehr dankbar.

        Achja, das Problem mit den braunen Farben und der nach dem Abmelden etwas zerhackstückelten Konsole habe ich zumindest bei Windows XP und Server 2003 R2 auch.

        • pi3g

          Verwendest du 24 bit Farbtiefe?

          Über rdesktop weiß ich nicht, ob es hardwarenah verwendet werden kann. Falls du da etwas erfährst, bitte poste hier.

          Gibt es aus deiner Sicht Vorteile von rdesktop gegenüber freerdp?

          Wie empfindest du die Geschwindigkeit?

          Zwecks DOMAINbenutzername würde ich zuerst mit xfreerdp (und geringerer Performance) probieren, ob du die richtige Kommandozeile verwendest, bzw. ob xfreerdp grundsätzlich solche Verbindungen unterstützt (es würde mich wundern, wenn es das nicht tun würde).

          • Yoshi

            Ich werde in nächster zeit noch ein bisschen damit rumprobieren. Sollte ich neue Erkenntnisse haben, poste ich das einfach hier.

          • pi3g


  • ori0n

    Hi, Your dfreerdp works good. But what about keyboard layout switches? Why are they missing?

    • pi3g

      Hello ori0n,

      As for the keyboard layout, you should set it up using raspi-config.

      We are abandoning this package and can’t provide further support for it, I’m sorry.


  • Pingback: Remote Desktop ไป Windows ด้วย Raspberry Pi ใช้ DirectFB | Raspberry Pi Thailand()

  • Didier Pironet

    Hi there, I have an error with apt-get update… It says basically failed to fetch unable to find expected entry ‘main/binary-armel/packages’

    Could that be your repo is down?

    • Lukas

      Hi, the repository is alive and well. But the error suggests one of your
      local sources.list files is broken. Did you use the exact commands from
      above to add the repository?

      If you don’t mind publishing your list of repositories, the output of ‘cat
      /etc/apt/sources.list /etc/apt/sources.list.d/*’ might shed some light
      on the issue.

      • Didier Pironet

        Hi Lukas, thx for your time on this issue.
        FYI I’m running Deb Jessie.
        Here are the requested info:

        root@rpitc-da946226:~# apt-get update
        Hit http://armv6j.armtc.net sid InRelease
        Hit http://ftp.de.debian.org sid InRelease
        Ign http://repository.pi3g.com wheezy InRelease
        Hit http://repository.pi3g.com wheezy Release.gpg
        Hit http://repository.pi3g.com wheezy Release
        Hit http://armv6j.armtc.net sid/main armel Packages
        Ign http://armv6j.armtc.net sid/main Translation-en_GB
        Ign http://armv6j.armtc.net sid/main Translation-en
        Hit http://ftp.de.debian.org sid/main armel Packages
        Hit http://ftp.de.debian.org sid/contrib armel Packages
        Hit http://ftp.de.debian.org sid/non-free armel Packages
        Hit http://ftp.de.debian.org sid/contrib Translation-en
        Hit http://ftp.de.debian.org sid/main Translation-en
        Hit http://ftp.de.debian.org sid/non-free Translation-en
        W: Failed to fetch http://repository.pi3g.com/debian/dists/wheezy/Release Unable to find expected entry ‘main/binary-armel/Packages’ in Release file (Wrong sources.list entry or malformed file)
        E: Some index files failed to download. They have been ignored, or old ones used instead.

        root@rpitc-da946226:~# wget -O – http://repository.pi3g.com/pubkey | apt-key add –
        –2013-12-30 21:37:39– http://repository.pi3g.com/pubkey
        Connecting to… connected.
        Proxy request sent, awaiting response… 200 OK
        Length: 1723 (1.7K) [text/plain]
        Saving to: âSTDOUTâ
        100%[====================================================================================================>] 1,723 –.-K/s in 0s

        2013-12-30 21:37:39 (14.9 MB/s) – written to stdout [1723/1723]

        root@rpitc-da946226:~# cat /etc/apt/sources.list
        deb http://armv6j.armtc.net/ sid main
        deb http://ftp.de.debian.org/debian sid main contrib non-free

        root@rpitc-da946226:~# cat /etc/apt/sources.list.d/repository.pi3g.com.list
        deb http://repository.pi3g.com/debian/ wheezy main

        • Lukas

          I see the problem: Your using a slightly different architecture (armel vs. armhf) which the repo currently doesn’t support. I guess for now your only options are to compile from source or switch to Raspbian.

          Just out of curiosity, is there a particular reason you’re using the Debian arm port and not Raspbian? The latter will likely give you better performance.

          • Didier Pironet

            Thx Lukas. Any chance you make it available for armel?

            Actually I’ve deployed Raspberry Thin Client project image (http://rpitc.blogspot.be/) which apparently uses armhf architecture…

          • Lukas

            I doubt we’ll support armel any time soon, especially since the Debian people are working on an armhf version. But you can use rpitc with the standard Raspberry kernel. Quote from the website: “just change config.txt (inside BOOT partition) and change
            the line: kernel=kernel.img in kernel=kernel-std.img to use standard
            RaspberryPi Kernel.”

          • Didier Pironet

            Thx for the heads up.
            I’ll change the config file for the standard image and try again.
            I’ll keep you posted.

          • Didier Pironet

            Hi Lukas, I’ve tried that but no luck…
            I’ll keep up working on this issue with the image author and eventually come back to you for updates if you don’t mind.

          • Lukas

            Too bad… I hope it works out and thanks for keeping us updated.

  • Didier Pironet

    Hi Lukas,

    I’ve re-imaged my SD card with Raspbian package (2013-12-20-wheezy-raspbian) and successfully installed dfreerdp package as well.

    Upon starting dfreerdp I constantly have the following error:

    connected to xxx.xxx.xxx.xxx:3389

    ~~~~~~~~~~~~~~~~~~~~~~~~~~| DirectFB 1.2.10 |~~~~~~~~~~~~~~~~~~~~~~~~~~
    (c) 2001-2008 The world wide DirectFB Open Source Community
    (c) 2000-2004 Convergence (integrated media) GmbH
    (*) DirectFB/Core: Single Application Core. (2012-06-01 00:48)
    (*) Direct/Thread: Started ‘Linux Input’ (-1) [INPUT OTHER/OTHER 0/0] …
    (*) DirectFB/Input: Logitech USB-PS/2 Optical Mouse (1) 0.1 (directfb.org)
    (*) Direct/Thread: Started ‘Linux Input’ (-1) [INPUT OTHER/OTHER 0/0] …
    (*) DirectFB/Input: Logitech USB Keyboard (2) 0.1 (directfb.org)
    (*) Direct/Thread: Started ‘Linux Input’ (-1) [INPUT OTHER/OTHER 0/0] …
    (*) DirectFB/Input: Logitech USB Keyboard (3) 0.1 (directfb.org)
    (*) Direct/Thread: Started ‘Keyboard Input’ (-1) [INPUT OTHER/OTHER 0/0] …
    (*) DirectFB/Input: Keyboard 0.9 (directfb.org)
    (*) Direct/Thread: Started ‘PS/2 Input’ (-1) [INPUT OTHER/OTHER 0/0] …
    (*) DirectFB/Input: IMPS/2 Mouse 1.0 (directfb.org)
    (*) DirectFB/Graphics: Generic Software Rasterizer 0.6 (directfb.org)
    (*) DirectFB/Core/WM: Default 0.3 (directfb.org)
    (!) FBDev/Mode: No mode found for 1920×1080!
    (!) DirectFB/DirectFBCreate: Setting desktop resolution to 1920×1080 failed!
    -> Using default resolution.
    (!) DirectFB/DirectFBCreate: Setting desktop format failed!
    -> Using default format.
    (!) DirectFB/DirectFBCreate: Setting desktop buffer mode failed!
    -> No virtual resolution support or not enough memory?
    Falling back to system back buffer.
    (!) FBDev/Mode: No mode found for 1920×1080!
    (!) DirectFB/DirectFBCreate: Setting system memory desktop back buffer failed!
    -> Using front buffer only mode.
    (!) FBDev/Mode: No mode found for 1920×1080!
    (!) DirectFB/core/layers: Could not set primary region config!
    –> Not supported!
    (!) InitLayers: Could not get primary region of layer 0!
    –> Not supported!
    (!) [ 7899: 0.000] –> Caught signal 11 (at 0x20, invalid address) <–

    Do you have any tip for me regarding this issue?


    • pi3g

      You need to set up the Framebuffer modes – please look in our blog for a previous blogpost describing how to do this.

      We are, after all, dissatisfied with the performance compared to X86 and have abandoned this package.


      • Didier Pironet

        I overlooked that and now it works, thx!

        My final goal would be to turn a credit card computer such Raspberry or Cubieboard as a low cost thin client.

        I require VMware Horizon View client as the main client. Eventually View client can launch freerdp for RDP only session.

        Protocol wise, PCoIP is preferable and then RDP. ICA is nice to have.

        I understand that PCoIP is not available on Raspberry, thus I would use xfreerdp (or dfreerdp) for regular RDP sessions.

        What kind of board would you recommend for PCoIP support?


        • If PCoIP generally is available for (ARM) Linux, e.g. for Android (?) have a look at CubieBoard, CuBox (from Solidrun). They are twice as expensive as the Raspberry but have more processor power.

          Another option would be to use a in-the-middle translating client, which would output to the Raspberry Pi with e.g. nomachine nx protocol or something like that.

          Depends on your setup. If you need a partner who would do tests & research, and provide a working solution you can contact us and inquire about an estimate for a specific project.

          • Didier Pironet

            I’ve ordered a Cubietruck and I’ll give a go with http://www.armtc.net/?page_id=21 or eventually create an home-made thin client setup… We’ll see.

            BTW thx for your offer. I might come to you actually. I’ll keep you posted.


  • Edwin Angele


    the rdp-session with dfreerdp works very well, thanks for the useful instruction.

    Now my problem.

    The login on the Windows-Client with dfreerdp only works, when username AND password will send in the command line. Is there also the possibility to get only the rdp login-site for different user?


  • Jason S

    So this “FreeRDP for DirectFB” Raspberry Pi package has been discontinued by the developers due to performance issues??? If so, what alternate Raspberry Pi RDP solution(s) would the community recommend? Thanks.

    • Jason S


  • Mathieu Ferland

    I can’t get the sound plugin to work (–plugin sound –data alsa –)

    I get the following:

    failed to open /usr/lib/arm-linux-gnueabihf/freerdp/rdpsnd.so

    failed to load sound/VirtualChannelEntry

    anyone got that?


  • mat

    I can’t get the sound plugin to work (–plugin sound –data alsa –)

    I get the following:

    failed to open /usr/lib/arm-linux-gnueabihf/freerdp/rdpsnd.so

    failed to load sound/VirtualChannelEntry

    anyone got that?


  • mister

    Hi, while dfreerdp client was seems abandoned by everyone I liked concept of free-of-X terminal client and was able to improve performance of dfreerdp by almost 2.5 times. My pull request is still pending, not sure if they will accept it cuz it goes to 1.0 branch and changes quite massive, anyway here is pull request: https://github.com/FreeRDP/FreeRDP/pull/2129 and here is source code https://github.com/mister-r/FreeRDP/archive/1.0-fixes4rpi.zip

    Also I can tell that best performance achieable when RDP compression and encryption are turned off. First can be done by not specifying -z option, and encryption can be switched off by server’s policy: gpedit.msc -> terminal services/RDP settings -> set encryption level to ‘Low’

  • Lyes Sbahi

    Dfreerdp work fine!!!! If Anyone have problème with the Windows cursor just disable the cursor shadow in the Windows cursor option

  • Tim Fischer

    I just tested this on a raspberry pi 2 and i must say – awesome work!
    The only thing you might want to improve is to use less color depth. The 16 bits create a lot of traffic and encryption. Using the switch -a of the program alone does not do the trick so you might look into this. With 8 bits i can look at slow videos but the colors are not correctly mapped.

    Thank you!


  • snpy222

    Hi , mister.I would like to know how can I use your fix exactly?I have downloaded it and made the cmake preparing, and then applied make and make install with success.But I get only black screen and my pi is freezing.What is the correct procedure to work your fix?
    Please write me as soon as possible.

    • Sorry, we do not support the DirectFB variant anymore.

      We are planning to continue our investigation / release a ready-made image for RDP on the new Raspberry Pi. Probably not using DirectFB, though.

      You might also want to check out a project which contains several different RDP, and RDP-like protocols, packaged into one. I do not remember the name right now unfortunately, but it should come up in searches / on the Raspberry Pi Forums.

      Of course, if you are willing to hire our company as contract workers (~1000 € per diem) we will adjust our plans accordingly.

      All the best!

Optimization WordPress Plugins & Solutions by W3 EDGE