How to remotely connect to Ubuntu 14.04 from Windows 7/8

[UPDATE]: If you are trying to remotely connect to your Ubuntu box from Windows computer, then I highly recommend X2Go, which enables you to access a graphical desktop over a low bandwidth (or high bandwidth) connection. It works much better than other remote control programs. Check my post for more information.


Recently I am working on a research project that requires me to use Ubuntu, so I installed Ubuntu 14.04, the LTS (Long Time Support) version. But this Ubuntu computer is in a different building from my office where my development Window 7 computer is located, so I need to remotely connect to the Ubuntu computer from my Windows computer. After some searching around, I came across to this YouTube video showing how to the exact thing I need.

If you are not able to watch the video for any reason, here are the steps you need to follow to remotely connect to Ubuntu 14.04 from Windows 7/8:

1. Install MATE desktop environment in Ubuntu 14.04 computer

Why do you need to install this? Well, the built-in Unity 3D environment does not work in remote desktop connection, so you will get a blank screen if you remotely connect to Ubuntu with Unity 3D. MATE is a 2D environment and it works well with remote desktop connection. If you don’t want to use MATE, you can use other 2D desktop environment, such as Lubuntu, Xubuntu, etc.

To install MATE in Ubuntu 14.04, follow the official installation guide:

2. Install xrdp package in Ubuntu 14.04 by using the following command (or use Ubuntu Software Center):
sudo apt-get install xrdp

3. In your home directory, create a file called “.xsession” (without the quote marks), then add this line in it:

This line of code tells Ubuntu to switch to MATE 2D environment instead of the built-in Unity when remotely connected. The file must be in the home directory of the user who is trying to remotely connect to Ubuntu.

4. Restart xrdp service
sudo service xrdp restart

Now you will be able to remotely connect to Ubuntu 14.04 from Windows 7/8 by using Remote Desktop Connection.


By default, xrdp will create a new session whenever a remote connection is made, this can create problem when you disconnect and reconnect, because you will lose your work in the previous session. To avoid this, you will need to modify the initialization file of xrdp. The file is called xrdp.ini located at /etc/xrdp/ folder. Under “xrdp1” section in the file, you can specify a static port number, such as 5914, or change it to “ask-1” which will prompt you to enter the port number when you try to connect. If you use the second option, then you will need to remember the previous port number when you try to reconnect in order to connect to the same session.

Hope this helps.

Leave a Reply

4 Comment threads
8 Thread replies
Most reacted comment
Hottest comment thread
5 Comment authors
ShadowHamidJeffreyCarlosThomas Recent comment authors
newest oldest most voted
Notify of

I used this method which did allow me to connect with the Wondows RDP in Win7. However, all I see is a blank screen so I must have missed something.

Thanks for the info.


Thank you very much, followed the instructions and got it running in no time.
Problem is I cannot do too many things I need to do, like install programs or mount drives… So how do I get remote sudo access now?

Thank you for the info and in advance


many thanks for the simple and very useful tutorial, I went trough the steps and all worked like a charm.

– hamid



I use Linux Mint 17.1 Mate x64 and your tutorial works, but I have one failure.
After I connect per RPD from Windows 7 or a ThinClient, I lost the connection to Linux Mint after random time or if I run applications like evolution. 🙁

Close Bitnami banner