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

I am responsible for couple of windows servers and windows xp workstations too. When I work from home, I need a way to get into Windows XP/2000/Vista/2003 server for work.

Since I have Debain 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' windows XP box.
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.

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 Server. You do not need to install VNC server. All you need is rdesktop client on Linux or BSD workstation.

Install rdesktop

# apt-get install rdesktop

Connect to MS Windows 2000/2003 server 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

Remote windows XP desktop

Please note that you must first enable remote desktop connection under Windows Server/XP.

  • Go to Windows XP 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, see man page of rdesktop or visit main website of rdesktop for more information.

Want to read Linux tips and tricks, but don't have time to check our blog everyday? Subscribe to our daily email newsletter to make sure you don't miss a single tip/tricks. Subscribe to our weekly newsletter here!

{ 37 comments… read them below or add one }

1 seryio 09.12.07 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

2 Prasanth Kumar Diddi 09.12.07 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.

3 wil 09.22.07 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)

4 gundul 09.29.07 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

5 e.vinden 10.15.07 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

6 ashish 12.05.07 at 2:29 pm

i think the website is doing a great job.
thanku

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

8 Dale Kaup 01.08.08 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

9 rslinkman 01.16.08 at 6:54 pm

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

10 mc2nv 01.26.08 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

11 mc2nv 01.26.08 at 5:00 am

typo TSL * TLS

submit box says linux lol

12 Luqman 02.01.08 at 8:32 pm

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

For full screen:

rdesktop -f ip-address

13 Jeff Garofalo 02.03.08 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!

14 Stew 03.12.08 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?

15 Kendric Beachey 03.13.08 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.

16 ashish 03.17.08 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.

17 osl 03.18.08 at 10:40 am

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

18 nick 03.18.08 at 11:42 am

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

19 Barry 03.25.08 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

20 Richard 05.30.08 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.

21 Kristian 06.15.08 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

22 ice crash 09.02.08 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?

23 Troubled 09.11.08 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?

24 Martyn 10.13.08 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.

25 Toran 12.03.08 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?

26 Vinogopi 12.22.08 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 ,,,,,,

27 jonathan 01.06.09 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

28 meme 01.10.09 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!

29 shahid (Pakistan) 01.15.09 at 12:12 am

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

30 Sandeep 04.02.09 at 8:31 am

Thanks man.Your tips help me a lot.

Good Luck
Sandeep Bisht

31 Hiwa 04.03.09 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!

32 janardhan 05.04.09 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

33 jpm 05.12.09 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

34 Joe 06.07.09 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!

35 nan 06.15.09 at 2:38 pm

ok thanks.it works beter for my fedora

36 Adnan 06.16.09 at 6:13 am

thx for the gr8 doc well done.

37 evan 07.02.09 at 2:57 am

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

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

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

Previous post: Executing Linux / UNIX commands from web page

Next post: FreeBSD keep ports collection up to date in two easy steps