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:
Enhance your coding experience with this split keyboard that offers up to 9" of separation.
- 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
Next, open Windows’ Remote Desktop Connection and type Ubuntu hostname or IP address.
When prompted, type your Ubuntu username and password to connect.
Enjoy!
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
Invest in some screen real estate with a new big screen, backlit monitor availabe in five different sizes and price points.
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
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.
Your help is so greatly appreciated! Thank you!
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.
It is not accepting my login and password?
I can connect, but I dont see the menu. All I see is the desktop background. Also, I cant open up a terminal.
Same as above.. All I see is the background. No menu cant open terminal.
Same here … pity cause this would be awesome
got it working by selecting console …
Can you explain it sir ?
what console did you use?
i got the same problem but after i used the cammands as writer wrote down
sudo apt-get install gnome-session-fallback
echo “gnome-session –session=ubuntu-2d” > ~/.xsession
and it started working
Still doesnt work
try this
sudo apt-get install gnome-session-fallback
echo “gnome-session –session=gnome-fallback” > ~/.xsession
sudo /etc/init.d/xrdp restart
Thank You. It Works :)
most useful linux tip i’ve ever read (and the easiest to implement)
Great! Thanks Dude
Super! Thanks Dude
Hello,
Is it for 12,04? Because i followed above all steps but no luck. Here am using 10.04.
Thanks & Regards,
Pavan
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
just tried it out today on a windows hyper-V set up worked without any issues
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.
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…?
Incredible… Easy steps to access ubuntu GUI.
Thanks for ur help
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?
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.
Thanks for the post, much appreciated from a Linux noob!
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
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!
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.
It worked for me. great help
Thanks a lot. it helped me to connect my raspberry pi remotely! But how to stop the srdp server later? just “pkill xrdp” ?
Very nice, works perfect with
echo “gnome-session –session=ubuntu-2d” > ~/.xsession
Or install gnome session fallback.
sudo apt-get install gnome-session-fallback
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”?
@Wolfgang
echo “gnome-session –session=gnome-session-fallback” > ~/.xsession
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.
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?
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.
The [echo “gnome-session –session=ubuntu-2d” > ~/.xsession] worked a treat! I could not RD into Ubuntu and so glad I found your page – Thanks!
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
This website works for all versions of ubuntu but must be run as root
http://askubuntu.com/questions/226329/run-rdp-server-on-ubuntu-12-10
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,
Hi Tecoberg, I have been searching for a solution as well. Today I found this website which solved my problems.
http://c-nergy.be/blog/?p=3518
Good luck!
Can you use this to go from Ubuntu into a Windows computer?
Can it work on Ubuntu 13? Cause I tried it and it didn’t work.
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.
thank you …
Can we change the listening port from 3389 to something else?
Thanks.
all I get is a screen with black and white dots :X
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
Super helpful Geek. Works perfectly and now gives me access to Ubuntu anywhere in the domain. Linux is sweet!
thanks, worked like a charm
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”?
Worked like a charm – thank you very much :)
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
http://prntscr.com/394hl3
this error show
please help us
I got the same issue.
Can connect, but all I get is a screen full of tiny black and white dots. No desktop — no nothing.
I get the black and white dots also when rdp. did you find a fix ?
I got the same problem.
failed to load session ubuntu
failed to load session
thx just what i was looking for to install on my server !
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.
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?
Hi,
I have a ubuntu machine running 12.04. The machine only has vga-out. My monitor only has digital ports. So I am unable connect my ubuntu machine to a monitor. I have it on plugged into my wifi router.
I used my windows 8.1 laptop (Remote desktop connection) to successfully connect to my Ubuntu machine using sesman-xVNC. The login is successful, but I land on the desktop screen with no icons/launcher, etc…
Pressing ctrl-alt-T does nothing, neither does right-clicking. I can’t launch a Terminal. I would love to try some of the commands suggested above, but am unable until I can get Terminal launched.
Has anyone experienced this and if so, how did you solve the problem?
Thanks,
Jeremy
Hi Jeremy S,
Try remote connect via ssh (use ‘putty.exe’) to have a remote prompt or buy a vga-to-digit convertor cable.. (dx.com)
Great guide! Really helpful.
I have one small problem though. I connect remotely, put the username and password for the Ubuntu and it connects but all is displays is the background, the icons aren’t there so there is nothing. No matter how long I wait, no icons show up. Anything I could do to fix this?
Hi,
I connect fine, but I only get the blank desktop background and not the icons along the left side.
Sometimes I get some error about Precise being out of development but I am not sure what to do about that.
Not sure if this how-to still works with the latest Ubuntu. Done all that and all what i see is a grey bg.