How to Use the Real Windows Remote Destop in Ubuntu – geekyprojects.com

How to Use the Real Windows Remote Destop in Ubuntu

To many IT professionals it is imperative to be able to connect remotely to their work via VPN and if you connect by VPN, the next likely step is to connect using Remote Desktop. Many of us however, prefer to use Ubuntu at home and in most workplaces almost all machines are Windows based; that is where the problem comes in. One big obstacle in finding the solution is the apparent lack of a true compatible Windows Remote Desktop alternative in Ubuntu, and the scarcity of information on the web about this topic. This myth becomes even more believable when users find that Ubuntu has labeled VNC as “Remote Desktop Viewer”; a total nonsense. VNC is not compatible with Windows Remote Desktop, but “rdesktop” is and it comes already pre-installed in Ubuntu. I have also written another article that explains how to do the inverse:  Connecting from Windows to Ubuntu using remote desktop.

How to Use Rdesktop

Rdesktop is a command line application. To use it easily and effectively we have to create a custom command line and save it as an executable shortcut on Ubuntu’s desktop.

Right click on the Desktop and click on “Create Document” and “Empty File“.

Right click on your empty test file and rename it whatever you wish.

Then, open your new empty text file and paste the following line inside it:

rdesktop -g 1152x864 -r disk:home=/home/username -r clipboard:CLIPBOARD -r sound:off -x l -P 192.168.1.200 -u "administrator@domain.local" -p password

I have highlighted in red the parts of the line that need to be changed.

 

Command Line Explained by Parts

Changing the Size of the Remote Desktop Screen

To change the size you need to change the resolution; the first part of the line highlighted in red is this resolution, play with it until you get to the desired size. Some of the most common sizes are:

640X480
800X600
1024×768
1152×864

Enter IP of Remote Computer

Change the sample IP “192.168.1.200” to the IP of the remote computer or domain you wish to connect to.

Enter Username of Remote Computer and Domain Name

If you are trying to connect to a Windows Domain, you have to enter your username in that domain and make sure you specify the domain name as part of the username. Take a look at our example. If our username was “Administrator” and our domain name was “domain” then our username will be “administrator@domain.local“. Similarly, if our username was “jdoe” and our domain name was “mycompany” then our username was “jdoe@mycompany.local“. If your computer is not on a domain or it resides inside your same network,  just enter your username.

Enter Password

Just replace the last part of the command line with your password. You can leave this part out if you are concerned about having your network password on a text file that anybody can click. This however, makes it a lot easier, since you will be logged in automatically just by clicking the icon on your desktop, all in one step.

Make Shortcut Executable

To make the shortcut executable, right click on it and select “Properties“, then on the properties windows, click on the “Permissions” tab and check “Allow executing file as a program“.

And finally we will be able to connect to any Windows machine using its native Remote Desktop

12 comments:

  1. Kjell, 5. August 2011, 4:41

    You can just click “Save as” in the GUI to save your settings for future use.

    And you can of course have several saved settings that you can easily just pick in the list in the GUI when you need to connect.

    Which basically means that you handle all your RDC connections within the GUI.

     
  2. Pablo Garcia, 4. August 2011, 20:31

    “Seems” but its not at all, all you have to do is make a shortcut on Ubuntu’s desktop and paste the line I am giving you then change the IP and the username and password. Thats all, at the end it will save you time and steps.

     
  3. Kjell, 4. August 2011, 9:52

    Seems a bit complicated creating commandline parameters and a shortcut when you can just fire up “Terminal Server Client”, which will give you a nice GUI for the very same rdesktop connection.

     
  4. Dave, 22. June 2011, 9:10

    AWESOME!!!!
    Very surprised to see that this worked, and yet the GUI didn’t!

     
  5. Pablo Garcia, 30. April 2011, 15:57

    Are you connecting to a remote domain? or Workgroup?
    Are you sure you have the correct username and password? are you entering @xxxxxxx.local after the username, with the xxxxx being the name of your remote domain?

     
  6. orland, 29. April 2011, 21:54

    I get this error:

    ERROR: 192.168.0.41: unable to connect

    the VPN is connected, and everything seems to be fine,… but i cant connect…

    do i have a way to test my VPN connection?

    maybe the mistake is in there… even thought it says that im connected..

    thanks in advance…

    :)

     
  7. orland, 29. April 2011, 21:49

    i’ve been looking for something like this for so long…

    but even though i followed each step, i couldnt make it work…

    I dont know why,… but when i want to run that text file, it opens the console and then closes it…

    and it’s all…

    i configured my VPN following your instructions, and everything was ok, but when i wanted to create this text file, nothing happens…

    i dont know what to do…

    this is my text file:

    rdesktop -g 800X600 -r disk:home=/home/username -r clipboard:CLIPBOARD -r sound:off -x l -P 192.168.0.41 -u “myWorkComputerUserName@myworkDomain.local” -p myPassword

    one question… should i replace the: “disk:home=/home/username” with my userName?

    i did it, and still doesnt work…

    please,…. some help!!

    thanks!

     
  8. John Semour, 25. March 2011, 6:50

    I have to say that was a fantastic article. I’ve been trying to connect to my work computer for weeks and have been pulling my hair out. Tried your method and I was logged with no problems.

    Personally I thought it was much easier that setting up a gui.

    Thanks!

     
  9. Simon, 16. March 2011, 10:23

    These are great little tutorial that I wish I had found earlier. I have a situation where I have a vpn set up on my machine, but I don’t have a terminal that I want to remotely connect into, but merely just want to use the windows network server to access files on my laptop. How do you do that. From looking around it seems as though samba is what you need, but I just cannot get it to work. A little tutorial like these could help? Thanks for sharing.

     
  10. Max, 15. March 2011, 22:20

    You’re right, its not a lot. I’m just a fan of Remmina and thought I’d recommend it.

    Remmina actually depends on rdesktop (pre .7 release) and its fork freeRDP (source: http://goo.gl/Bw1JL). Performance should be on par, if not better. My favorite feature is it allows scaling w/ RDP. I can’t even find a Windows RDP client that does that (although, I didn’t look very hard).

    Thanks for writing this blog, I’ve found some useful stuff on it already.

     
  11. Pablo Garcia, 15. March 2011, 21:33

    It is not long at all, it just seems that way because I describe the process is detail. Basically the whole process can be condensed in two steps:

    1) Copy the line I am already giving you to a text file and change the parts marked in red to match your settings.
    2) Save the file and mark is as executable.

    Thats all! rdesktop comes already intalled with Ubuntu, so you do not even have to do that, it can’t be simpler and REMINA is won’t be included in Ubuntu 11.04 they discarded it due to some glitches.

     
  12. Max, 15. March 2011, 14:44

    This seems like a whole lot of work to get RDP working on ubuntu/linux. Remmina is a GTK client that does RDP, VNC, NX, XDMCP and SSH.

    I use it almost everyday to connect to my Windows PC @ work.

    Also, Remmina will be the default remote desktop client in Ubuntu 11.04: http://goo.gl/hokMF

    http://remmina.sourceforge.net/

    As an alternative, you can also try Terminal Service Client: http://sf.net/projects/tsclient/

     

Write a comment:


You will receive an email when your comment is answered

Time limit is exhausted. Please reload the CAPTCHA.

.