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

by on January 7, 2006 · 98 comments· LAST UPDATED April 22, 2010

in

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 192.168.1.17:

$ rdesktop 192.168.1.17

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

TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 98 comments… read them below or add one }

1 seryio September 12, 2007 at 12:02 am

hi
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

Reply

2 Prasanth Kumar Diddi September 12, 2007 at 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?

Thanks.
Prasanth Kumar Diddi.

Reply

3 anil singh rana September 25, 2011 at 1:26 pm

used advanced option on client computer remote desktop conntion

Reply

4 wil September 22, 2007 at 5:05 pm

Prasanth. To sort out colours/resolution read up on rdesktop switches: -g for resolution and -a for colours.
ie.
rdesktop -u USERNAME -p PASSWORD -g RESOLUTION -a COLOURS IP#

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

Reply

5 gundul September 29, 2007 at 4:00 pm

hello,

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

Reply

6 e.vinden October 15, 2007 at 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

Reply

7 ashish December 5, 2007 at 2:29 pm

i think the website is doing a great job.
thanku

Reply

8 James January 7, 2008 at 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!

Reply

9 Dale Kaup January 8, 2008 at 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.

Dale

Reply

10 rslinkman January 16, 2008 at 6:54 pm

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

Reply

11 mc2nv January 26, 2008 at 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

Reply

12 mc2nv January 26, 2008 at 5:00 am

typo TSL * TLS

submit box says linux lol

Reply

13 Luqman February 1, 2008 at 8:32 pm

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

For full screen:

rdesktop -f ip-address

Reply

14 Jeff Garofalo February 3, 2008 at 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!

Reply

15 Stew March 12, 2008 at 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?

Reply

16 Kendric Beachey March 13, 2008 at 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.

Reply

17 ashish March 17, 2008 at 9:50 pm

@james

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.

Reply

18 ali February 20, 2011 at 10:15 pm

use vnc google tinyvnc

Reply

19 anil singh rana September 25, 2011 at 1:24 pm

dear

install rpm to vnc for linux and
work on it

Reply

20 osl March 18, 2008 at 10:40 am

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

Reply

21 nick March 18, 2008 at 11:42 am

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

Reply

22 Barry March 25, 2008 at 7:21 pm

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

Take a look at the followng blog:

http://portal.tonychan.org/Default.aspx?tabid=58&EntryID=123

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

Good luck!

Barry

Reply

23 Richard May 30, 2008 at 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.

Reply

24 Kristian June 15, 2008 at 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

Reply

25 ice crash September 2, 2008 at 11:16 pm

another question:

[root@vs-1399 ~]# rdesktop -u tmp 82.111.231.28 -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?

Reply

26 Troubled September 11, 2008 at 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?

Reply

27 Martyn October 13, 2008 at 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.

Reply

28 Toran December 3, 2008 at 11:13 am

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

Reply

29 Vinogopi December 22, 2008 at 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 ,,,,,,

Reply

30 jonathan January 6, 2009 at 12:05 pm

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

Thanks

Reply

31 phil June 14, 2011 at 8:15 pm

rdesktop -g 1024×768 or whatever resolution you require

Reply

32 Surjit Thakur August 27, 2011 at 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

rgds
Surjit Thakur
09417189875

Reply

33 meme January 10, 2009 at 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?)

Thanks!

Reply

34 ali February 20, 2011 at 10:12 pm

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

Reply

35 shahid (Pakistan) January 15, 2009 at 12:12 am

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

Reply

36 Sandeep April 2, 2009 at 8:31 am

Thanks man.Your tips help me a lot.

Good Luck
Sandeep Bisht

Reply

37 Hiwa April 3, 2009 at 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!

Reply

38 janardhan May 4, 2009 at 12:16 pm

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

Thanks
Janardhan
Sklm

Reply

39 jpm May 12, 2009 at 6:27 pm

Hi,

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 ?

Thanks,

jp

Reply

40 Joe June 7, 2009 at 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!

Reply

41 nan June 15, 2009 at 2:38 pm

ok thanks.it works beter for my fedora

Reply

42 Adnan June 16, 2009 at 6:13 am

thx for the gr8 doc well done.

Reply

43 evan July 2, 2009 at 2:57 am

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

Reply

44 Henry July 23, 2009 at 2:23 am

hello, does it need a TS Cals ???

Reply

45 Harry July 24, 2009 at 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..

Thanks
Harry

Reply

