Remote Desktop Connection against Ubuntu 10.10

Hello World,

I know I do not post much lately but I have really a lot of work to do. I’m working for different customers and on totally different projects.  Not easy to keep on. 

So, today, I’ll post something a little bit different.  I’ll quickly explain how to make a remote desktop connection from a Windows computer to an Ubuntu machine.  There are plenty of solution that allows you to do that.  You probably know VNC, tightVNC or the free version of the NoMachine NX Server.  The NX Server software is quite popular because it can handle multiple protocol and installation is really not diffcult.

A piece of software that I like to use is the open source implementation of  remote desktop called Xrdp .  Xrdp does not really make a remote desktop connection. It will rather use the VNC technology to present to the user a X Windows Desktop to the User.  I like the idea of going to a Windows workstation and being able to make a remote desktop connection to the Ubuntu servers available within the infrastructure without performing any additional software installation (on the windows side).   However, you still need to install the Xrdp software on your Ubuntu machine. The latest version of Ubuntu (I’m talking about Ubuntu 10.10) makes the installation of this piece of software really easy.  

Installing Xrdp

In previous version of Ubuntu (or other linux distribution), you needed to perform additional configuration to have Xrdp working.  Some version had issues with the VNCServer and had to be replaced by the tightVncserver.  Now, you can simply download the Xrdp package and make remote desktop connection out of the box.  This is a real improvement because this will probably help people in implementing some linux machines on their network. Using Xrdp, you can easily manage from one management workstation (probably a Windows box) linux and Windows servers.  Isn’t it cool ?

To install Xrdp on your Ubuntu machine (the easy way), perform the following actions

  • I’m assuming that you have already a computer running Ubuntu 10.10 Operating System and that you have an internet connection
  • Open the Ubuntu Software Center (by clicking the Ubuntu Menu on the top left >Select Ubuntu Center Software)
  • In the Search box, you simply type Xrdp and you will get a list of software that matches your query
  • In my screenshot, the first line matches my query.  Click on the button Install  r

Click to Enlarge 

  • wait that the package install

  

Click to Enlarge

  • When it’s done, you can click on more information to see which version of the package has been downloaded and installed.  When the process is completed, you can simply close the Ubuntu Software Center and you are done

 

As you can see, that is really easy.  At this point, you do not need to configure anything.  Your Linux machine is ready to accept remote desktop connection from any windows machines. You can try to perform a remote desktop connection from your Windows XP or Windows Vista to your Linux machine.

Note : If you are using Windows 7, please read further and check the section Windows 7 – The Special Case

Testing your Xrdp Server

You simply start your mstsc.exe (or remote desktop connection software) and specify the name (or ip address of your linux box)

 

When you perform the connection, you will see the following black screen asking you for some credentials

 

Simply enter you user account and password. You will see a dialog box displaying some information about the connection being made.

Don’t do anything ! the dialog box will close automatically and you will be presented with the Linux Desktop inside your remote desktop client

 

Windows 7 – The Special Case

If you are using Windows 7, you might encounter the following issue….

When lauching your remote desktop client, you will get to the Xrdp login Screen

 

 BUT  as soon as you click on Ok  an ugly message will popup and your remote desktop connection will end up.  The message will be something like “Because of a protocol error, this session will be disconnected. Please try connecting …again”.

The good news is that there is a easy fix.  The Xrdp package currently available in the Ubuntu Software repository is based on the version 0.4.2 something.  If you want to be able to remote desktop from any Windows machines including Windows 7, you will need to download the Xrdp package versio 0.5. something.  The package can be downloaded here. When the package is downloaded to your computer, the correct application will open automatically and will perform the installation. 

To check that the correct version has been installed, you can open the Ubuntu Software Center and search for Xrdp package.  If you click on the More Info  button, you can ensure that the version of the package is changed to 0.5.x.x 

I would recommend to restart your linux machine. This will ensure that the services needed by the Xrdp will be updated and will be running after the reboot.  After that, you can try to perform your remote desktop connection from your Windows 7  and the remote connection will be functional

 

Final Words 

By using  built-in remote desktop client and with very few changes on the Linux machines, you can see that it’s possible to have a quite good coexistence between Windows and Linux computers.  Let’s hope that the release of the Service Pack 1 of Windows 7 won’t break the functionality.

That’s it for this post. Till next time

See ya

26 thoughts on “Remote Desktop Connection against Ubuntu 10.10

  1. I have tried it according to your suggestion. It is good that the “protocol error” is eliminated by updating xrpd, but another error occurs while remote controlling the ubuntu from win7.
    The message is shown as:

    You Remote Desktop session has ended.
    The connection to the remote computer was lost, possibly due to network connectivity problems. Try connecting to the remote computer again. If the problem continues, contact your network administrator or technical support.

    Do you have any idea about that? I don’t think it is a network problem, because while I ping the ubuntu computer, it is always active.

  2. Hello,

    are you trying to connect to ubuntu 10.10 ?
    Do you have a firewall on Ubuntu Box. if yes, can you check that the remote desktop connections are authorized ?
    Which vnc versoin are you running on the ubuntu box (VNCSERVER,TightVNC,..) ?

    I had some issues in the past to connect to ubuntu from windows boxes.

    One of the problem was related to the VNC software version. I had to install tightvnc to have xrdp working.
    One of the way to solve the issue was to check and configure the remote desktop settings (on the ubuntu box). Go to System->Preferences->Desktop Sharing (or similar) and check the options there. You might need to enable some settings there. With Ubuntu 10.10 and xrpd 5.xx, it was not necessary.. you can give it a try.

    I’m currently abroad but if you can wait one or two days, i’ll try to find back the solution I’ve used to fix this problem

    Cheers

  3. I followed the steps outlined above with no success. Do both computers have to be on the same network? or can you access the remote box over the internet? I’m trying to do the latter, so perhaps that is my problem. I have had bad luck with regular vnc connections to my ubuntu machine running fairly slowly (poor screen refresh rates and screen aberrations), so this seems like it would be an excellent option. I simply cannot make my windows 7 machine connect to my ubuntu machine with mstsc. I’ve gone so far as to update my C:\Windows\System32\drivers\etc\hosts file with my ubuntu machines ip address and domain name, but no luck.
    Another strange thing: I can connect to my machine using putty with nothing but the ip address, however when I attempt to ping the same ip from my windows machine I get no response… could this be a firewall issue on my windows machine? or on my ubuntu machine? or both? Any help would be greatly appreciated!

  4. Thnx for the post,
    I tried it with Windows 7, and it is working BUT when I connect to my ubuntu it is like a new session, I do not see my already opened programs on my ubuntu such as firefox and Eclipse. Should I make any change so that I can see the exact same session, as I locked my ubuntu …

    thnx

  5. Hi There,

    no the computers do not need to be on the same network….as long as you have a valid routing in place.
    What I would do first is to check if the XRDP software is configured correctly by trying to connect to the machine from the local network (not from internet access)
    Then I would check that the required ports are opened on the Ubuntu machine (and probably the router in between you on the internet and your ubuntu machine)
    How do you grant access to the machines from internet…. are they directly accessible ? are they behind a modem/routerr ? If this is the case, you have to open the appropriate ports to be able to access your ubuntu machine remotely

    Hope this help
    See ya

  6. Hello there,

    Hmmm, I have to check this. Indeed, you might need to perform some configuration on the ubuntu machine to connect to the currently logged user. I would guess that you might need to configure some of the options in the Remote Desktop (Go to System->Preferences->Desktop Sharing (or similar) and check the options there. You might need to enable some settings there). Another option is when the Xrdp login box is presented to you, you have multiple ways to connect…..

    I’ll be making a quick test 2morrow and I hope I’ll be able to come back to you and answer your question…… : -p

    Till then

    See ya

  7. Thanks for your effort and help.
    In the meantime I also try to play with the settings as you suggested,
    Thanks for the help man !

    Jaymz

  8. Hello James,

    When you perform a rdp session from your windows client, the XRDP login box is presented. If you select the option console, you will peform basically a vnc connection and you will be able to see the desktop of the currently logged on user on the machine. You need to know the vnc password that you have set during your setup. You will need to configure the Remote Desktop settings (Go to System->Preferences->Remote Desktop). You have to enable remote desktop sharing and configure the security settings.

    Give it a try. and let me know if this is working for you….. I’ve encountered issues using the console option. I can see my desktop but I cannot interact with it…I’ll have to investigate a little bit more

    UPDATE: After some tests, it seems indeed that’s not possible to connect to the console using XRDP…You will have to use other solution (maybe FreeNX).

    thank James for this interesting question

    see ya

  9. The necessary ports are all open on my Ubuntu machine, and I have a public IP address assigned to the machine as well. I’ll be able to test xrdp from the same network as you suggest over the weekend. I’ll post my results back as soon as I have something, thanks again for the help.

    Hilezkor

  10. I am using the xrdp for remote access of an Ubuntu 10.10 Dell workstation from a Win XP machine but I have the following problem:
    Some applications (including firefox ) hang and they have to be restarted when they try to open pop-up windows. The same programs work perfectly when I use them locally. In addition in remote mode it seems that my nVidia card is not working although a have configured the system and everything appears to work fine locally. Any ideas?

    Thanks in advance.

    Vagb

  11. Hi there,

    difficult to say given that I do not encounter these issues. Can you check the version of Xrdp your are running…? you should have version 0.5xx-cvs4 or later (there is a version cvs6 in a debian repository). Maybe you have to check your RDP settings regarding the display or rendering when using XRDP. On the ubuntu machine, by editing xrdp.in or sesman.in startwm.shi do not remember which one ), you might be able to change the display settings that needs to be predented to you

    I hope this help

  12. Hi James,

    After some tests and research, it seems that’s not possible to make a console connection. The xrdp will always use a vnc display > than 0. After some research, you should use the X11VNC package to be able to perform console connection. using a vnc client, you should be able to test the X11VNC and see that you can indeed connect to the console. Now the next step would be to modify the xrdp config files (if possible, I do not know yet) to make use of X11vnc. I might post a dirty workaround to still have a console connection by using Xrdp….

    hope this help…

  13. Hi – I have tried everything but I still can not get ubuntu 10.10 to connect to my windows 7 machine on different network. It works fine on local and the xrdp connects but over the network i.e any network i just can not seem to connect!!!

    Thanks

  14. Hi there,

    Can you ping your ubuntu machine from the remote network ? is Routing in place ? Normally, I have test a connection from Internet into my ubuntu machine and he just went through. Do you have a specific error message ?

  15. I did try to ping but the request just times out. Remote network connection do not seem to work I have even checked the firewall ports enable everything and still it fails.

    Running windows 7 trying to connect to Ubuntu 10.10 with xrdp installed.

    its works perfect on local network….what could be the issue with the remote one.

    The error message i get is on the windows 7 machine via remote desktop is:

    Remote Desktop cant connecto to the remote computer for one of these reasons:

    Remote access to the server is not enabled
    THe remote computers is turned off
    The remote computer is not avaiable on the network

    Make sure the remote computer is turned on and connected to the netwrok and that remote access is enabled

    Everything is enabled????

  16. Routing or Firewall issue.

    From which external network are you trying to connect (Internet or other network subnet). If you are trying to connect from internet, you need to publish your ubuntu machine on the internet (NATing, port forwarding….)

    Provide more information about your network . This might help us in providing some tips and tricks to fix your problem

    best regards

  17. Want to control your Ubuntu computer from a Windows computer? Don’t worry; it’s more than possible. You’ll just need to install a VNC client, such as TightVNC, on your Windows computer. Then you can connect to your Ubuntu machine just by entering your IP address. Convert videos Ubuntu :

  18. We know that VNC is working but we just want to use existing software already present on Windows Operating System. So, XRDP is just the way to go

    Cheers

  19. Hello,

    Is it possible to disable desktop background wallpaper when you connect to ubuntu with xrdp?

  20. Is it possible to disable the showing of desktop backround wallpaper of the remote host when you connect to it with xrdp?

  21. It might be possible to disable this by configuring your ubuntu machine. If you go to System menu, select Preferences and click on Remote Desktop, a windows box will open. You will have 2 tabs : General and Advanced. If you click on advanced, there is an option to disable the wallpaper. Give it a try and let me know if this is working… I cannot test it because I’m travelling

    See ya

  22. Try connecting using the option named console, and you need to use the vnc password you have set in your machine, This will bring out the actual session you have opened in your box.

    Try and let me know if any issues.

    Thanks
    Gokul.

Leave a Reply