To remotely control my Windows machines, I always prefer to use RDP (Remote Desktop Protocol) as it performs much nicer than VNC (Virtual Network Computing). VNC has this streak of “JPEG” quality and slow behavior, whereas RDP is fast and crystal clear.
RDP is however a proprietary protocol from Microsoft. So how can we use RDP to control our Ubuntu box remotely?
This is where xRDP comes in play, an open source remote desktop protocol (RDP) server. It actually runs VNC protocol over RDP as far as I understand, yet if behaves much better than VNC by itself (possibly because of the used desktop manager). Since Ubuntu 12.10 (if I’m not mistaken), xRDP doesn’t seem to work with the Ubuntu desktop anymore … unless you use an alternative desktop manager. This seems related to 3D acceleration and nobody seems to care (since 2011, according to bug reports).
Note : if you really need Copy/Paste functionality between the two machines, then please use Ubuntu’s default installed “Desktop Sharing” instead (MacOS X users read this forum post).
Since the current desktop manager of Ubuntu (Unity which runs on Gnome) no longer seems to work with xRDP, an alternative desktop manager needs to be installed.
I tried OpenBox, but wasn’t very impressed by the amount of work needed to get a reasonable desktop.
We will use another desktop manager that has been around for quite a long time is XFCE, which is lightweight and fast.
Note : A light weight desktop manager helps making a remote desktop connection much more enjoyable.
Ad Blocking Detected
Please consider disabling your ad blocker for our website.
We rely on these ads to be able to run our website.
You can of course support us in other ways (see Support Us on the left).
Installing xRDP and XFCE
Installing xRDP and XFCE is pretty easy, once you know what to do …
Just make sure you have an Internet connection before you start.
Using a newer xRDP for newer Linux distro’s …
This article is already pretty dated (2014!), but for those wanting to install xRDP under a newer Ubuntu version (eg. v16.x), consider using a newer xRDP version like so (thanks EZ for the tip!):
sudo add-apt-repository ppa:hermlnx/xrdp
sudo apt-get update
sudo apt-get install xrdp
Step 1 – Install xRDP
We will use sudo and apt-get to update your system and install xRDP. Keep in mind that sudo will ask for your admin password.
sudo apt-get update
sudo apt-get install xrdp
Step 2 – Install XFCE4
Again we will use sudo and apt-get:
sudo apt-get install xfce4
Optional, recommended by Neal, install XFCE4 terminal and 2 icons sets:
# Install XFCE4 terminal (way better than xterm)
sudo apt-get install xfce4-terminal
# Install icon sets
sudo apt-get install gnome-icon-theme-full tango-icon-theme
Step 3 – Configure xRDP
In this step we modify 2 files to make sure xRDP uses xfce4.
First we need to create or edit our
.xsession file in our home directory.
We can either use nano or simply redirect an echo statement (easier):
echo xfce4-session >~/.xsession
The second file we need to edit is the startup file for xRDP, so it will start xfce4.
The content should look like this (pay attention to the last line):
if [ -r /etc/default/locale ]; then
export LANG LANGUAGE
Step 4 – Restart xRDP
To make all these changes effective, restart xRDP as such:
sudo service xrdp restart
Testing your xRDP connection
On the computer that will remotely control your Ubuntu machine, start you RDP client.
Windows comes standard with a Remote Desktop client (mstsc.exe – you can start it from a command prompt, or find the shortcut to Remote Desktop under Accessories).
For a Mac, Microsoft actually has a Remote Desktop Client which can be found in the Apple App Store, or you can use Cord (free).
Whichever client you use, most work with either the computer network name or IP address of your Ubuntu machine.
To find the IP address on your Ubuntu box, type:
(note: this is a capital “i”)
Depending on your RDP client capabilities and settings (for example: Microsoft RDP Client allows automatic login), you might or might not see the login screen.
Here we enter our Ubuntu username and password and click “OK”, after which briefly a window will show with the login process and you’ll have access to your Ubuntu machine, even though the desktop looks different. One downside I’ve discovered so far is that the clipboard is NOT being synchronized … so Copy and Paste between machines does not work properly.
xRDP – Login screen
xRDP – Your Ubuntu xfce4 desktop
There are 318 comments. You can read them below.
You can post your own comments by using the form below, or reply to existing comments by using the "Reply" button.
Great Guide man very detailed as usual. this kind of stuff is what keeps making come back to your site. BTW im guessing you arr from NED if so Congrats man one of the greatest soccer teams. Love how they play. anyway by using this guide i was able to understand the whole concept of remote session vs vnc. I’ve been using vnc for a while but now that is about to change thanks to this awesome guide. ok just a lil note once i tried this i started looking for something a lil bit more native that a RDP port on ubuntu and i came accross this awesome project called X2GO great project should check it out man. Again thanks for all this great information you post on your site. keep up the good work
Yeah, I’m from the Netherlands, although I have been living in the USA for almost 11 years now …
I have briefly looked at X2GO, but lost interest when I noticed the confusing setup/install – I’ll give it another try for sure!
i have a Ubuntu 14.04 desktop installed..
but when i tired to connect RDP into Ubuntu 14.04 machine from Win7 laptop, the connections established and then disconnected within a minute.
if any suggestions would be grate :)
Are you connecting over WiFi?
If I’d have my gear nearby (I’m currently moving from the U.S. to Europe – so most of my stuff is in a big sea-container), I’d be able to help you. But maybe there is a log file you can find stating why the connection. Sorry that I can’t point you straight to the log files, but maybe this post at SourceForge might help you.
I had the same problem without xfce. After adding .xsession on home directory with file content “xfce4-session”, problem solved.
Thanks Sam for posting a solution!
Excellent solution, thank you! I’d already installed xfce4 but xrdp was still displaying wrongly, the change that worked was to add ‘startxfce4’ to startwm.sh. This is the first site I’ve come across that displays the working content of startwm.
I always appreciate positive feedback and tricks
Thanks Hans, this is really great! Everything’s working fine. A small remark: there’s a typo error in the filename of the startup file for xRDP: you missed the ‘t’ in startwm.sh, but that’s peanuts.
I corrected it right away!
thank you very much clear, easy and so usefull
thank you very much for posting. Solved my problem!
Thank you Hector! Always appreciate it when readers take the time and effort to leave positive feedback!
unable to start xrdp application in ubuntu14.04
Not sure what to say to that …?
Thanks for all relevant details in easy steps …..!!!
It works for me :)
Thank you for taking the effort to leave a positive feedback – very much appreciated!
when i try to open a programe it opens in my old desktop not the one that is showing on the connected computer
any idea how to fix this
Could it be that you missed some steps in step 3? (config)
its a gnome application only there is no way to vnc into gnome is there
As far as I understand, this all depends on your windows-manager,… you’ll need a Gnome compatible one.
Text I found at RealVNC (source):
How do I get Gnome/KDE as my window manager [for VNC]?
VNC will automatically detect your default window manager, and load this when you connect to your Xvnc session. If for some reason this is not the case, or you’d like to use a different window manager other than the default, you’ll need to edit
This will not affect existing VNC desktops, only new ones.
The line to change reads:
The correct replacement depends upon the window manager you want to run and is not something we can provide a comprehensive solution for.
However, for most versions of Gnome, use:
For most versions of KDE, use:
Thanks for the tut. only one small detail you have to use Sudo again for editing the config file. Otherwise you cant save the file. This tut works for Peppermint and other ubuntu based os too.
dank je nogmaals voor de tut..heb een tijd gezocht voor een goed oplossing! :)
Thanks Mortholt for the tip and the positive feedback!
Thanks for the guidelines. One more questions though: how do I connect from a Windows client to the session I already have running on the Linux desktop? I have found many posts about reconnecting to the same remote session, however, that is still different from the desktop session I leave behind. How do I tap into that one? I need an experience similar to the remote desktop behavior between two Windows machines. I need to connect to the Linux box (which is Xubuntu 14.04) and land on the session I left behind when working directly at the desk.
I searched for this a lot, I read this post twice, still have the question ..
If the info is here and I missed it (twice) I promise 10 push-ups for each reply that rubs my nose in the explanation
Haha, no need for push-ups!
It sounds like you would want to use VNC for this. As far as I recall, VNC uses the existing desktop and each time you connect you’ll see the desktop you left behind. I’m not a big VNC fan, but it does work. Did you give that a try?
(push ups for me if this only works that way when VNC server is used under Windows )
Yes, I am trying to achieve what you described but using XRDP. I couldn’t do it so far, nor anybody told me that it is just not possible. I’d take that as progress too, at least I abandon a hopeless path. I am playing with VNC. Not quite my favorite, a bit heavy weight. I couldn’t get it to work all the way, still have to figure out some security details between the client and the server. For a while the two were not seeing each other, got past that part, now I am trying to get them to talk to each other and apparently the server has a bit of an attitude
Will continue to push ahead with VNC while keeping an eye out for XRDP advice, be it “forget it, it is known it’s not possible”.
Thanks again !!
I see we share the same sympathies when it comes to VNC. Wish someone would implement a generic interface, not bitmap driven, for Windows, Mac, Linux, etc. But I guess it’s more complicated than just wishing ….
I understand what you’d like to accomplish, but for that the session has to remain active somehow. My experience with Linux is somewhat limited, might a limitation for security reasons, etc. Did you check this topic: HOWTO: Set up VNC Server with resumable sessions?
xRDP question: Anyone know, by default, the max number of unique concurrent session using xRDP?
I’m finding this question more elusive than expected. Thanks -Bob
Feel free to delete. Finally found the answer (MaxSessions=x in sesman.ini).
Good info none the less … I found this at the xRDP Wiki:
The maximum number of concurrently running RDP sessions is by default limited to 10 and can be changed using the UCR variable xrdp/sessions/max.
I do all the steps in the guide but i’m still not able to connect to my Ubuntu through Win7 using -mstsc.exe- (both machines it the same lan).
Btw, what if i want to connect from outside the local network?
Thanks in advance!
This is my startwm.sh file:
unfortunately, I’m traveling right now and do not have access to my computers … so trying a few things is difficult.
If you want to work from outside of your LAN (ie. WAN or Internet), then you’d need to map the used ports in your modem/router. I unfortunately do not have the info on me which port(s) this would be …
It needs to be like this:
if [ -r /etc/default/locale ]; then
export LANG LANGUAGE
Followed ur steps, only thing I had to do was reboot server, rdp window would connect, but blank screen, after reboot, was good to go. thank you
Thanks Mike for leaving a positive feedback! Glad to hear the article was helpful for you!
am salman i need some clarification about windows remote desktop and xRDP function.And xRDP how its working based on ip address or system name.
a few things depend on your setup, but IP address will always work, and machine/system name will work if the name gets resolved by your PC or router properly.
Its working fine Normaly we are entering on IP base e:g(192.168.1.1.).But we are try to entering on that system name used e:g sys001
would u plz explain how to enter on name useing in xrdpa…
Your router has to resolve the name properly, which is done differently for each router.
I use DD-WRT on my router, which offers DNSMasq. Or in other words: in my router I can make an “alias” that translates to the desired IP address. You can even assign multiple “names” to one IP address (ideal when you’re running a local webserver but you have several virtual hosts on one server).
Unfortunately most run of the mill routers do not offer this feature … to work around that issue, I ran DSNMasq on one of my servers for a while (although a little more cumbersome to do), and set the default DNS server to that server.
Check your router and see if it has this option.
An alternative is using the “hosts” file on your machine (under Linux under “/etc”) which maps an IP address to a name.
Another alternative, is when your router automatically assigns an IP address automatically to the machine, in this case the internal DNS of the router should know how to translate this as well.
When using a fixed IP address, most routers do not know how to properly translate a name to the correct IP address,… unfortunately.
Hope this helps a little bit …
Thank you for this nice guide :)
Thanks Alex for leaving a positive feedback – it’s much appreciated!
Worked first try… Best I’ve ever seen RDP work on Ubuntu!!!
Thanks Santhony, glad to hear it worked great for you!
Thank you very much for leaving a positive feedback here – it’s much appreciated!
Thanks for this guide, but I spent extra 5 minutes realizing that login name can’t be ‘ubuntu’ since it is configured to be NOPASSWORD. For RDP into ec2 ubuntu instance, we need to create another user:
sudo adduser xxx // add user xxx and some detail data will be prompted to answer
sudo adduser xxx sudo // add xxx into sudo group
Thanks Paul for this valuable tip!
I honestly would not have thought of that …
Thank you for the guide…it was very concise and helpful.
Thanks JustinB …
Thanks for this! Everything worked perfectly on the first go with four easy steps, almost. Two minutes. Three things I saw, YMMV…
1) Connecting with just 8bpp (256 colors) generates a completely unusable, skewed display. Not just ugly. Unreadable. It looks like a monitor with the wrong frequency. 16, 24, and 32bpp all work fine, just not 8bpp. I almost jumped to the conclusion things weren’t working. I just had to reconnect with a higher color depth. I suppose this depends on video settings, etc, on the host.
2) The default colors for the terminals were a black cursor, and lots of black text, on a black background. I first thought my terminal wasn’t working, until I changed the color scheme. No big deal, because I first tested Chrome and Thunderbird which worked fine so I figured it was something easy. Again, probably dependent on my host’s environment.
3) Shutdown and restart from the drop-down menu don’t work. Both just log me out and disconnect me. I have to do a sudo shutdown -[h|r] 0 from the terminal. Permissions problem?
Thank you for your tips/observations!
As for the shutdown/restart issue: I never really looked at it, but it could indeed be a security issue, where by default this is not allowed over a remote connection (ie. I think Windows doesn’t allow that either).
I had also problems with 15bpp. Switched to 16bpp and all works fine.
I’m not all that familiar with the color depth settings under Linux, but as far as I recall it’s done in 8, 16 or 32 bit, maybe that’s why 15 bpp fails?
This article really save a lot of time to me to study and surf web page to figure out how to use remote desktop to control my ubuntu 14.04 from Windows 7.
Thanks a lot and happy new year!
thank you very much for the nice feedback and a Happy 2015 for you as well!
Hans…awesome job. I have just one question. I am trying to control my existing programs that are running on my Kubuntu 14 server. When I RDP into my linux box from my windows box I am not seeing the existing programs that are running on the linux box. It just seems to give me a desktop in which I could start something new. I know that when I RDP into my windows box from work I can see all the programs that are running on my home box. Any suggestions. ( I loaded the Kubuntu desktop onto my Ubuntu 14 server. ) Thanks man!! Bring back RUUUUUUD! ;) Andrew
I know exactly what you mean with this: I’d prefer to continue an existing “session” as well, so everything on my computer screen is identical to my remote desktop screen, including open applications etc.
I have not spend a lot of time on it, but as far as I could see, this is appears to be not an option under Linux – mind you that my knowledge and experience is somewhat limited on that one.
Funny thing is that this feature we are looking for right now, used to annoy me under Windows, but now it’s something I’d love to see under Linux …
Great job on detailed instructions. Tried like 1 year ago vino, x11vnc server, vnc4server and couldn’t get performance as with windows mtsc or using teamviewer, so I gaved up. Now with xrdp I can really make use of low end computers to log into more powerful one with great performance. For some reason I had a time out issue when inactivity, but overcomed by installing a stopwatch a letting it run while all the session. I’m going to read a little more and will try to change some settings to see if session time out go away. Also I did tried to enable local sound but didn’t worked.
Thanks for sharing.
thanks for the positive feedback – it’s much appreciated …
Neat and simply trick to avoid time-outs! But I’m sure there must be a better way – I have yet to run into this problem, since I usually only connect when needed. But I can imagine if you’re doing some kind of remote monitoring that this might happen.
I did find a blogpost about some xRDP tips, mainly talking about reconnecting to an existing session, maybe it’s useful.
[…] Using Windows RDP to Access your Ubuntu Instance How to use xRDP for remote access to Ubuntu 14.04 […]
Thanks it is realy cool
Thanks for the guide!
Thanks Mike! You’re welcome!
Thank you for the guide. it helped me in connecting from windows 7 Enterprise version to ubuntu 14.04
Hi Ravi Masadi!
Thank you very much for leaving a positive feedback, it makes it worth writing articles like these!
thanks it’s works perfectly on aws Ubuntu instance
Glad to hear that it worked for you, and thanks for sharing!
Thank you very much. Exactly what i need. Everything works like it is described in the guide
Thanks for taking the effort to leave a nice feedback!
Thank You. This works fine.
Thanks Sohil Jain for taking the effort to post a positive feedback .
Glad to hear the article was useful to you.
thanks for this guide
i’m a neww be on ubuntu’s world. and need your help!
I’m now able to access my ubuntu desktoo via RDP but I’m not able to install updates or manage the network connections, etc… For installation i’m not becoming autherntication window for my username.
Even into a terminal window in this rdp session i’m not able to execute cmds
what should i do to get authentication message?
Thx a lot
don’t worry – I’m not an expert either ….
As far as I recall, you need to tweak a file in the directory of the root user:
This is what I found on the Ubuntu forum which seems to work very well, not sure how much it’s related to the problem you’re seeing:
Create a blank .Xauthority file in the home directory of the user you are connecting with. Be sure to log in as that user (either graphically, or via the terminal), then run:
I have not tested this – I’m traveling so I cannot access my computers.
thank you for reply. I’ve tried your suggestion but without success
I apologize for being able to test this myself, but in another forum post I found:
Add to /etc/xrdp/sesman.ini: (not sure if this will help)
I have to keep guessing here as well. Sorry about that.
There are not enough ways to appreciate my gratitude to your wonderful guide.
There are so many ways and alternatives to set up access to Ubuntu such as vnc4server, tightvnc and so on, but your guide was DA BOMB!
works perfectly and with such little amount of digging and adapting the tool to the host OS using various scripts and settings and even when getting access – it comes with tons of bugs where as your solution works perfectly and smoothly with in minutes!
keep up the good work,
I very much appreciate that you took the effort to leave such a cool comment!
Mind you though that I had to dig a lot before I could find a way that worked for me – credit also goes to all the other users out there that helped me get to this method.
Thanks again – it’s a motivator for me to keep going!
Just a quick note of thanks – really needed to get another user connected to my computer today and, under the gun, found this excellent tutorial. Really superb work.
Glad to hear you had a good use for it, and I very much appreciate you taking the time to post a nice comment! Awesome!
Well done! Works a charm under Win8.1 Pro.
Awesome! Thanks for taking the effort to post a positive feedback Nick!
Thanks. Works like Charm
Thanks Uma for letting us know!
Thanks for this guide – even a Linux noob like me got it!
Thank Luke for the positive feedback – makes writing articles like this worthwhile!
p.s. I’ve been using Linux on and off since 1991 (went from Minix to the first commandline version of Linux) and I stil consider myself a noob …
Thanks for the help Its working
Thanks Manohar for taking the time to leave a nice comment!
Wionderful, easy to follow and worked fine, much easier that whay I have doen on a fedora box
However, it seems that I can not copy/paste between windows and my ubuntu RDP session, any idea on how to make this possible?
2nd, in xfce4, we don’t have the usual terminal , instead there is Xterm and UIterm which are not configurable / customized easily.
So many thanks again for you detailed and useful information
Thank you for leaving a nice feedback!
It’s much appreciated.
As for the Copy/Paste issue, I’m currently no where near my computers (traveling),…
I did find this post (from 2012!), but have not been able to investigate it’s usefulness yet …
Seems XFCE might not properly support clipboard functionality – even though the documentation says it should work.
You could try autocutsel, see this post.
Thanks for the respone, 2nd idea did not work after installing autocutselect
I will take a look once I get home again, but that could take several weeks
FWIW, it seems to work fine with Ubuntu 15.04 (just released 4/23/2015). It works for me, anyway, with 15.04 as a server and 14.04LTS as the client. No promises.
Thanks Justen for letting us know .
Definitely worthwhile info for myself and others who eventually will switch to Ubuntu 15 as well .
Hi I have a question maybe you can answer me.
the script /etc/xrdp/startwm.sh execute everytime we login with credentials.
So if I use root credentials this script will run as root.
But if I use normal user this script will run as a normal user.
I would like to run a command as a root even when I am running this script as a normal user.
The command runs a vnc video recorder.
The idea is that I do not want that a normal user stop my video recorder vnc.
Any idea how to do it in /etc/xrdp/startwm.sh?
interesting problem haha …
I would try to start the said application from Terminal using “sudo” or a Super user shell with “sudo su”.
This should be possible to do as a regular user, but the password of root is asked for this.
Thank you very much , it works like cherry on cake.
great to hear that! Thank you for taking the time to post a nice feedback!
I am running ubuntu 15.04 in Azure. I followed the guide but when I try to connect I only get a grey screen. Any suggestions?
can you let us know what you see happening (step-by-step) when booting your computer?
A “grey screen” does’t say much to me, well maybe only that it fails to boot from the “new” partition?
(no pun intended)
I “ordered” a vm : Ubuntu 15.04 on Azure.
I can connect with ssh.
Followed you guide for installing xrdp and xfce.
When I connect with a rdp client I see;
– a screen with the start of xrdp,
– after that only a grey screen with a mouse pointer.
Does this help?
Any luck Marko? I’m having the same issue. My startwm.sh file looks good. I’m running 14.04 LTS.
I’m no where near my equipment (big move from the US to Europe) to test this, but could it be that XFCE is not installed?
Seems your Windows manager (XFCE) is not starting.
Check the file “/etc/xrdp/startwm.sh“, the content should look something like this:
I have the same content in startwm.sh as you mentioned.
When I start a session from a RDP client on my mac I connect to : [server-ipadres]:52082 (port configured for RDP on setup in Azure),
the xRDP windows opens and asks for a password,
after entering the passwd the following messages are in the Connection log window:
connecting to sesman ip 127.0.01 port 3350
sesman connect ok
sending login info to session manager, please wait…
xrdp_mm_process_login_response: login successful for display
connecting to 127.0.0.1 5910
error – problem connecting
Does this provide any insight on what I doing wrong?
restarting (after entering passwd in the rep client) has the result that the Connection log window of xRDP doesn’t show anymore but my gray-screen again.
I’m guessing (!) there is an issue between xRDP and your Windows Manager (xfce).
The login seems to work just fine, and it looks like xRDP tries to talk to XFCE (or whichever Windows Manager you’d like to use), but fails in doing so.
Is XFCE installed?
yes, I used the link you gave above.
I did find a related post at UbuntuForums.
This person was talking about TightVNCServer – he had to remove xrdp, vnc4server, tightvnc, as they seemed to be installed in the wrong order.
He had to install tightvncserver, then install xrdp.
Please see: bug 375755 and 220005.
It seem important to do tightvnc before xrdp. Doing things in this manner will cause xrdp to use tightvncserver instead of vnc4server.
I have no idea if this will get the desired effect.
Another post at SourceForge suggests (for Gnome users – not sure if you’re using Gnome) that “/usr/local/xrdp/startwm.sh” should look like this:
This post (also at SourceForge) suggests, as I suspect, that your Windows manager is not starting.
You could try to start xRDP manually from the command-line and add the “–no-daemonize” option so error messages by “xrdp-sesman” are made visible.
Another post, in the same thread suggests:
Usually you can see the problem if you type
at a command prompt. If it does start, try to connect to it with vncviewer.
And finally ….
The problem could also be related to the VNC viewer you’re using.
On my Mac I’ve tried ScreenSharing, but found it to not work so reliable when connecting to a Linux box, and I started using VNC Viewer instead which works like a charm (it’s free).
I doubt that this problem has something to do with the order in which xrdp and tightvnc or vnc4server are installed.
I’ve seen a connection log identical to this:
connecting to sesman ip 127.0.01 port 3350
sesman connect ok
sending login info to session manager, please wait…
xrdp_mm_process_login_response: login successful for display
connecting to 127.0.0.1 5910
error – problem connecting
when I had no VNC server installed but was trying to connect with “sessman-Xvnc” option.
You might also probably see something like this:
in /var/log/xrdp-sesman.log. This might not be entirely accurate and mean that Xvnc server could not be started on a given display. In more recent xrdp versions there’s a word “might” added to that error message so it reads “… might already be active …”.
So in order for this to work, I think we should check whether Xvnc server is installed and can be run with a following command:
One of these VNC servers that are listed in xrdp package recommended dependencies should work:
I must congratulate you on your article. It is really helpful.
One quick coment…
Unity does NOT runs XWindow. It is its own technology for local machines only.
As such, you cannot do many of the things that you can with X11… Such as desktop sharing. That is why XRDP doesnot and cannot work with it.
Thanks for the compliment.
Yeah, I’ve noticed that Ubuntu went it’s own way – unfortunately. That’s why XFCE is being used as windows manager.
Thanks for the info though, as others might find this a good explanation why they do not see the “usual” Ubuntu desktop.
Can I keep my old window manager (KDE) and still use XFCE for RDP only.
xRDP erformance is abysmal with Kubuntu 14.04.1
AFAIK you could use KDE for this as well.
Simply modify the file “/etc/xrdp/startwm.sh“, replace “startxfce4” with whatever statement is used to start KDE.
You cannot however user the native Ubuntu Windows Manager (the new one).
Hey Hans, ik had gezien dat je Nederlands was.
Mijn xRDP is zo erg langzaam dat ik niet eens me browser kan openen.
Hoe kan ik dit verhelpen?
Hey Hans, i saw you was Dutch.
Mine xRDP is so slow, i cant even open mine browser,
How kan i repair this?
Funny that you ended up here – there is a Dutch version of this article as well, and yes I’m Dutch .
As for speeding up: There can be many reasons why it’s slow.
For example, my old computer is a pretty slow computer, and it shows similar issues – increase memory, faster HDD (ie. and SSD), etc will help.
Reducing colors and choosing Ethernet instead of WiFi for your connection should improve the experience as well (you’d obviously want to try that one first before investing in hardware).
I never have taken the time to speed up things, but this article at UbuntuForums might give yo some good ideas.
It’s a rather long story, so I didn’t post all of it here.
You should find some good setting in /etc/xrdp/xrdp.ini.
I was coming from Ubuntu Server 14.04 without any Desktop. When i started the remote session icons were missing. This was possible to fix by:
Thx a lot. It was still quick and very good working instruction,
Thanks for the tip! And thanks for leaving a nice comment – it’s always much appreciated!
After reading 800 idiot instructions, this is finally the one that really works!
Worked on Lubuntu 15.04
Glad to hear it worked for you and that it works with Lubuntu 15.04 as well … cool!
It works also on latest Mint ;)
There are some problems with TAB key in XRDP/XFCE – it does not do Autocomplete (TABcomplete).
To fix this, as a beginning, edit file
Look for all Super..Tab and put the value “empty”:
http://ubuntuforums.org/archive/index.php/t-1771058.html and other sites
Awesome! Thanks Tomo for the confirmation and the tip!
I followed you steps and installed and configured xrdp. when I try to logon via remote desktop connection I get following error: xrdp_mm_process_login_response: login failed. How do I fix this error. Please advise.
this sounds like a login issue – are you sure you use the right username/password? (I apologize for this seemingly “stupid” question)
[…] this walkthrough (THANKS!) I was able to get a Remote Desktop Connection working for my […]
This approach has several problems. First and the biggest is every time i close remote desktop connection and reopen I get a new desktop. I cannot continue work on my previous session.
Second typing l key causes the screen to lock. I cant type text.
Third, the enter key does not work. It highlights the current widow. Also Tab does not work.
Forth terminal has only black screen. I cant see text or type.
This method is probably not perfect, but the problems you’re indicating suggest that there is something else wrong.
Others, myself included, have used this method numerous times without the mentioned problems.
If you want to install a different desktop environment while using xrdp; I have found the following resources….
This is quite well explained… hope this help/interest somebody
Ubuntu 14.10 – LXQT as alternative Desktop for XRDP
Ubuntu 14.10 – KDE as alternative Desktop for XRDP sessions
Not sure if you’re promoting your own website or not, but the tips are helpful anyway … so for now: Thanks!
I have used your guide to setup RDP into ubuntu several times now. Just getting around to saying thank you for posting this very simple explanation. Bookmarked for later. :)
Thanks Mr. M!
Glad to hear it works well for you, and thank you very much for taking the time to leave a nice feedback!
Hi Hans, Great article.
I was running 12.04 and RDP was working great. I then upgraded to 14.04.3 LTS and RDP would start but when I login I would get the grey dotted background with the “X” cursor then RDP would drop so I followed your how-to in the hope that it would:
A. Repair anything that the upgrade broke and;
B. Resolve the issue
However it is still the same. Do you have any suggestions on what I can do next?
Thanks in advance.
As far as I recall, the Windows manager of 14.x is not compatible with xRDP, that’s why we install XFCE in this article.
The “dotted screen with an X” is the famous X-Windows screen you’re seeing, however no desktop manager is starting so it remains a “dotted screen with an X”.
So to get your setup working again; install XFCE (or other desktop manager that works with xRDP) and reconfigure xRDP (just follow the steps in the article).
Hope this gets your remote connection working again …
Thanks for the quick reply. Unfortunately I followed your article word for word and what I wrote above is what I’m getting after following the article.
It is working fine for me, on two different systems running Ubuntu 14.04.3 LTS, 32-bit, and also on two systems running 15.04, 64-bit, with the 4.2 kernel (released 30Aug2015). Let’s see if you have a couple things installed correctly. In a terminal, enter
If both commands report back a version, at least it means you have xrdp and xfce installed correctly. If one isn’t found, that is obviously a problem. ;) If both are installed, trying starting xfce manually in a bash window and see what happens. Does it launch successfully?
Thanks very much for helping out Justen and Hans.
OK, so I found a problem.
xrdp reports back a version but fce4 doesn’t, so I ran sudo apt-get install fce4 and it says nothing to install??
a:~$ xfce4 –version
xfce4: command not found
a:~$ sudo apt-get install xfce4
[sudo] password for daniel:
Reading package lists… Done
Building dependency tree
Reading state information… Done
xfce4 is already the newest version.
The following packages were automatically installed and are no longer required:
apg appmenu-gtk appmenu-gtk3 appmenu-qt avahi-utils compiz-core
compiz-plugins-default compiz-plugins-main-default dconf-cli espeak
firefox-globalmenu folks-common geoclue-ubuntu-geoip
Use ‘apt-get autoremove’ to remove them.
0 to upgrade, 0 to newly install, 0 to remove and 557 not to upgrade.
Thanks Justen for helping out, that’s just awesome!
If startxfce4 worked, then go through “Step 3” (above) again.
The xRDP script calls XFCE (last line), either the line not there, or that line fails because XFCE isn’t there (follow Justen’s suggestions).
Apologies, I just saw that I wrote it wrong in the above paste but can’t see where to edit.
aa:~$ xfce4-session –version
xfce4-session: Cannot open display: .
Type ‘xfce4-session –help’ for usage.
I must apologise to Justen and Hans……
I looked over step 3 again and saw a problem….
echo xfce4-session >~/.xsession
I got permission denied, so I did it with sudo, still the same….
aa:/home$ sudo echo xfce4-session >~/.xsession
-bash: /home/daniel/.xsession: Permission denied
So I nano into the file and wrote it out manually and all is good!!!!
Thanks so much for your excellent help!
No need to apologize (although it’s very polite to do so) …
I’m just glad it works again for you …
Hi, very good article. However I still get a black screen, no logon, when I connect using mstsc.
Is VNC (tightvncserver) a pre-requisite for xrdp?
Sorry to hear you’re running into a snag …
Xrd might need VNC, you could try using the “-f” parameter (I had to look that up, so I hope it works) with “apt-get”.
Like I said, I had to look that up with Google (apt-get man page), as I had not run into that issue before.
I found the problem. I was using an existing RDP connection set-up which contained a Windows credential of the type machinename\userid. Once I deleted that, I could see the login screen.
Thanks for the hard work.
Awesome! Glad to hear that!
Thanks for posting your findings!
[…] This information was gathered from here and here. […]
Very cool to see this applied to a Raspberry-Pi! :-)
Lovely lovely article, clear concise and to the point.
I am currently working on my ubuntu setup using xrdp and mate and I would really like to have the sessions resummable in the event that it gets disconnected. I intend to use this setup in a production environment with 200 concurrent remote desktop sessions. Please advise on how to overcome disconnects / idle timeouts and also how to ensure that one can resume a session. Also, will my scenario mean that I have to create a separate user for each remote desktop client? Thanks in advance.
Thanks for the compliment.
I’ll admit, I have been too lazy in the past to go figure that out.
I did find a good post at StackOverflow, I copied the part that seemed to work best below, give it a try. It basically forces xRDP to use a fixed port, and re-use it each time one connects.
After installing xRDP, it’s all about your xrdp.ini file, which is located here:
by default the first xrdp session handling script looks like this:
The important line is port=-1, this makes xrdp always look for a free port to connect. If you set a fixed port here, the xrdp will always go back and connect to the same session. I changed mine so it looks like this:
Thats it, I think you could get away with just changing the port=-1 to port=5912. My xrdp always re-connects to existing session always using the same port.
Please let us know if that worked, or if you found a better solution, so I can incorporate it into the article
Thanks a bunch Hans; this really helped I am still trying to determins the resource requirements so dat I can plan appropriately for optimal performance and for scalability.
You’re welcome Victor!
with 3 different users each wishing to return to the same session they left but not wanting to see the other peoples sessions, any ideas how would this be done? The above seems to suggest a global setting of a single port rather than for individual users?
I’m afraid this is getting a little bit more advanced than my experience can accommodate.
Maybe one of the other visitors has an answer to this?
I’d have to guess that sessions then become IP address specific?
I wonder if changing the port line to port=ask -1 would then allow individual users to initially connect, find the port and then each time re=use that same port number? Anyone tested this?
Maybe this AskUbuntu post will help?
What do I do if I donot have the admin rights to change the or edit the xrdp.ini file?
Honestly; I would not have a clue. You really need sudo access …
[…] //www.tweaking4all.com/software/linux-software/use-xrdp-remote-access-ubuntu-14-04/ Unal D […]
Thanks soo much!! You saved me a bunch of frustration!! Worked like a charm!
Glad to hear it was helpful for you too!
When i connect linux(ubuntu) machine remotely om windows (mstsc)
the xRDP windows opens and asks for a password,
after entering the passwd the following messages are in the Connection log window:
connecting to sesman ip 127.0.01 port 3350
sesman connect ok (when port = -1 in xrdp.ini)
started connecting (when i change port = -1 to port =3350 and xrdp restart)
connecting to 127.0.0.1 3350
tcp connected .
remote login halts at this stage. No further process even if i click OK.
I’m nowhere near my computer stuff, but your question sounds a lot like Marko’s question (scroll up, or click this link).
Marko hasn’t posted yet if and how he resolved the issue. You’ll find some suggestions there as well, but since I haven’t been able to reproduce the problem, I can’t really tell you what might be a fix for this.
It got resolved , when I change the port number to 5920 (other than 3350) in xrdp.ini.
thank you so much for posting the solution!
I know others will benefit from this!
[…] //www.tweaking4all.com/software/linux-software/use-xrdp-remote-access-ubuntu-14-04/ […]
Great article, here are some edits I would add:
If you don’t install the icon sets then Thunar will not display icons and you can’t change the theme.
Where do you think I should add this in the article? Right after apt-get xfce4 (step 2)?
I do not have the means to test this right now
I would add them in step 2 immediately following the installation of xfce4. Regardless of if you add them or not, kudos on the post. It works perfectly and holy cow it is fantastic being able to RDP into my Lonux servers the same way I do for my Windows servers. I was skeptical, having used nothing but PuTTY for so long but I’m a believer now!
Thanks Neal! I’ll add this today …
Million Thanks !!! worked like charm.
Thanks for leaving a “Thank you” – it’s much appreciated!
[…] These instructions from Tweaking4All worked perfect for me! Hope this helps you too… […]
with the instructions given above I am able to remotely login my machine but the whole screen is completely blurred nothing is clear.what might be the reason?any idea
I’m not sure what could cause the blurry image, except when your remote desktop is set to a higher resolution than the screen/window you’re looking at (it will downscale, and therefor become blurry). That’s the first thing that comes to mind anyway …
Thanks for your response.I am a bit confuse.The above scenario is happening when I am doing remote logging from ubuntu 12.04 to 15.04.But the same thing is not happening when I am remotely logging 12.04 from 15.04.
Is this happening because of different ubuntu versions?
also just for information I am using 15.04 on virtual box and 12.04 is host machine.
I assume you meant remote login from 12.04 -> 15.04 versus 15.04->12.04 ?
How are the screen resolution settings for both?
Yes I mean the same.But I change the screen resolution setting on 12.04.And now its working fine on both.
Thanks a lot for your tutorial :)
Can you also pls suggest how one can drag and drop during remote logging sessions?
Awesome – glad the issue is resolved now .
As far as I know, drag-and-drop from remote desktop is not supported at this time.
Ok.Anyways thanks a lot.
shouldn’t that read
You’re right Robert! That’s indeed the case.
Thanks for catching that!
Great guide , got this up and running in under 10 minutes on Ubuntu 15.10 ! worked first time!
Thanks for taking the time to post a “Thank you!” – it’s much appreciated!
Glad you got it to work that fast!
Still great info. many thanks
Do you have any insight as to why XFCE can’t be replaced with LXDE? I’ve been trying for some time and have started posting in forums. Has LXDE been orphaned like Gnome (with respect to xRDP)?
OK, I finally found the solution. it can be done with LXDE
Ubuntu wants a .xsession file with:
lxsession -s LXDE -e LXDE
Lubuntu (my distro) wants a .xsession file with:
exec lxsession -s Lubuntu -e LXDE
That’s good info, and thank you for taking the time to post it here!
I have trouble with RDP session:
Unable to connect to RDP server 127.0.0.1
I use Remmina as client side and Ubuntu 14 on the server side
service started – checked with service xrdp status
ports open – checked with sudo netstat -nlpt | grep xrdp
nmap said that:
3389/tcp open ms-wbt-server
But Remmina could not connect.
where did you see this error message?
If it’s on the client computer (so not the computer that is giving you remote access), then the problem would be the IP address. 127.0.0.1 is the IP address of “localhost”, or in other words: the computer you’re working on and not the remote computer. But I assume that’s now what you meant?
This error message I see on client side.
Step by step:
I start Remmina – choose Connect to my RDP server.
Remmina show me the panel with password for ssh session
Next it connect to server ( it show correct address and port)
And next show me window with this error – Unable to connect to RDP
Previos time I was correct it with clearing ~/.freerdphosts or something like this, but now I it not helping.
Did you try the tips in this comment?
I posted that one a while ago but the user never confirmed if it worked or not.
Since you say this is on the client side – just to make sure – you did not use 127.0.0.1 to connect to the server, right?
Yes, I have tryed.
It is not help.
Where I can fid error log on server side?
Oh boy, that’s where I would need my equipment, which I do not have with me at the moment (traveling).
My first guess (but I could be very wrong): /var/log/xrdp-sesman.log or /var/log/sesman.log
I found RDP and VNC way too slow for my needs.
For something more akin to the TeamVieweresque experience with a remote XFCE, do yourself a favour and give x2go a try.
thanks for the tip – I had not heard of X2Go yet, but doing some reading up, I’ve noticed very mixed messages. Some think it’s stellar, others complain about lag. Most actually prefer TightVNC. I hope to find some time to to test it soon, and see if it’s worth the effort.
Worked great for me! Thanks a lot. Very usable for my remote machines on cloud.
Thanks for taking the time to post a Thank-You – it’s much appreciated!
I can remote desktop from windows10 but i don’t use command line on terminal emulator.
Please, Could you help me?
what part do you need help with?
How i can use command line on terminal emulator?
You can see it here: http://postimg.org/image/49ggboomp/
Hmm, interesting; Terminal without a prompt – I have never seen that.
I honestly have no clue what might be causing that, but it most certainly is something on the computer you’re trying to remote control (ie. the “server”).
Could it be, and I’m only guessing here, that either the short-cut to Terminal isn’t set right, or that you have not set the proper access rights / user in your config?
Thanks for the wonderfull tutorial.
I have a question. My connection seems to be too low for the RDP.
When I access it, it takes hell lot of time to render the desktop.
Is there anything so that I cam lower the resolution or something, so it will be loading fast.
For what I could find online, since I do not have the chance to test this;
There seems to be: xfce4-display-settings
I think you can run this from Terminal/Shell.
This is supposed to be used to do resolution setting.
Super. Thanks. I will look into this.
I tried to tweak settings in my RDP Client, it kind of worked, but still checking for more information.
BTW, is there anything like I can redirect the access through google server, since my ISP allows Google server transfer at super speed?
Ehm … I have no idea what “my ISP allows Google server transfer at super speed” means. Can you elaborate?
p.s. Since it sounds like you’re using remote desktop to control a computer remotely over the Internet;
please be very careful with that, so outsiders do not get access to your computer as well.
Thank you very much, Its really awesome. Now I want one more help that is I have to see only that desktop working, menace Can I see Ubuntu user screen during its working for security reason, If yes then please help me. (In ubuntu I used remmina for desktop sharing. But is there any software for windows so using that I can share ubuntu desktop)
I’m sure it can be done, but I’ve never tried it or had a need for it.
It might be easier to use VNC for that, here an example.
I always install with those commands Xfce on my online ubuntu vps but this time is not working in google cloud, I dont know why can someone help me!
when i try to use this command echo xfce4-session >~/.xsession it showing me this message: Source: Tweaking4All.com – How to use xRDP for remote access to Ubuntu 14.04 (//www.tweaking4all.com/software/linux-software/use-xrdp-remote-access-ubuntu-14-04/)
can someone pls help me how to fix this!?
When you copy content from Tweaking4All, it add a “source” link at the bottom.
It’s just an extra line you’ll have to remove.
If this happens more often then I’ll try to add some filtering to the copy & paste function, so I will not add this when copying code.
My apologies for the inconvenience. Unfortunately, too many people simply copy all the content and place it on their website as if they wrote the article .
I am remotely accessing (on network) my ubuntu 14.04 through windows system. However, during login it asks for port and on giving same port helps me in resuming my session on ubuntu.
My question is how many sessions I can run simultaneously. I have a machine with large resources and want to give it to different people to work on it simultaneously.
I honestly have no idea what the number of simultaneous session is, I would have to guess that it’s limited by the capacity of your computer (that is hosting the desktop), your network connection, and possibly one or the other configuration … I unfortunately have never really tried to connect more than one session a ta time. Maybe someone can chime in an comment on this?
It works for me as well, thanks a lot!
Awesome! Thank you for taking the time to post a “Thank you!”, it’s much appreciated!
i use xRDP in my ubuntu but always startup ubuntu ask password autentification…
sorry about my english..
I’m not sure what your question is? You want to be able to use xRDP without a password?
Thanks for making this super simple and easy to follow but I am having an issue where my RDP connection to my VMware ubuntu server is really slow refresh rates. When I scroll I can see the pages being rendered, when I move windows around i can see the same thing, is there a way to tweak this?
Thank you for the compliment – it’s much appreciated!
As far as tuning goes;
Start with making sure you have a fast connection, preferably Ethernet (wired) and not WiFi.
Something I found here that might help:
Fine tune xrdp.ini (nano /etc/xrdp/xrdp.ini), and in the [globals] section, change max_bpp=24 and add the command to use compression as so:
and modify the [xrdp7] section by changing xserver_bpp=24:
I did read somewhere that disabling audio (if currently enabled) will give you some more speed as well.
If I could use wired I would but I have the ubuntu server running as a VM on my desktop PC and I am using my laptop to do some web development while someone else uses my desktop PC. The wireless network I have is very much capable of handling the RDP streaming!
I made the changes you suggested and I did indeed notice a marked improvement in the speed so thankyou very very much for those tips. I was searching high and low for tweaks and couldnt find it so your help is greatly appreciated! I am beginning to fall further into the *nix world and its starting to feel warm and fuzzy!
Thanks for letting us know that the trick did work.
I recall some clients allowing tweaking of the color depth and such as well, but maybe that’s a VNC thing and not an RDP thing.
Well, I’m glad it made a difference.
Please let us know if you find more tricks that boost speed…
I have a Windows 2012 R2 domain using Windows 7 machines for the clients. I have also an Ubuntu 14.04 LTS PC which I use for file transferring. So I installed XRDP and XFCE4 in order to access remotely my Ubuntu from a Windows PC. The problem is that I cant find the “Connect to Server” option when I access remotely the Ubuntu . Only the “Browse Network” appears in the File Manager. On my Ubuntu I use to Connect on my 5 servers and transfer files to each other using the Connect to Server option. Using XRDP the layout and the interface is different and I cant find the option. I made a search for this problem but there is not any similar post..
In addition i would like to know why in other tutorials the change the ports …
Please help me guys…
Since I’ve not been using remote desktop for Windows and Linux in a while now, I’m not quite sure how to answer your question.
Maybe one of the visitors here knows an answer?
I’m a little confused (it’s still early in the morning here, and I’m still in need of more coffee haha); so your Ubuntu connects to 5 servers, but you want to RDP from a Windows 7 computer to the Ubuntu machine. And the Ubuntu machine can’t connect to those 5 servers? Did I get that right?
Yeap . I was Connecting to the Servers , drag and drooping in the terminal and doing my job.
Now ,for the reason that the Connect to Server option is missing from the toolbar on the left , i manually inserted the address of the server.
And it worked !!!!!!
The problem is that when i TRY to drag and drop the tab into the terminal(this is what I am doing on my 14.04 LTS) it says No such file or directory .
In terminal : cd ‘smb://10.101.1.143/’
I can’t access now the files of the servers in the terminal…
Any ideas Hans .. ?Thanks for replying.
OK, well that sounds like a limitation of drag and drop support with xRDP?
I hope someone here is following this discussion and is more experienced in Ubuntu use than I am …
(I only use Ubuntu to occasionally compile my applications, but I do not use Ubuntu on a daily basis)
Because of the difference in desktop modes used during rdp connection, remotely connected will appear different.
If you want to transfer files from one system to another, try scp connections. For transfering between linux and windows, use pscp available on download page of putty. For transfering between linux machines, install auto-ssh server and use scp. You can easily find command tutorial on net or tell me if you need more help.
Hope I cleared your doubts.
Awesome, thanks for chiming in Ankit!
Just found this tip, not sure if it might be helpful to anyone (source):
I am running into another issue where the XRDP is not working. I have been at it for quite some time now and I think that I need help. I believe that it is an issue of the Ubuntu machine not listening on a port.
However, when I go to rdp from windows, I am able to connect and type in username and password but when I do, I get the following error:
Could the issue be that my Ubuntu machine is not listening to port 5910? WHat do you guys think?
If so, how can I make sure that Ubuntu is listening to port 5910?
Ok, so when I run this command:
Nothing comes up. When I run this command:
and I scroll through, I do not see anything connected to port 5910. I believe that i have found a large issue. My question now is how do I set up xrdp to listen to port 5910?
Ok, so i found the command that will solve my issue. Run this command to remove the error
I hope this could be useful to someone – I have not tried or tested this.
even if your Ubuntu machine does not have a VNC server listening to the port 5910, the moment you connect to it with xrdp, xrdp-sessman attempts to start a new VNC server at that port by default.
But I found it rather convenient to use the vino VNC server which I believe comes installed by default on recent Ubuntu distros. I was actually running it on Mint 18 where vino-server can be enabled from GUI main menu in Settings->Desktop sharing or by running the
command. I think Ubuntu should have similar features.
vino-server allows to connect to the same display (usually display 0) on which the X server is already running and use it locally and remotely at the same time.
We should run this command first to make VNC auth to work with vino-server:
vino-server listens to the port 5900 by default so in xrdp log-in window we should select “vnc-any” from the dropdown list, ip: 127.0.0.1, port: 5900 and fill in the password which was previously set up in vino-preferences. The username can be left blank because it is not used for VNC authorization.
Thanks Sergey for the great info!
I love it when visitors contribute with valuable tips. Nice!
I was able to connect buy changing the xrdp log-in window dropdown list to “sesman-X11rdp”.
Thanks Austin for chiming in! It’s much appreciated!
Thanks very much for this. Having an odd problem – it connects OK, but when I go to open things (such as a web browser) on the remote desktop, it doesn’t seem to do anything on the remote end, but will actually open them on the local end. Another words, picture two monitors side by side – click open on the windows screen, and it appears on the Linux screen but not the windows screen. Also, the desktop looks entirely different from what’s seen on the Linux screen.
Remoting from a WIndows 7 box to a Ubuntu 16.04.1 LTS box.
I’m trying to figure out what’s going on, but one thing to keep in mind is that this not like “taking over a computer screen remotely” (if you know what I mean). You actually start a session on the remote machine, so on the monitor of the remote machine, your actions will not be shown. The very different look on the monitor and your remote screen suggest this (to me anyway).
Hope this helps.
Thanks – gotcha on the different sessions.
If I’m already logged into the Linux box, does remoting in create a new session or join up with the current session? I’m wondering if that’s the problem – I’m logged in both locally and remotely on the same account.
Yes, it will create a new session, although there might be a trick to take over the already running session, but I’m not aware (and have had no need so far) how to do this.
Maybe another user is aware of a trick and willing to chime in on this one?
OK so I created another user account and remoted in using that account, problem solved. Interesting behavior. With a session running on the Linux box, remoting in using the same account doesn’t exactly “take over” that session but the actions you do show up on the open session and not on the remote session. IE, when logged in “twice”, opening a web browser on the remote session opens it on the local session but NOT the remote session. There’s probably some way to harness this but I’m not savvy enough for that =)
I think I got what you are trying to ask here.
1. Your normal ubuntu machine uses gnome 3d desktop. But to run it using xrdp or remotely, we require 2d desktop environment like xfce(shown in this tutorial), gnome 2d environment, mate and many more. If you observe image 2, that is how your screen and functions appear from remote login.
2. Refer to the previous comment, Sergey has mentioned about port which vns server listens to, through some changes in preferences you can actually add option to input port everytime. Refer image 1, below password there will be option to input port in that case. Now whenever you start new session, it is assigned a port. If you disconnect running session and want to reconnect to the same, just enter the existing port. And by entering -1 new session can be started. In a way, you can run multiple sessions in parallel.
3. However, running sessions in parallel can have its own disadvantages. I have observed that if you open browser like mozilla firefox in one session, you cannot open or use that browser in another session.
Hope I have cleared your doubts, although not in the same order as you have asked..
Also, if I connect to same session of remote connection from different machines, I am able take over the session. I don’t whether your problem is because of ubuntu 16.
Thanks for chiming in Ankit!
How can i find my ubantu username?
The username is what you’ve setup during your Ubuntu installation, and the same username you use to login to your Ubuntu.
Install ubuntu desktop 16.04
im getting following error: xrdp_mm_process_login_response: login failed. How do I fix this error.
I have not ran into this issue … but there are 2 things that might be happening:
– You’re using the wrong password …
– Your session is locked
The latter is described here – read the comments there as well, I did see some tips there too.
Hope this helps (please let us know!).
Thanks for your quick response and im confident. its not issues about password or session. as before also i installed xrdp and was working good. this time only stucked as once a while i use at office :-(
If any more alternate remote, please suggest & if any whats app group for linux please add me.
When I connect to the target server from RDP on my mac, it comes up with a grey screen and the cursor is a large X. I’ve tried rebooting the server and it still does the same thing.
Any hints on what could be the problem? Username and PW are all correct, the server is a virtual machine if that helps.
this would mean that your windows manager is not starting for the remote connection.
Please verify that the correct Windows Manager has been installed and that the config file is set correctly.
I uninstalled xrdp / xfce and started again, this time using LXDE and it worked. Not sure if it was a problem with my xfce installation or not, but I have a working remote session. Thanks!
I suspect the “sudo apt-get install xfce4” step somehow went wrong or did not initialize the windows manager (xfce4).
But … I’m glad it’s working now for you!
Worked great with Ubuntu 16.04 and Windows 10. Thanks!!
Awesome! Thanks for taking the time to post your feedback!
I have this working fine with Ubuntu 16.04.2LTS on three machines (had it working with 14.04LTS and 15.04 too). I sort of know what I am doing. ;) I migrated one machine to 17.04 (clean install). I repeated the install/setup procedure for xrdp/xfce4. No errors. However, when I connect to the machine, I just get a black screen. No login info. Basically, it is broken.
Logging in via ssh, and doing a ps -ef | grep xrdp shows it is running… when I connect via remote desktop from my Win10 box, I see a new instance of xrdp exists, but I’m not seeing it. Just black. I’ve tried both 16 and 32bpp, various screen sizes, experience settings, etc. I’m using the same client that works with 16.04.2LTS and it doesn’t work with 17.04.
Anybody have any ideas? Any caveats with 17.04 vs earlier versions?
Looks like an xrdp related problem. If I manually fire up a vncserver on my 17.04 box via ssh, it executes and starts an xfce4 session. I can then connect to it with any VNC viewer, no problem. Works fine when xrdp isn’t involved.
16.04.2LTS installs xrdp version 0.6.1
17.04 installs version 0.9.1. This version includes its own vncserver.
Comparing the files in /etc/xrdp, there are quite a few differences. I think there is a security-related problem. It’s as if the password I enter for authentication isn’t being passed, or that the vncserver launched by xrdp/sesman doesn’t even has a passwd set. vncpasswd only seems to set it for vncservers I launch manually. The one fired off by xrdp expects a different passwd. ~/sesman_justen_passwd:10, but I don’t know how to set that. Nuking it doesn’t do any good.
I end up getting the
VNC error – problem connecting
Yet it doesn’t appear necessarily the same cause as described in above posts, and in any case, it never seems to have been solved with any degree of certainty or satisfaction. I think, at this point, I’ll just use standard VNC, bypassing xrdp entirely.
I’d still have to upgrade to 17.x, so I have no experience with this yet. Thanks for posting all your findings though.
Hopefully I’ll get to upgrading to 17 in the next days, and maybe another user here can share his or her experiences as well to get xRDP running.
I did find this article describing your setup, but I really can’t see anything that would complicate things. I’m sure you stumbled upon this one as well, and they show a few workarounds that might be helpful.
Yeah, I saw that article. When it popped up in my search I was like, “AWESOME!” But no help there.
Get this. I have another brand new Win10 system. I installed Ubuntu 17.04, followed all the normal steps to get xrdp/xfce4 working, and it worked without a single problem. Perfectly. Simply. No mods required.
I have no clue why my other setup, described above, is puking on this. They both have Win10/Ubuntu 17.04 on their SSDs. I logged in to each, simultaneously, from a third client, and I can’t see any differences in configuration, setup, etc.
So… I am re-installing 17.04 on the… problem system. It’s only been out a few weeks! How could I have messed up the system that much in so little time? I know in my gut that somewhere I could fix this with changing a line or two, heck, maybe just flipping a bit!, I just don’t know where to look or what to change? /etc/xrdp matches between systems. I’ve gone over all the steps multiple times.
I’m trying a re-install first, from USB, keeping my stuff. Never done that before. I usually just nuke and start from scratch. If the re-install fails, I’ll wipe the linux partition and start clean.
I know how you feel – it happens to me at times as well.
I usually try to fix it, but if it’s just taking too much time, I’d go the nuke-toute as well.
You might want to compare the files and content in “/etc/init.d/”, I think Ubuntu 17 still uses that.
Maybe one or the other might not start or not start the same way when comparing both systems.
I tried a re-install, that didn’t work. So…
After nuking the OS and re-installing, my problem system now works fine. I wish I knew what was wrong, and what a clean re-install fixed. I can say that now, twice, I have followed the instructions on this page and it has worked with Ubuntu 17.04, when I did it immediately after the clean installation. One time it failed. I don’t know why. FWIW, both 17.04 installs were on an SSD alongside of Windows 10 Creators Update. 64-bit. Not UEFI, I’m using legacy BIOS (I’ve got some old system that don’t support UEFI).
Wish I could be more helpful for others that will probably encounter the same problem… all I can say is get this (xrdp/xfce4) procedure working ASAP, before installing other crap. Not sure if it matters, but for me… Install new OS, install byobu, apt-get update/upgrade/dist-upgrade, then do the above procedure for xrdp/xfce. Reboot. At this point I connected, and it worked. Re-installed all my other apps, and it still works.
As an engineer, I HATE not knowing the root cause for a problem, but the weather is too nice to spend time inside trying to debug stuff outside of my area of expertise. I am gonna sit by the pool and drink margaritas, and get sunburned.
haha, well, I agree with the “not knowing” part … but even more so with the “it’s sunny outside” – Glad you’ve got it up and running though.
great and simple to understand tnX man
And thanks for taking the time and effort to write a thank-you note – it’s much appreciated!
I installed Ubuntu 16.04 GNOME in HP Gen9 server and tried to login using RDP client from windows7. i followed the steps mentioned in this site and when i tried login im getting error after tcp connection established with 5910 password validation success and sending share flags, receiving server pixel fomat, name length, name, sending encodings.
Please suggest if any one faced similar issue.
I’m honestly a little confused about what the error is …?
Can you be more specific?
Neil was absolutely spot on …I was struggling with accessing without the XFCE4 -terminal . but once installed … magic … thanks
Thanks Hikmat for posting the fix!
thanks solved the problem I was having and did it first time,
thanks for taking the time to post a thank-you note and … glad yo hear this article was useful to you!
I upgraded two systems from 17.04 to 17.10. I had to make one simple change to get things to work. I found on another webpage about getting xrdp to work with 17.10.
In /etc/X11/Xwrapper.config change allowed_users=console to allowed_users=anybody
This works the same as before, firing up xfce4. However, 17.10 switches from Unity to Gnome by default, so xfce4 shouldn’t be necessary. I tried simply rolling out some of the changes adding xfce4, but this didn’t work. I think my problem is that since I upgraded from 17.04, I still have Unity installed, so I un-unrolled my changes. ;) I’m hesitant to purge Unity (sudo apt purge unity-session unity; sudo apt autoremove), seeing as I have working systems now. I would think with a clean install of 17.10, all one has to do is install xrdp.
thank you very much for the great info!
I’m not a daily Linux user, so your info is very welcome here.
As for Ubuntu using different windows managers; yep that can be a pain, and if I’d be in your shoes, I wouldn’t want to ruin a well working setup either.
Glad this article proved useful in some way though.
Hey, just wanted to say thanks for the excellent guide, worked great to get my Ubuntu 16.04 visible under Win 7!! I really appreciate your write-up.
One quick question… is the xfce4 desktop only for the remote connections? My server is currently headless so I can’t look for myself but I like the Unity desktop when I have to do extensive work on it. xfce4 is fine for remoting in but I want to keep Unity as the local desktop. Does this change both? If it does, is it possible to have xfce4 only for the remote connection?
thanks for the compliment – it’s much appreciated. Also glad to hear it was of good use to you as well.
xfce4 is indeed used for the remote connection. Weather this is the only desktop manager depends on your config of course, but the default desktop manager of Ubuntu (Unity) is or was not working with xrdp. This is not the only place where I have seen issue with this “new” desktop manager though, so xfce4 was a fallback option. I’m sure there are others that might work, I just haven’t tested any.
Hope this help, and for the upcoming weekend: Happy New Year!
I’ve used your tutorial several times to set up RDP to Ubuntu machines, and never had an issue. However, this last time, it just won’t work. I can ping the Ubuntu machine and I can ping out from the Ubuntu machine. RDP from Windows says that it can’t find the Ubuntu machine. When i run the command xfce4start, Ubuntu claims it’s already running. Systemctl says that xrdp is running. Have you run across this before?
Good morning Chris!
Nope, I have not run into this problem before.
A few things I’d check is;
1) Is there any firewall blocking certain traffic?
2) Did you try reaching the Ubuntu machine by using it’s IP address?
That’s where I’d start – but I assume you’ve gone through those steps already.
I nuked the VM and started over. It’s working now.
Nuking VM’s happens to me more often than I’d like to admit
Make sure that TCP port 3389 is open on the machine – this is the port RDP looks for
I’m work on ubuntu 16.04 x64 and win10 x64 , it’s work fine.
but when I close the windows remote app, and reconnect agagin, I get a now desktop. how to go back last login desktop.
That sounds about right – it will start a new session and not continue an existing session.
In the comments you’ll find a few solutions and/or links to solutions. For example this link, and this link.
Hope you dan find a fix …
Same issue along with its solution has been posted in previous comment. See this comment. Do read that comment first and then add what I am mentioning.
Further to add to that comment. Modify your /etc/xrdp/xrdp.ini file to include port=ask-1.
Let us see what happens during you connection:
When you remotely connect your machine for the first time, all ports are free. -1 tells xrdp to connect a new free port (port begins with 5910). Hence, it will connect to 5910. While connecting, you can see a grey box in the left corner which mentions which port your session is connecting to. Now, by default xrdp doesn’t ask you port and takes -1 (connects to new port) everytime. By modifying the file, you are taking control over which port you want to connect to. Hence, if you can remember the port of your previous session, during next login you can mention the same port and you will connect to your existing session.
Hope it helps!!
Thanks for the tip Ankit!
[…] to Setup A Ubuntu Remote Desktop How to use xRDP for remote access to Ubuntu 14.04 3 Tips for the mRemoteNG Remote Connections Manager Common External Tool Configurations MRemoteNG […]
i followed your tutorial, and it work! Great, thank you very much. I’m always able to login without problem.
But today, when i want to login i have following message: “xrdp_mm_process_login_response: login failed”
i’m sure my user/pass is correct, my internet connection is also fine. When i check the service status using:
sudo service xrdp status
* Checking status of Remote Desktop Protocol server xrdp [ OK ]
* Checking status of RDP Session Manager sesman [fail]
i try to uninstal xrdp and then re-install it again, but it still doesn’t work, the xrdp service is still not running. Please help, do you have any solution to this problem?
since I’m not using this that much anymore (no longer a need for it).
I did see that others run into this problem (independent of this article) and did find this (older) post at AskUbuntu (I assume you use Ubuntu).
(pay attention to the last line): startwm.sh
To make all these changes effective, restart xRDP as such: XRDP Service Restart
(funny note: they refer to my article with their screenshots – )
I am new to Lubuntu, I followed the above instructions and all went fine. Except I was stumped for a while on how to edit the startwm.sh file cos of ownership permissions.
But I found another posting to do a “sudo <editor> <filename>” where “editor” is the app you want to edit the text with = leafpad, and filename is = /etc/xrdp/startwm.sh
After that everything went well.
I am using LUBUNTU 16.04 now, since these above steps did not work with LUBUNTU 18.04.
Finaly thanks very much..
Thanks for the tip!
Others will find this to be useful as well!
I make it runs on Lubuntu 14.04 and was easy but tricky…
After update and install xrdp I created .xsession file.
Save it and change permisions to make executable
Finally restar xrdp and try to conect from windows remote desktop aplication
Awesome! Thanks for the tip Marton!
i followed the rules step by step.
but i get some errors, while connecting and i don’t know why. i’, using debian stretch
the error state that:
“sesman connect ok
sending login info to session manager, please wait
login successful for display 10
connection problem, giving up
is there any why this is not working??, i tried to use different rdp clients, it still like this.
Most likely this is caused by a communication issue, either over your network (I assume you work in your local network) or the window manager.
Check out these comments.
The setup worked and I can log in fine, but nothing populates on my desktop on the remote desktop. I am using Ubuntu 16 and Windows 10. Any suggestions of what to try
Are you seeing a blank (X) window, with no icons etc …? Then your window manager didn’t start.
If you mean that you’re looking at a regular desktop, as if you started a computer fresh; then this sound correct as by default it does not resume an existing session (see also this comment for suggestions).
Hope this helps
Using xrdp for connecting to a remote Xubuntu system has worked great in 14.04 and 16.04. It is failing if the ubuntu system is upgraded to 18.04. I’m getting “VNC error – problem connecting” then another line “some problem” Any help would be appreciated
unfortunately, I’m not using Ubuntu 18.04, but from what I have read so far, this may do the trick:
If you only get a blank screen or a blank X-Windows screen: the desktop manager did not start – check your config.
Thank You, worked for me.
Thanks Pratik, glad it works for you!
Very much appreciate the Thank-You note!
I was using xrdp for a while, Today I met with an error, and i cant figure out. I tried almost everything, but im sure im missing somethng very silly.
The error is password failed, error – problem connecting. I deleted all x session from /tmp/.x11 and /tmp.
have made max sessions to 10 in the sesman.ini.
==== Ubuntu 16 =======
The recent failure of xrdp in Ubuntu is a result of an update to xrdp. The file sesman.ini requires a change. (in my case it is found in /etc/xrdp/sesman.ini).
The change is to add two lines in the section under [Xvnc]. The additional lines are
By the way, I have yet to get xrdp to work will in Ubuntu 18. I’m still having to start a first session, kill the xfce4-session process associated with it, then start a session using the Xorg selection on my Windows system.
Thnx for your quick reply. I resolved it for now by Downgrading the XRDP and then Holding for further updates.
sudo apt-get install xrdp=0.6.1-2
sudo apt-mark hold xrdp
This solved my issue in which xrdp service stopped soon after logging in. The problem seems that the security type 2 (which is got selected by default) was not supported by the xvnc server.
Thanks guys for posting the fix here!
When i am executing below command getting an error.
sudo service xrdp restart
“It looks like xrdp is allready running,
if not delete the xrdp.pid file and try again”
due this error unable to login XRDP. please help on this issue
I’ve not encountered this issue.
Can you check with “ps” if xrdp is already running?
If so: kill that task and try again.
sudo rm /run/xrdp/xrdp.pid (this will delete the running process of xrdp)
sudo service xrdp restart (this will restart the xrdp service)
sudo service xrdp status (this should show both RDP server running good)
I am trying to install xrdp service on ubuntu 16.04 machine, i get the grey blank screen , whenever i do RDP to the machine.
there are several reasons why this can happen. Either you missed something in the steps, or your Windows manager is not xfce4, or one of the problems (and solutions) described in this Ubuntu Forum post.
Really helped me thank you!
Cool! Thanks Aaron for posting a Thank-You not – it is much appreciated!
I did many search and you’re aonly the one who solve my issue:;
Black screen after login
I haven’t used this in a while myself, but it sounds like the desktop manager did not start – you may have to check your config.
Another user had success by rebooting the PC (on which Ubuntu ran).
Somewhat of a newbie question here. I haven’t worked much with Linux in the past, so I am trying to edit the .xsession file, but I cannot save the file. I am not sure if there is something I am doing wrong.
FYI, the source file for .xsession here looks nothing like the code in your steps.
most likely you’ll need admin rights to save the file.
So when editing with nano for example:
you’d actually elevate access right by using:
As for the content of .xsession, I’m guessing per window manager this may be different.
Before things go sideways: try to “read” and get an idea of what the content may mean.
After much frustration with trying to use stock xrdp on Ubuntu 16.04 LTS, I have located this post:
which suggested to add a newer 0.9.1 version of xrdp from ppa:hermlnx/xrdp
Having done the above, the remote login was possible to accomplish without any problem.
Thanks EZ for posting this!
I’ve added you suggestion to the article! Thanks again!
I installed XRDP on Ubuntu 18.04, and it worked. But, I cannot open a terminal on remote desktop. If I try to open it, it opened on original computer not remote desktop.
And also if I open some software on remote desktop, such as Chrome browser, It is also opened on Ubuntu 18.04, it is not possible to use the software simultaneously on remote desktop.
I have not used xRDP for a while now, and I do not recall running into an issue like that either.
I do think though that Terminal not appearing on the remote desktop may be a security thing.
Not being able to run an independent session (eg. desktop and remote being different user sessions): You may want to read this article.
From that article:
The trick is quite simple. The XRDP server is using a bunch of script that runs when a user start a remote desktop connection to the XRDP Server. We will simply modify one of these script in order to have the .xsession file created just before the user log into the system.
With this xRDP should make config files on a user basis, but to be honest: I have not tested this yet and a q1uick look at that file, depending on your setup, may make it a little confusing.
Bro can you help me ..I am facing issue in this.
I haven’t been using xRDP for several years, but feel free to explain the issue here. Maybe one of the other visitors can chime in, or maybe I know the fix 😊
Any issues with support for Ubuntu 20.04.1 LTS?
Can’t seem to get a session to open.
I get the logon screen, then enter Username/PW and goes black and terminates.
Here’s what /var/log/xrdp-sesman.log says.. The only error I see is the Bolded-below. Failed to bind IPV6 and IPV4?
I’m unfortunately not an xRDP expert, or a Linux expert for that matter
(maybe another user can chime in here)
I did find this bug report (still open!) and this potential fix that may be helpful.
Apologies for not being able to assist in a better way.
Happy New Year!
Thanks…and Happy New Year to you as well!!!
So interestingly…I installed Ubuntu via WSL and was able to get it to work.
My other version is an Xubuntu version (not sure if that matters) and running on an older Laptop that I am using as a Syslog server. (Running LOGalyze)
I will keep digging and see if I can figure it out.
Thank you as well – and if you find something interesting, then please feel free to share