46 yudymardianto August 17, 2009 at 3:09 pm

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

Reply

47 yudymardianto August 19, 2009 at 7:46 am

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

please your solutions
thanks.

Reply

48 palani February 23, 2011 at 9:42 pm

Really great its working for me..thanks

Reply

49 donz October 1, 2009 at 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.
thankz

Reply

50 Marc October 9, 2009 at 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?

Reply

51 lci April 22, 2010 at 3:19 pm

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

Reply

52 nixCraft April 22, 2010 at 3:51 pm

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

HTH

Reply

53 lci April 22, 2010 at 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

Reply

54 Mukul November 2, 2009 at 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?

Reply

55 Dudko November 27, 2009 at 6:02 pm

Thank You. Simple and very helpful.

Reply

56 Mallikarjun December 30, 2009 at 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.

Reply

57 qwnp February 12, 2010 at 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 :)

Reply

58 Hiob February 27, 2010 at 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!

Reply

59 ishak April 2, 2010 at 5:25 pm

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

Reply

60 Matech April 9, 2010 at 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.

Reply

61 Phobia May 24, 2010 at 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!

Reply

62 Ville May 27, 2010 at 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.

Reply

63 Phobia May 28, 2010 at 12:02 pm

It worked like a charm, thanx man!

Reply

64 mzsade July 6, 2010 at 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: 10.0.2.15: unable to connect”.

Reply

65 blacks July 23, 2010 at 5:05 pm

works like magic guys thanks alot

Reply

66 Sivawut Srithammawut August 24, 2010 at 2:14 pm

Thanks heap.

Reply

67 Arun August 29, 2010 at 3:02 pm

Thanx man…This is what i am looking for…

Reply

68 DWH September 17, 2010 at 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?

TTFN

Reply

69 Derek C October 20, 2010 at 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?

##IMPORTANT##
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…

Reply

70 Derek C October 20, 2010 at 2:50 am

Nevermind,

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!

Reply

71 Jm Kim November 17, 2010 at 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.

Reply

72 lci November 24, 2010 at 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?

Reply

73 Fire November 29, 2010 at 9:58 am

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

Reply

74 Ibrahim Maro January 3, 2011 at 2:40 pm

thank you :)

Reply

75 Sam H. February 11, 2011 at 8:41 am

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

Reply

76 Maritza March 5, 2011 at 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?

Reply

77 guliver March 11, 2011 at 8:24 am

thanks youuuuuuuuuuuuuu

Reply

78 amjath March 17, 2011 at 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 10.129.150.44
ERROR: Failed to open display:

Reply

79 Abbas April 2, 2011 at 8:29 pm

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

Reply

80 tanvir ahmed March 21, 2011 at 8:22 am

thank you much , this is a grate way

Reply

81 Murad March 30, 2011 at 11:04 pm

Thanks. Worked like a charm

On CentOS, you need to run
% yum install rdesktop

with sufficient privileges of course.

M

Reply

82 jthan24 May 24, 2011 at 7:45 pm

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

rdesktop -g 97% -u User -k la

Explain:
-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

Bye

Reply

83 MedUsa May 26, 2011 at 7:13 am

This saved my day :D

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

Reply

84 split September 27, 2011 at 9:21 pm

Great! It’s just what I needed. Thanks

Reply

85 Narendra Singh November 14, 2011 at 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…..

Reply

86 Narendra Singh November 14, 2011 at 11:24 am

# rdesktop

Reply

87 Gigi Mathew November 28, 2011 at 6:40 pm

Narendra,

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.

Reply

88 Darby Burson December 22, 2011 at 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..

Reply

89 ligia March 5, 2012 at 3:27 pm

hello

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

Reply

90 jdmcc March 17, 2012 at 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?

Reply

91 Jim March 27, 2012 at 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!

Jim

Reply

92 Roger May 15, 2012 at 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

Reply

93 Han Solo May 23, 2012 at 8:01 pm

Roger

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

Reply

94 john July 8, 2012 at 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?

Reply

95 Fahad Bin Shahid August 4, 2012 at 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

Reply

96 Dirty Harry October 11, 2012 at 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.

Thanks

Reply

97 valasudurai February 5, 2013 at 3:01 pm

Thanks For the nice tips this works fine in ubuntu 12.10

Reply

98 lindows-User March 24, 2013 at 1:00 am

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

Reply

Leave a Comment

Tagged as: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Previous post:

Next post: