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

I have Debian Linux at home, and 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

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

Say Hello To rdesktop

Fortunately, Linux has rdesktop utility. It is a client for a remote desktop protocol (RDP), used in many 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.

What is a rdesktop client for Linux/Unix?

From the project web site:

rdesktop is an open source UNIX client for connecting to Windows Remote Desktop Services, capable of natively speaking Remote Desktop Protocol (RDP) in order to present the user’s Windows desktop. rdesktop is known to work with Windows server versions ranging from NT 4 terminal server to Windows Server 2012 R2

Install rdesktop

Type the following apt-get command/apt command as root user to install rdesktop on a Debian/Ubuntu Linux:

# 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.your-domaian-name-here

Or connect to windows XP/Vista workstation having IP

$ rdesktop

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

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 100 comments so far... add one

CategoryList of Unix and Linux commands
Disk space analyzersdf ncdu pydf
File Managementcat cp mkdir tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
100 comments… add one
  • seryio Sep 12, 2007 @ 0:02

    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 Diddi Sep 12, 2007 @ 19:21

    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 rana Sep 25, 2011 @ 13:26

      used advanced option on client computer remote desktop conntion

  • wil Sep 22, 2007 @ 17:05

    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)

  • gundul Sep 29, 2007 @ 16:00


    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.vinden Oct 15, 2007 @ 17:09

    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

  • ashish Dec 5, 2007 @ 14:29

    i think the website is doing a great job.

  • James Jan 7, 2008 @ 22:43

    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 Kaup Jan 8, 2008 @ 3:52

    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.


  • rslinkman Jan 16, 2008 @ 18:54

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

  • mc2nv Jan 26, 2008 @ 4:58

    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

  • mc2nv Jan 26, 2008 @ 5:00

    typo TSL * TLS

    submit box says linux lol

  • Luqman Feb 1, 2008 @ 20:32

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

    For full screen:

    rdesktop -f ip-address

  • Jeff Garofalo Feb 3, 2008 @ 16:03

    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!

  • Stew Mar 12, 2008 @ 21:03

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

  • Kendric Beachey Mar 13, 2008 @ 15:58

    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.

  • ashish Mar 17, 2008 @ 21:50


    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.

    • ali Feb 20, 2011 @ 22:15

      use vnc google tinyvnc

      • anil singh rana Sep 25, 2011 @ 13:24


        install rpm to vnc for linux and
        work on it

  • osl Mar 18, 2008 @ 10:40

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

  • nick Mar 18, 2008 @ 11:42

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

  • Barry Mar 25, 2008 @ 19:21

    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!


  • Richard May 30, 2008 @ 13:35

    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.

  • Kristian Jun 15, 2008 @ 20:01

    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 crash Sep 2, 2008 @ 23:16

    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?

  • Troubled Sep 11, 2008 @ 22:11

    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?

  • Martyn Oct 13, 2008 @ 19:31

    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.

  • Toran Dec 3, 2008 @ 11:13

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

  • Vinogopi Dec 22, 2008 @ 12:18

    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 ,,,,,,

  • jonathan Jan 6, 2009 @ 12:05

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


    • phil Jun 14, 2011 @ 20:15

      rdesktop -g 1024×768 or whatever resolution you require

      • Surjit Thakur Aug 27, 2011 @ 4:51

        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

  • meme Jan 10, 2009 @ 20:12

    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?)


    • ali Feb 20, 2011 @ 22:12

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

  • shahid (Pakistan) Jan 15, 2009 @ 0:12

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

  • Sandeep Apr 2, 2009 @ 8:31

    Thanks man.Your tips help me a lot.

    Good Luck
    Sandeep Bisht

  • Hiwa Apr 3, 2009 @ 23:42

    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!

  • janardhan May 4, 2009 @ 12:16

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


  • jpm May 12, 2009 @ 18:27


    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 ?



  • Joe Jun 7, 2009 @ 15:19

    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!

  • nan Jun 15, 2009 @ 14:38

    ok thanks.it works beter for my fedora

  • Adnan Jun 16, 2009 @ 6:13

    thx for the gr8 doc well done.

  • evan Jul 2, 2009 @ 2:57

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

  • Henry Jul 23, 2009 @ 2:23

    hello, does it need a TS Cals ???

  • Harry Jul 24, 2009 @ 15:55

    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..


  • yudymardianto Aug 17, 2009 @ 15:09

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

  • yudymardianto Aug 19, 2009 @ 7:46

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

    please your solutions

    • palani Feb 23, 2011 @ 21:42

      Really great its working for me..thanks

  • donz Oct 1, 2009 @ 4:13

    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.

  • Marc Oct 9, 2009 @ 16:52

    Works great!

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

    • lci Apr 22, 2010 @ 15:19

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

      • 🐧 nixCraft Apr 22, 2010 @ 15:51

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


        • lci Apr 22, 2010 @ 21:03

          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

  • Mukul Nov 2, 2009 @ 6:36

    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?

  • Dudko Nov 27, 2009 @ 18:02

    Thank You. Simple and very helpful.

  • Mallikarjun Dec 30, 2009 @ 4:27

    Hi Team,

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

  • qwnp Feb 12, 2010 @ 5:46

    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 🙂

  • Hiob Feb 27, 2010 @ 9:51

    > 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!

  • ishak Apr 2, 2010 @ 17:25

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

  • Matech Apr 9, 2010 @ 20:08

    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.

  • Phobia May 24, 2010 @ 0:30

    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!

    • Ville May 27, 2010 @ 20:32

      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.

      • Phobia May 28, 2010 @ 12:02

        It worked like a charm, thanx man!

  • mzsade Jul 6, 2010 @ 10:10

    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”.

    • santhosh Apr 14, 2015 @ 3:53

      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.

  • blacks Jul 23, 2010 @ 17:05

    works like magic guys thanks alot

  • Sivawut Srithammawut Aug 24, 2010 @ 14:14

    Thanks heap.

  • Arun Aug 29, 2010 @ 15:02

    Thanx man…This is what i am looking for…

  • DWH Sep 17, 2010 @ 14:30

    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 C Oct 20, 2010 @ 2:37

    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 C Oct 20, 2010 @ 2:50


      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 Kim Nov 17, 2010 @ 18:51

    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.

  • lci Nov 24, 2010 @ 4:23

    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?

  • Fire Nov 29, 2010 @ 9:58

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

  • Ibrahim Maro Jan 3, 2011 @ 14:40

    thank you 🙂

  • Sam H. Feb 11, 2011 @ 8:41

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

  • Maritza Mar 5, 2011 @ 5:32

    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?

  • guliver Mar 11, 2011 @ 8:24

    thanks youuuuuuuuuuuuuu

  • amjath Mar 17, 2011 @ 6:28

    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:

    • Abbas Apr 2, 2011 @ 20:29

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

  • tanvir ahmed Mar 21, 2011 @ 8:22

    thank you much , this is a grate way

  • Murad Mar 30, 2011 @ 23:04

    Thanks. Worked like a charm

    On CentOS, you need to run
    % yum install rdesktop

    with sufficient privileges of course.


  • jthan24 May 24, 2011 @ 19:45

    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


  • MedUsa May 26, 2011 @ 7:13

    This saved my day 😀

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

  • split Sep 27, 2011 @ 21:21

    Great! It’s just what I needed. Thanks

  • Narendra Singh Nov 14, 2011 @ 11:22

    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 Singh Nov 14, 2011 @ 11:24

      # rdesktop

    • Gigi Mathew Nov 28, 2011 @ 18:40


      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 Burson Dec 22, 2011 @ 0:09

    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..

    • ligia Mar 5, 2012 @ 15:27


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

  • jdmcc Mar 17, 2012 @ 0:25

    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?

  • Jim Mar 27, 2012 @ 14:11

    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!


  • Roger May 15, 2012 @ 1:52

    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 Solo May 23, 2012 @ 20:01


    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

  • john Jul 8, 2012 @ 23:46

    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 Shahid Aug 4, 2012 @ 23:22

    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 Harry Oct 11, 2012 @ 7:27

    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.


  • valasudurai Feb 5, 2013 @ 15:01

    Thanks For the nice tips this works fine in ubuntu 12.10

  • lindows-User Mar 24, 2013 @ 1:00

    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 wajiuddin Apr 26, 2016 @ 12:33

    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.

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum