≡ Menu

Linux Remote Desktop For Controlling Windows XP / Vista / Server 2003 ( rdesktop )

I am responsible for couple of MS-Windows servers and Windows XP/Vista/7 workstations too. When I work from home, I need a way to get into Windows XP/2000/Vista/2003/2008/7/Vista operating systems for work.

I have Debian Linux at home, I needed a way to login into Microsoft windows desktop from Linux OS. Many of us working at tech support use rdesktop to connect to customers’ MS-Windows systems.

Fig.01: rdesktop login window

Fig.01: rdesktop login window

Especially it is very useful to configure Outlook or something else when customers do not understand how to configure or troubleshoot problem. This is the best way to fix a problem.

Say Hello To rdesktop

Fortunately, Linux has rdesktop utility. It is a client for remote desktop protocol (RDP), used in a number of Microsoft products including Windows NT Terminal Server, Windows 2000 Server, Windows XP and Windows 2003 / 2008 Server. You do not need to install VNC server. All you need is rdesktop client on Linux or BSD workstation.

Install rdesktop

Type the following command as root user:

# apt-get install rdesktop

To connect to MS-Windows systems from Linux, type the following command at a shell prompt (connect to Windows server called mw2sn100.mycorp.com)

$ rdesktop mw2sn100.mycorp.com

Or connect to windows XP/Vista workstation having IP

$ rdesktop

Fig.01: rdesktop in action

Fig.01: rdesktop in action

Please note that you must enable remote desktop connection under MS0Windows operating systems; otherwise it will not work. Turn on remote desktop under MS-Windows operating systems:

  • Go to MS-Windows desktop
  • Right Click on My Computer
  • Select properties
  • Select Remote tab
  • Enable Remote desktop.
  • Save the changes.

Make sure enterprise firewall allows incoming connection on TCP port 3389. rdesktop supports many other options, type the following command to read the man page of rdesktop or visit project website for more information.
man rdesktop

Share this on:
{ 100 comments… add one }
  • seryioSeptember 12, 2007, 12:02 am

    i have a problem with this.
    I use an old laptop connected to a tv, but when i control it with another laptop the ati control panes is disabled.
    How can i fix it

  • Prasanth Kumar DiddiSeptember 12, 2007, 7:21 pm

    Hi Vivek,

    I use the ‘rdesktop’ and the problem with it is the colors!!

    I think it shows up with 256colors! How can i change the resolution?

    Prasanth Kumar Diddi.

    • anil singh ranaSeptember 25, 2011, 1:26 pm

      used advanced option on client computer remote desktop conntion

  • wilSeptember 22, 2007, 5:05 pm

    Prasanth. To sort out colours/resolution read up on rdesktop switches: -g for resolution and -a for colours.

    (obviously set to lowest so that rdesktop will work on older systems)

  • gundulSeptember 29, 2007, 4:00 pm


    how many user / client can connect to rdesktop server ?

    i have already setup rdesktop server and client, but only 3 client can connect

    my server is windows xp pro, my client use freebsd with rdesktop installed.

    thank you

  • e.vindenOctober 15, 2007, 5:09 pm

    thanks for the tip .. easy solution since my monitor is about to break down and i could not get VNC to work due to java i believe

  • ashishDecember 5, 2007, 2:29 pm

    i think the website is doing a great job.

  • JamesJanuary 7, 2008, 10:43 pm

    Is there a way to make this work with Vista Home? My parents are driving me nuts with Vista questions. I have Ubuntu Gutsy running. Any advice would be appreciated. Thanks!

  • Dale KaupJanuary 8, 2008, 3:52 am

    I used VNC to bring data home nightly for Quickbooks usually I would just work on it via VNC. IN the old days when I used PCAnywhere I had to work on the dat a file at home then send it back in the morning. VNC rocks… my fav software ever.


  • rslinkmanJanuary 16, 2008, 6:54 pm

    remove their vista and install pclinuxos.
    that cures all vista issues.

  • mc2nvJanuary 26, 2008, 4:58 am

    to the vista problem, remote desktop on Vista uses encryption TSL 1.0, you might tryin using the E switch other than that your SOL

  • mc2nvJanuary 26, 2008, 5:00 am

    typo TSL * TLS

    submit box says linux lol

  • LuqmanFebruary 1, 2008, 8:32 pm

    Great! This is what I’ve been looking for . .

    For full screen:

    rdesktop -f ip-address

  • Jeff GarofaloFebruary 3, 2008, 4:03 pm

    I’m new to linux and using ubuntu. My biggest problem so far had been that I couldn’t access the virtual desktop at the high school I teach at. The guide worked like a charm, and now I don’t have to cart an external hard drive back and forth. Thank you!

  • StewMarch 12, 2008, 9:03 pm

    Didn’t see any thing mentioned about how secure password transmission is.. Is the password transmitted clear text or encrypted? Is it secure?

  • Kendric BeacheyMarch 13, 2008, 3:58 pm

    Thanks for this simple but very helpful guide. Shortly after getting this going, I found Ubuntu (probably gnome, actually) provided a nice gui panel for getting rdesktop started, with handy options for all the command line parameters I wanted. In the main Applications menu, it was under Internet, called Terminal Server Client.

  • ashishMarch 17, 2008, 9:50 pm


    you cannot do remote desktop to a vista home system as microsoft does not ship vista home versions with the rdp protocol.

    only outgoing connections are allowed with vista home.

    • aliFebruary 20, 2011, 10:15 pm

      use vnc google tinyvnc

      • anil singh ranaSeptember 25, 2011, 1:24 pm


        install rpm to vnc for linux and
        work on it

  • oslMarch 18, 2008, 10:40 am

    Thanks for quick how-to.
    It saved me lots of time and running from one room to another :D

  • nickMarch 18, 2008, 11:42 am

    brilliant, cant thank you enough, works like a dream!

  • BarryMarch 25, 2008, 7:21 pm

    James (#7) asked is there a way to enable Remote Desktop for Vista home…

    Take a look at the followng blog:


    or search for termsvr.zip. This solution worked very well for me and did not require VNC.

    Good luck!


  • RichardMay 30, 2008, 1:35 pm

    How would I get a script with rdesktop to run at startup of a linux box?

    I.E. once linux loads, it runs the script that loads rdesktop.

    I am running Synnex on X Windows if that helps.

  • KristianJune 15, 2008, 8:01 pm

    hi, when I access the server all I get is:
    Autoselected keyboard map da

    I used rdesktop -u USERNAME -p PASSWORD IP to get this far…

    remote desktop is enabled on the server

  • ice crashSeptember 2, 2008, 11:16 pm

    another question:

    [root@vs-1399 ~]# rdesktop -u tmp -0
    Autoselected keyboard map en-us
    ERROR: Failed to open display:

    i`m using a terminat thought putty without using a display mode or something.
    there is some way to connect from linux, to thee rdp just like your using the telnet ? i mean that i whant to connect to the rdp just typing the username and password withought using a display mode
    just connect to rdp and take the commands like your in the Command Prompt?

  • TroubledSeptember 11, 2008, 10:11 pm

    I’m trying to provide a way to enable about 14,000 employees, who are all using a Linux/Firefox solution at their remote facilities, to access a web-based application that is only supported on a Windows/IE 6.0 or greater configuration. It sounds like rdesktop may be a solution but I’m concerned as to its scalability and security. Can anyone share any insight?

  • MartynOctober 13, 2008, 7:31 pm

    I have a problem in that when I connect to a vista pc (rdc is enabled) it just says “Autoselected keyboard map en-gb” then nothing. Can someone please help with this as I need it up and running as soon as possible.

  • ToranDecember 3, 2008, 11:13 am

    is there any application for linux that enables tab based rdp sessions? like remote desktops for windows or VisionApp’s application?

  • VinogopiDecember 22, 2008, 12:18 pm

    im using linux system if i take the xp client in a remote desktop the display is not clear in my system how can i solve this ,,,,,,

  • jonathanJanuary 6, 2009, 12:05 pm

    Once connected – my windows server appears in a small window
    Q: How do I enlarge that window – F10 is not available


    • philJune 14, 2011, 8:15 pm

      rdesktop -g 1024×768 or whatever resolution you require

      • Surjit ThakurAugust 27, 2011, 4:51 am

        Hi this is good to enlarge the screen by rdesktop -g 1024×768 but this enlarge only horizontally not vertically

        How to enlarge vertically

        Surjit Thakur

  • memeJanuary 10, 2009, 8:12 pm

    That is a great way to lock into a remote PC. THANK YOU!
    The only shortcoming: to be good for remote support of Windows computers, it would be best if the local user could still see what is going on on the screen. Is there a way to get that, too. (Similar to netmeeting, perhaps?)


    • aliFebruary 20, 2011, 10:12 pm

      use vnc instead download tinyVNC server on there pc and use vnc viewer on your pc google tinyvnc

  • shahid (Pakistan)January 15, 2009, 12:12 am

    Did remote login to my linux laptop from xp, now easily done vice versa. very good,

  • SandeepApril 2, 2009, 8:31 am

    Thanks man.Your tips help me a lot.

    Good Luck
    Sandeep Bisht

  • HiwaApril 3, 2009, 11:42 pm

    Hi There,

    I just want to say thank you for this short but very important entry. I was puzzled how to connect to my windows servers. I am a ex Mandrake and Suse user but it didn’t use linux for a very long time.

    Thanks again!

  • janardhanMay 4, 2009, 12:16 pm

    Its working great job, but when i connected to a domain client getting some error., ie., username,password,domain


  • jpmMay 12, 2009, 6:27 pm


    i’ve been working with rdesktop for a year now on a local Win server from my Linux machine and it worked fine.

    But now the admin decided to “virtualize” the server and i’ve got some flickering going on whenever i connect to that machine. The flickering is related to some displayed fields in MS Access (which i why i have to user rdesktop) and it eats up my processor a lot…

    Anybody has an idea or an alternative remote method ?



  • JoeJune 7, 2009, 3:19 pm

    Excellent tip, thank you very much! I just started using Ubuntu and this allows me to still use my Windows apps while in Unix. Good stuff!

  • nanJune 15, 2009, 2:38 pm

    ok thanks.it works beter for my fedora

  • AdnanJune 16, 2009, 6:13 am

    thx for the gr8 doc well done.

  • evanJuly 2, 2009, 2:57 am

    if windows xp has no password, how can I connect to windowsXP ?

  • HenryJuly 23, 2009, 2:23 am

    hello, does it need a TS Cals ???

  • HarryJuly 24, 2009, 3:55 pm

    Thanks for info. but i need help for remotely login to command prompt… any idea…? if i need to write script then how it would look like…? Basically i need remote login from linux to windows server 2003 and it should directly reach to the command prompt..


  • yudymardiantoAugust 17, 2009, 3:09 pm

    what abaut with linux text ??? rdekstop is not running.

  • yudymardiantoAugust 19, 2009, 7:46 am

    mbalelo:/etc# rdesktop
    Autoselected keyboard map en-us
    ERROR: Failed to open display:

    please your solutions

    • palaniFebruary 23, 2011, 9:42 pm

      Really great its working for me..thanks

  • donzOctober 1, 2009, 4:13 am

    I use the ‘rdesktop’ and the problem with it is the colors!!
    I think it shows up with 256colors!
    How can i change the resolution? 24bit?

    please send me solution via email.

  • MarcOctober 9, 2009, 4:52 pm

    Works great!

    One q though: How do I get out of the full screen mode / switch to my linux desktop without killing the application?

    • lciApril 22, 2010, 3:19 pm

      i have the same questions. how do i exit from the full screen mode?

      • nixCraftApril 22, 2010, 3:51 pm

        Fullscreen mode can be toggled at any time using [Ctrl]+[Alt]+[Enter] keys.


        • lciApril 22, 2010, 9:03 pm

          Yes. Thanks for your reply.

          Before that, you may need to choose the visual effect to “None”—which is is System–preferences-appearance–visual effect

  • MukulNovember 2, 2009, 6:36 am

    Thanks for this tip!
    It saved me from continuously moving between Linux & Windows systems.
    I am able to work in fullscreen mode but i also get this on the terminal:

    WARNING: Remote desktop does not support colour depth 24; falling back to 16

    How do resolve this warning?

  • DudkoNovember 27, 2009, 6:02 pm

    Thank You. Simple and very helpful.

  • MallikarjunDecember 30, 2009, 4:27 am

    Hi Team,

    I can able to take XP,2003 servers with rdesktop command, but not 2008 server.
    Please help me out in this.

  • qwnpFebruary 12, 2010, 5:46 am

    ice crash:

    you want to log into a remote computer and not see the desk top. you described it as “like telnet”. what you want is ssh not remote desktop. ssh is safe to use now days unlike telnet as telnet may allow attackers to view your password and user name in plain text.

    ssh came with the linux distro i downloaded , crunchbang lite. so i am not sure the command to download it but it is most likely something like sudo apt-get install ssh . if that doesnt work use sudo apt-cache search ssh . if all else fails search google for ssh linux “your distro” and im sure there will be almost too many web sites willing to help you get ssh.

    to use just type something like “sudo ssh user@domain.layer1 and provide the password of the user you are trying to log on as.

    hope this helps you :)

  • HiobFebruary 27, 2010, 9:51 am

    > Didn’t see any thing mentioned about how secure password transmission is.. Is the
    > password transmitted clear text or encrypted? Is it secure?

    It is encrypted, but there are some hacks to get it on WinXP Service Pack 1+2. I don’t know if they fixed the problem (they just wanted to support some older WinNT-Functions and cut the Password into 6-character-strings).

    PS.: Nice Tip!

  • ishakApril 2, 2010, 5:25 pm

    OMG O_O was looking for this for a whole week THANK YOU SO MUCH FOR THIS ARTICLE!!!

  • MatechApril 9, 2010, 8:08 pm

    I try to remote in to Win2008 using rdesktop, it keep complaining about worng user name and password. I am more than sure user name and password are correct. Pleas help.

  • PhobiaMay 24, 2010, 12:30 am

    hi, cant seem to get this installed. first time doing this whole linux thing all i get is an error message
    E: Could not open lock file /var/lib/dpkg/lock – open (13: Permission denied)
    E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?

    tried to type yes… thats all i got, any help woud be appriciated!

    • VilleMay 27, 2010, 8:32 pm

      Try this instead: sudo apt-get install rdesktop
      If you somehow don’t manage to install it anyway, try looking at your software sources/repos.

      • PhobiaMay 28, 2010, 12:02 pm

        It worked like a charm, thanx man!

  • mzsadeJuly 6, 2010, 10:10 am

    Hi, I tried accessing my virtual XP (guest) on Linux Host, with rdesktop but was unable to connect. Is it because it cannot be done or am i missing something? I followed the usual steps, started XP on virtualbox, found the Windows IP using “ipconfig -all”, typed “rdesktop xx.xx.xx.xx, and got “ERROR: unable to connect”.

    • santhoshApril 14, 2015, 3:53 am

      i want to remotely access windows 7 pc .im using raspbian wheezy os .can any body tell how to use vpn to connect to that windows pc.

      Autoselected keyboard map en-us

      after that unable to conect
      please tell me the solution.

  • blacksJuly 23, 2010, 5:05 pm

    works like magic guys thanks alot

  • Sivawut SrithammawutAugust 24, 2010, 2:14 pm

    Thanks heap.

  • ArunAugust 29, 2010, 3:02 pm

    Thanx man…This is what i am looking for…

  • DWHSeptember 17, 2010, 2:30 pm

    Fantastic piece :) thank you :) another step closer to using LINUX full time at work… Is there a way to remote in live? i.e. whilst the user is logged in?


  • Derek COctober 20, 2010, 2:37 am

    I’ve been connecting to my computers at work with rdesktop, but I’m having issues with screen resolution. No matter what I set the resolution to (860×640 – 1280×960), I cannot see the taskbar on my connected computer. When I connect with the fullscreen option, I can see it. I want to be able to view the taskbar without having to connect using the fullscreen option… Any suggestions?

    When using the option -g (may resolution = 860×480 – 1280×960) I cannot see the taskbar on the connected computer. If I do not use the -g option to specify the resolution, the default resolution is 860×480, but I can see the taskbar…

    • Derek COctober 20, 2010, 2:50 am


      I’m using 1280×725 (odd resolution, huh?) and I can finally view the Taskbar… Hopefully the new resolution doesn’t interfere with much else (browser windows, etc…)

      Thanks for your support!

  • Jm KimNovember 17, 2010, 6:51 pm

    Microsoft Remote FX requires RDP 7.1 based client.
    Could you give me answer on if your solution is able to support Remote FX?
    If yes, we may be able to run Direct X based games on Linux more effectively.

  • lciNovember 24, 2010, 4:23 am

    Hi, I can’t get this work with Ubuntu 10.04. It was working perfect under the older version 8.10. Anyone has any idea?

  • FireNovember 29, 2010, 9:58 am

    Pls help me where to download rdesktop for ubuntu, thank you

  • Ibrahim MaroJanuary 3, 2011, 2:40 pm

    thank you :)

  • Sam H.February 11, 2011, 8:41 am

    Beautiful work.
    You’re a genius my man..

  • MaritzaMarch 5, 2011, 5:32 am

    I get this message after I put
    rdesktop -f ip-address

    ERROR: connect: Connection timed out

    How can I get the windows to prompt me to put my user name and password?

  • guliverMarch 11, 2011, 8:24 am

    thanks youuuuuuuuuuuuuu

  • amjathMarch 17, 2011, 6:28 am

    I wanted to access the windows 2008’s desktop in ubuntu.
    i have installed rdesktop in ubuntu.
    when i am doing rdesktop to windows its showing the below erro, what could be the problem and how can i fix it. please help

    # rdesktop
    ERROR: Failed to open display:

    • AbbasApril 2, 2011, 8:29 pm

      Depricated elements is not loaded. For example, Xorg. Must be GUI is loaded.

  • tanvir ahmedMarch 21, 2011, 8:22 am

    thank you much , this is a grate way

  • MuradMarch 30, 2011, 11:04 pm

    Thanks. Worked like a charm

    On CentOS, you need to run
    % yum install rdesktop

    with sufficient privileges of course.


  • jthan24May 24, 2011, 7:45 pm

    Hi, everyone actually I use rdesktop so much and for advance use:

    rdesktop -g 97% -u User -k la

    -g graphics in this case can with % of window or exact size 1720×768
    -u User
    -k Key map include for the keyboard in this case la = latinoamerica


  • MedUsaMay 26, 2011, 7:13 am

    This saved my day :D

    Normal RDP on linux is slow, but rdesktop is fast!

  • splitSeptember 27, 2011, 9:21 pm

    Great! It’s just what I needed. Thanks

  • Narendra SinghNovember 14, 2011, 11:22 am

    Hi ..Dear…
    i allrady installed rdesktop at RHEL pc and run this cmd…like
    # rdesktop
    in this case window login page show, and as i type user name and Passwd, in that case. ….msg: unable to log you on beacuse of account restriction but i allready disable window firewall & iptables both side……now in this case..what i do…
    plz advise me…..

    • Narendra SinghNovember 14, 2011, 11:24 am

      # rdesktop

    • Gigi MathewNovember 28, 2011, 6:40 pm


      Check your RDP configuration on the Windows side and make sure the username you are using from the Linux side is enabled for RDP access.

  • Darby BursonDecember 22, 2011, 12:09 am

    hey there and thank you for your information – I have definitely picked up something new from right here. I did however expertise a few technical points using this web site, since I experienced to reload the site lots of times previous to I could get it to load properly. I had been wondering if your hosting is OK? Not that I’m complaining, but slow loading instances times will often affect your placement in google and could damage your high-quality score if advertising and marketing with Adwords. Well I’m adding this RSS to my email and can look out for much more of your respective fascinating content. Make sure you update this again soon..

    • ligiaMarch 5, 2012, 3:27 pm


      i want to connect to windows rdp (XP) from a linux meego version. Could anyone help?

  • jdmccMarch 17, 2012, 12:25 am

    When I connect to WinXP via rdp it forces other users off the XP machine. Is there any way to connect in the background (as it were) so that someone actually using the remote computer can stay logged on?

  • JimMarch 27, 2012, 2:11 pm

    When I login to my VPS (simply ‘rdesktop i.p.’ to a Win server 2003, datacenter edition, sp2 system), it seems that I have less rights as a sys admin, compared with a sys admin logging in from the Win client MS Desktop 6.0. I see only a handfull of running processes in the taskbar. Also, I see only 1 out of 2 running applications on my desktop.
    Is there a way to solve this issue? Thanks!


  • RogerMay 15, 2012, 1:52 am

    Trying to use rdesktop to log in remotely to WIndows machines via a Linux machine. Logging in remotely to the Linux machine with ssh using PuTTY and tunneling to VNC.
    Running rdesktop on the Linux machine this way gives an ERROR: Failed to open display : localhost : 0 — How can I connect rdesktop to VNC or is this not even my problem??

    Thanks in advance

  • Han SoloMay 23, 2012, 8:01 pm


    you need a DISPLAY exported to your Client IP. On your client (from which you ssh) you need a X-server which can be Xming
    This here is another how to.

    Good luck

  • johnJuly 8, 2012, 11:46 pm

    Hey there.
    Does it also support the remote desktop of win 7? and how fluent does it work?
    remote desktop in windows also allows to transfer sound. is this feature included?

  • Fahad Bin ShahidAugust 4, 2012, 11:22 pm

    It is great and worked great but when the window login screen is displayed and I try to logon it says
    “Unable to Log you on because of an account restriction”
    What should I do now. Help

  • Dirty HarryOctober 11, 2012, 7:27 am

    Got it to work, but how would I save it onto the desktop as an icon?I can do it with windows and I can actually save a log in for each pc I am logging onto.


  • valasuduraiFebruary 5, 2013, 3:01 pm

    Thanks For the nice tips this works fine in ubuntu 12.10

  • lindows-UserMarch 24, 2013, 1:00 am

    Just want to ask if this is also applicable with windows 7 starter. As one of the shortcomings or limitations of the win 7 starter version it can’t see other pc in the network and you need a higher version of Win 7 like Home prem. to create a workgroup and join the win7 starter.
    Thank you and this website of yours is one of the great source of information.

  • syed wajiuddinApril 26, 2016, 12:33 pm

    rdesktop -u syed
    Autoselected keyboard map en-us
    ERROR: Failed to open display:

    please help me i am getting this error while trying to connect.

Security: Are you a robot or human?

Leave a Comment

   Tagged with: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,