Connect to Ubuntu 12.04 (Precise Pangolin) via Windows Remote Desktop 61


Want to connect to Ubuntu 12.04 from Windows 7 via Remote Desktop Connection? Well, it’s now easy to do it with xRDP server. In the past, it was almost impossible to do but thanks to xRDP, you can easily use Microsoft RDP to connect to Ubuntu without any configuration.

All you need to do is install the xrdp package, then open Remote Desktop Connection from Windows and connect. That’s it, nothing to configure.

Without wasting anymore of your time, let’s get going.

Objectives:

  • Connect to Ubuntu from Windows via RDP Protocol
  • Enjoy!

To get started, press Ctrl – Alt – T on your keyboard to open Terminal. When it opens, run the commands below to install xRDP package.

sudo apt-get install xrdp

 

xrdp_precise

 

Next, open Windows’ Remote Desktop Connection and type Ubuntu hostname or IP address.

 

xrdp_precise_1

 

When prompted, type your Ubuntu username and password to connect.

 

xrdp_precise_2

 

Enjoy!

 

xrdp_precise_3

 

If you have a problem connecting, run the commands below and restart Ubuntu, then try again.

echo "gnome-session --session=ubuntu-2d" > ~/.xsession

 

Or install gnome session fallback.

sudo apt-get install gnome-session-fallback

Please share if you like it on:



Leave a Comment

Your email address will not be published. Required fields are marked *

61 thoughts on “Connect to Ubuntu 12.04 (Precise Pangolin) via Windows Remote Desktop

  • Dihego

    Hey–

    I have installed this nice software im encoutering a problem where it asks me for the Login Keyrin password. How do I obtain that? im able to manage all folders but it keeps on poping up

    • Sean Brisbane

      Dear Dihego,

      Your login keyring is something that you can safely ignore, but you must have set up a keyring and password at some time in the past. Things like Ubuntu one will try to use the login keyring to get a password to connect to the cloud storage service etc.

      If you want to get rid of the keyring:
      rm /home/{user}/.gnome2/keyrings/*

      Next time you will probably be asked to set a new password.

  • Sean Brisbane

    This is incredible. Now that this works well it makes using Ubuntu in an Entrprise cloud environment that much more attractive.

    I am quite frankly amazed at how well this worked straight away.

  • Jordan

    Thanks for the post!

    I was able to RDP in but had a number of permission issues.

    ex: USB drive would not mount when in an RDP session.

    I found a fix here:
    http://ubuntuforums.org/showthread.php?t=1138337

    The recommended steps are:
    Create a blank .Xauthority file in the home directory of the user you are connecting with (not necessary if file already exists). Be sure to log in as that user (either graphically, or via the terminal), then run:

    touch ~/.Xauthority
    chmod 600 ~/.Xauthority

  • Marcelo Caldas

    Hi all,
    I’m trying this from a Win2008 r2, but I’m getting an error saying:
    “Because of a security error, the client could not connect to the remote computer. Verify that you are logged on to the network, and then try connecting again.”

    does anyone successfully made this work on win2008 r2? or seeing this error and fixed it somehow?

    thanks,
    Marcelo Caldas.

  • Nostromo

    Guys, if you are using ufw then you need to allow incoming port 3389 (GRE) from whatever IPs (or local subnet e.g. 192.168.1.0/24) you want to access.

    My slightly different prob is that if I RDP from more than 1 PC, it creates a 2nd/3rd session/shell which doesn’t see the GUI instances of various running programs. This is, obviously, a bit annoying, as I can see those progs in the process list clearly. Any suggestions on how to re-attach to a previous RDP session…?

  • ttcoding

    Hi,I did all the steps in my computer(ubuntu 12,04) but I still only can see the the desktop background and can’t see menu,can’t open terminal .However,I can use right click.
    Could you tell why?

  • Thorin

    Note that in order for Windows to connect to ubuntu with this solution, you must also have samba installed (sudo apt-get install samba). I imagine most people trying to do this already had smb shares or something that required it anyway, but it happens I was setting this up first thing after installing ubuntu 12.04.

  • Onkel

    1.Open Terminal and install the xrdp

    #sudo apt-get install xrdp

    2.Finding the X11RDP binary..

    #sudo apt-get build-dep xserver-xorg-core
    #sudo apt-get install automake1.7 automake 1.9

    3.Download X11rdp Source :

    #wget http://server1.xrdp.org/xrdp/x11rdp_xorg71.tar.gz

    then,

    #tar xvf x11rdp_xorg71.tar.gz

    4.Make a Directory to Store the Built Binary files.

    #sudo mkdir /opt/X11rdp
    #cd x11rdp_xorg71
    #sudo sh buildx.sh /opt/X11rdp

    5.If everything is done with no errors then enter below command from your current location :

    #cd /opt/X11rdp/bin

    then

    #ls -lh

    6.Now the X11rdp Binary has been Compiled.

    #sudo ln -s /opt/X11rdp/bin/X11rdp /usr/bin/X11rdp

    7.to check your binary runs without crashing

    #/usr/bin/X11rdp :1

    Now you are Ready to take Remote Session of your Ubuntu system via

  • Jaime Cruz

    Not working for me. I can use a linux laptop and remote in with Remmina Remote Desktop just fine, but every time I use a Windows computer with RDP, I get “Failed to connect.” Can’t figure out why. Help!

  • Jaime Cruz

    Just discovered why it wasn’t working, and I’ve got it working now. The firewall was blocking port 3389. Once I opened it up for incoming traffic, it worked perfectly.

  • Anjan

    Thanks a lot. it helped me to connect my raspberry pi remotely! But how to stop the srdp server later? just “pkill xrdp” ?

  • Basti

    Very nice, works perfect with

    echo “gnome-session –session=ubuntu-2d” > ~/.xsession

    Or install gnome session fallback.

    sudo apt-get install gnome-session-fallback

  • Wolfgang

    I get the message ‘Failed to load session “ubuntu-2d”‘.
    I have done the following steps on Ubuntu 13.04:
    1) sudo apt-get install xrdp
    2) echo “gnome-session –session=ubuntu-2d” > ~/.xsession
    3) sudo apt-get install gnome-session-fallback

    Initially I have only done step 1, this gave me the”purple” background only.
    What should I try to “load the session”?

  • John

    I am using Ubuntu 13.04 as well and using a blank .Xauthority with perm set to 0600 I have tried both echo “gnome-session –session=gnome-session-fallback” > ~/.xsession and echo “gnome-session –session=ubuntu-2d” > ~/.xsession to work. I also get failed to load session error messages. Note I have gnome-session-fallback installed as well.

  • Marco

    Hi guys,
    I managed to get it working following similar steps to everyone else:
    1) Installed XRDP:
    sudo apt-get install xrdp
    2) opened up a terminal and entered:
    echo “gnome-session –session=ubuntu-2d” > .xsession
    3) run remote desktop in windows 7.

    Without step 2, I would get a blank screen. With step 2, I can now see icons, and I can use the linux. I couldn’t access the terminal. So I had to create a shortcut on the desktop. Also, the close/minimize/maximize buttons on the top LHS of the window aren’t present. Other than that, works like a charm!

    Does anyone know why the buttons are gone?

  • Toni

    Hello, I have installed and am able to access ubuntu successfully. The display is not working correctly. I can open terminals, web pages, doc etc but can not read menus as the display is screwed up – any suggestions.

  • Aaron

    Hi,

    Works fine with Windows XP SP3 running RDP ver 6.1.7600. Total black screen using Windows 7 running RDP ver 6.2.9200? Just sits minimized in taskbar, seems “connected” but can’t open/maximize etc. Can only kill it. Go figure, any ideas anyone?

    thanks

  • Tecoberg

    Hi guys,

    I installed the Ubuntu 13.10 Desktop x64 and it can’t open the Unit GUI.
    The xrdp works becouse it ask me user/password. After that is show me the ‘X’ cursor and the desktop from X. Nothing more.

    I’ve been using xrdp to access the Ubuntu 12.4.3 Desktop x 64 and it works nice.
    I installed int the follow order:
    - sudo apt-get install xrdp
    - echo “gnome-session –session=ubuntu-2d” > ~/.xsession
    - sudo apt-get install gnome-session-fallback

    I tried to change .xsession to “gnome-session –session=gnome-fallback” but it din’t help.

    best regards,

  • oscar sarte

    Can’t get this to work. Tried using the FQDN of a remote Ubuntu 12.04 web server and even its IP address but my Windows 7 RD still cannot connect. However my Bitvise SSH client has no problem connecting and that’s how I entered all the commands as root. I even restarted the server, reconnected using my Bitvise SSH client, restarted xrdp but still no success with Win7 RD.

    Any other trick I can try?

    Thanks much.

  • Maz 2393

    Many thanks! Considering you wrote this article in 2012 and date now is 2014! It’s still proving to be a place to come to have ones prayers answered! In this case accessing ubuntu from Win 7

    …worked like a dream! Many thanks

  • Brian S

    Worked great, thanks. But, I cannot figure out how to stop my session from timing out. If I start an analyses and walk away, the session times out and logs me off and the analysis dies. How do change the session time out to “never”?

  • ratan

    While logging to Ubuntu machine using Windows’ Remote Desktop Connection, click on the module and change it from “sesman-Xvnc” to “console”. and enter password. it worked for me

  • honoré D'hooge

    Als ik mijn email wil controleren op Ubuntu moet ik steeds inlooggen. Ik heb een paswoord aangemaakt bij het starten van Ubuntu maar dat wordt niet herkend voor het lezen van een bericht.

  • honoré D'hooge

    bij het openen van email-berichtn in Ubuntu moet ik steeds een wachtwoord ingeven. Bij de installatie van Ubuntu op deze XP computer heb ik een paswoord ingegeven maar dat is niet het juiste gewenst paswoord. Hoe geraak ik op de site waar je dat paswoord kan aanmaken?