How to connect Remote desktop Connection From Window 7/8 to Ubuntu 14.04

Remote Desktop Connection of Ubuntu 14.04
Many times we need to operate computer remotely in a network, it is easy when both systems have same OS example Windows to Windows or Linux to Linux .But what happen if you want to access a Ubuntu running machine remotely by windows pc via RDP(remote desktop connection).By default Linux doesn’t support RDP connection but it is possible with some third party tool. For creating a RDP connection  with ubuntu 14.04 follow the given below steps.
Requirements:
  • Xrdp install on ubuntu 14.04
  • Ubuntu 14.04 desktop with administrative privileges
  • Mate an alternative 2D desktop environment install from Mint.
  • Window 7 /8
  • Internet connection
Installation:
Step 1:  First you have to install Mate Desktop environment in your Ubuntu Machine because the popular unity which is the default shell for GNOME 3 environment used by Ubuntu 14.04  is not  accessible form XRDP, it shows black screen in ubuntu 14.04.You can also visit their site http://mate-desktop.org/ , if you wish to install it in other than ubuntu. Run the following command in terminal to add Mate repositrory.
Add Repository
sudo add-apt-repository "deb http://repo.mate-desktop.org/archive/1.8/ubuntu trusty main"

or alternatively using the text editor of your choice add the following to /etc/apt/sources.list:
deb http://repo.mate-desktop.org/archive/1.8/ubuntu trusty main
Install MATE 1.8

sudo apt-get update
# This will install the base packages required for a minimal MATE desktop
sudo apt-get install mate-desktop-environment mate-notification-daemon
# It will install mate desktop environment


C:\Users\Raj\Desktop\step1.PNG

Step 2: Install third party application XRDP in Ubuntu .For doing this run following command
Install XRDP
sudo apt-get install xrdp

Step 3: Now, we have to configure XRDP so that Windows can get Ubutnu remote desktop connection. For doing this we have to create a .xession file under home directory .Make sure the .xsession file is in your home directory because without it you can’t get the remote session .Each person you want to have remote desktop to your Ubuntu 14.04 desktop will need an .xsession file in their home directory.
Creating .Xession file
echo mate-session > ~/.xsession
# Command to create .xession file with text mate-session
nano .xession
# To check whether the file created or not
# To get exit from nano press ctrl+x


C:\Users\Raj\Desktop\stepo 2.PNG

Step 3: Restart the XRDP service.
Sudo service xrdp restart
#to restart xrdp service

Step4:  To Connect your Windows machine with Ubutnu machine. First you should know the IP address of your Ubuntu machine, type ifconfig to get an  IP address.
Ifconfig
# to see your ip address

C:\Users\Raj\Desktop\step3.PNG
Step 5: Go to your Windows machine and run remote desktop connection tool with the IP address of your Ubuntu machine. Here, our ubuntu machine IP address is 192.168.5.150.
C:\Users\Raj\Desktop\step 4.PNG

Step 6: Here in RDP window you will ask for your Ubuntu credentials. Just give your username and password associated with your ubuntu account.
C:\Users\Raj\Desktop\satep 6.PNG

Step 7: You might get black window at start-up of your remote connection but wait for some seconds and a miracle will happen. Now, we hope you got your Ubuntu remote desktop but it will be different in interface wise because you install mate for your remote session. Moreover, the work or task you have do in remote session  is totally independent from your physical Ubuntu machine. Here, screenshots given is one of our Ubuntu machine and another remote session of that Ubuntu machine. Unlike Windows in which at one only one person can perform task on one machine either remotely or physically.  

C:\Users\Raj\Desktop\step9.PNG

Step 8: In your remote session which taken from Windows , if you end that session your all open file like word file or any other will get end and you lose your data if you hadn’t save that .So, to get same session when you come back and connect with your Ubuntu run following command.

Sudo  nano /etc/xrdp/xrdp.ini
# configure xrdp


C:\Users\Raj\Desktop\step10.PNG

Step 9: Now, a nano editor will open  in which you have to look for xrdp1 and change port=-1 to port=ask-1 and press crtl +x to exit it will ask you for save press y and then press enter. Again go to windows and run RDP to connect with the Ubuntu. This time in credentials box one more option will appear that is port.

C:\Users\Raj\Desktop\step11.PNG

Step 10: Once you fill your username and password, press ok  and a connection log will appear for very short time but you have to note down the tcp port number in our case it is 5913. You can look it in to given screenshot. But it might be different in your case.

C:\Users\Raj\Desktop\step12.PNG

Step 11: If you want to connect the same session every time then use this port number in credential box port column to connect with your Ubuntu machine.In this way you will never lost your work.

C:\Users\Raj\Desktop\step123.PNG

C:\Users\Raj\Desktop\Untitled.png

If you need any help just write down in the comment box or email us. You can also suggest the topics on which you want some tutorials.  

Post a Comment