![]() |
ubuntu.com - launchpad.net - ubuntu help
|
|
|||||||
|
Tutorials & Tips The place to find Ubuntu related Tips & Tricks. |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
5 Cups of Ubuntu
![]() Join Date: Mar 2008
Beans: 34
|
How to use rdesktop (Windows remote desktop connection)
rdesktop is a client program that allows you to connect from your Ubuntu computer to your Windows computer to remote control the Windows computer. In other words, while you are sitting in front of your Ubuntu computer at home, you can log into and access your Windows computer as if you are sitting in front of the Windows computer. See remote desktop software.
rdesktop and VNC and Terminal Server Client (comparison) There is another similar program called VNC. VNC is slow compared to rdesktop and VNC connection is unencrypted while rdesktop connection is encrypted by default. But there is a way to use VNC with encrypted connection. VNC works on almost all operating systems. See comparison of remote desktop software. Terminal Server Client (Applications > Internet > Terminal Server Client) is a GUI front-end to VNC and rdesktop. If you open Terminal Server Client, you will see Protocol option (RDP, RDPv5, VNC), RDP and RDPv5 are for rdesktop connection. You should use Terminal Server Client if it works fine and if you are ok with this bug. If you want more control (such as connecting a specific local folder or other device redirection, hiding or keeping window manager decoration, using seamlessRDP), use rdesktop following this guide. What to do on the Windows side (the server side) The Windows computer you will connect to must be running Windows XP Pro or a higher version of Windows. * If you have a weak Windows login password (such as john1, aaaaaaaaaaaaa, abcabc), change it to a stronger password that is longer than 10 characters and that is not a combination of words that can be found on a dictionary. You need to do this because if you enable Remote Desktop Connection, anybody with internet access can try to log into your Windows computer with automated cracking tools. * Enable Remote Desktop Connection on the Windows computer following this guide. If the Ubuntu computer you will be connecting from has a static ip address, you can set your Windows Firewall to allow remote desktop connection from only your Ubuntu computer and refuse connection from other computers. To do this, open Windows Firewall, click on the Exceptions tab, Select 'Remote Desktop', click 'Edit', click 'Change Scope...', choose 'Custom list' and enter the IP addresses of computers from which you want to remote connect (See the attached screenshot) What to do on the Ubuntu side (client side) * On your Ubuntu computer, open a terminal (Application > Accessories > Terminal) and enter the following command: Code:
rdesktop If your windows username and Ubuntu username is the same and if the static IP address of your Windows computer is (suppose) 143.210.123.456, you can now connect to your Windows computer by entering the following command: Code:
rdesktop 143.210.123.456 Code:
rdesktop -u john 143.210.123.456 Most cases, you'll use one of the following two commands: Code:
rdesktop -u john -fP 143.210.123.456 Code:
rdesktop -u john -g 100% -PKD 143.210.123.456 * First command : if you press alt+tab (keyboard shortcut for switching windows), it doesn't switch windows from Ubuntu desktop, it switches from the remote Windows desktop. And ctrl+alt+right (for switching to another workspace) doesn't work. This is useful when you want to alt+tab in the remote Windows. * Second command : keyboard shortcuts such as ctrl+alt+right and alt+tab works on your Ubuntu desktop. This is useful because you can put the remote desktop on the seperate workspace then you can switch between your local ubuntu workspace and your remote Windows desktop just by pressing ctrl+alt+right and ctrl+alt+left. Create a launcher Opening terminal every time you want to remote connect to Windows is of a hassle. To create a lancher, right click on the top panel, click 'Add to Panel...', select 'Custom Application launcher', click 'Add' button, type your command in the command field. (See the attached screenshot). if the command contains %, replace % with %%. useful rdesktop options -r disk:doc=/home/john/Documents,pic=/home/john/Pictures With this option, rdesktop connects folders /home/john/Documents and /home/john/Pictures to Windows remote desktop. Open Windows Start menu and click 'My Computer' and you will see the connected folders named doc and pic. -r sound:local This option is to hear sound from Windows remote desktop. See /usr/share/doc/rdesktop/redirection.txt for more on device redirection. -k ko This sets the keyboard layout to Korean. This makes Hangul key work on the remote desktop. See /usr/share/doc/rdesktop/keymap-names.txt How to use rdesktop over ssh rdesktop is vulnerable to man-in-the-middle attacks. So you might want to use it over ssh. Follow this lifehacker article to set up an ssh server on the Windows computer. (You can edit sshd_config with a Windows editor supporting UNIX texts such as notepad2) You might want to set Windows Firewall to disallow ssh access from IP addresses other than your Ubuntu computer's. Take note of the RSA key fingerprint by open a cygwin shell (Start > All Programs > Cygwin > Cygwin Bash Shell) and entering : Code:
ssh-keygen -lf /etc/ssh_host_rsa_key.pub Code:
telnet localhost 3389 Code:
$ telnet localhost 3389 Trying 127.0.0.1... telnet: Unable to connect to remote host: Connection refused Code:
$ telnet localhost 3389 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. Code:
ssh -L 3389:localhost:3389 john@143.210.123.456 Code:
$ ssh -L 3389:localhost:3389 john@143.210.123.456 The authenticity of host '143.210.123.456 (143.210.123.456)' can't be established. RSA key fingerprint is f3:90:3b:70:20:a2:52:fe:fx:a2:90:70:3b:f3:6a:22. Are you sure you want to continue connecting (yes/no)? Open another terminal and make rdesktop connect to localhost: Code:
rdesktop -u john localhost What if the port 3389 was already in use? Find a different available port (suppose, 3099) and connect to Windows ssh like this : Code:
ssh -L 3099:localhost:3389 john@143.210.123.456 Open a new terminal and make rdesktop connect to localhost at the port 3099 : Code:
rdesktop -u john localhost:3099 |
|
|
|
|
|
#2 |
|
A Carafe of Ubuntu
![]() Join Date: Dec 2007
Beans: 103
|
Re: How to use rdesktop (Windows remote desktop connection)
AWESOME!!!!
You helped me ALOT man, Thanks
__________________
DO NOT USE RM COMMANDS!!! Click Here for more information. Linux & Metal FTW ![]() See ya at Ubuntu. |
|
|
|
|
|
#3 |
|
A Carafe of Ubuntu
![]() Join Date: Jul 2007
Location: Costa Rica
Beans: 87
Ubuntu 10.04 Lucid Lynx
|
Re: How to use rdesktop (Windows remote desktop connection)
Is there a way to remote desktop without a static-public IP? I use LogMeIn, but it does not work from Ubuntu...
|
|
|
|
|
|
#4 |
|
A Carafe of Ubuntu
![]() Join Date: Jul 2007
Location: Costa Rica
Beans: 87
Ubuntu 10.04 Lucid Lynx
|
Re: How to use rdesktop (Windows remote desktop connection)
I have 4 computers I need to do remote desktop to, but only 2 have static-public ips. My question is, - is there an app where one can make one of the static-public ips to be the "remote desktop server" of the rest, so that the other computers keep reporting the server in which ip they are? I suppose that is the way LogMeIn.com works.
|
|
|
|
|
|
#5 |
|
I Ubuntu, Therefore, I Am
![]() Join Date: Jul 2006
Beans: 3,446
Ubuntu 9.10 Karmic Koala
|
Re: How to use rdesktop (Windows remote desktop connection)
Is there any way you can do remote desktop without the end user's computer locking itself out?
I just tested it on my XP Pro laptop, and it locked my laptop and said it was in use. I'd like for the end user to still have visibility of what's going on. |
|
|
|
|
|
#6 |
|
5 Cups of Ubuntu
![]() Join Date: Mar 2008
Beans: 34
|
Re: How to use rdesktop (Windows remote desktop connection)
CostaRica
Using a dynamic dns service can be a workaround. See dynamic DNS service providers list Roasted have you tried "-0" (zero) option (attach to console)? Code:
rdesktop -0 ipaddress |
|
|
|
|
|
#7 |
|
First Cup of Ubuntu
![]() Join Date: Jun 2008
Beans: 6
|
Thanks for the tips. Has anyone been able to get sound to display on the local computer? I'm running Hardy connected to a remote Windows XP box. I'm using tsclient to setup the remote desktop. When I choose to hear sound from the remote machine on the local machine I get the attached error on the Windows box.
|
|
|
|
|
|
#8 |
|
Gee! These Aren't Roasted!
![]() Join Date: May 2008
Location: Germany
Beans: 167
|
Re: How to use rdesktop (Windows remote desktop connection)
Hi there,
I am trying to connect from a ubuntu 8.10 system to a windows XP system but I always get "connection refused". I followed the recommendations of this thread, set a firewall exception for my IP and still it doesn't work. Any idea what else could it be? UPDATE: ignore that post... I simply forgot a checkbox. Last edited by argail1980; August 21st, 2008 at 12:47 PM.. |
|
|
|
|
|
#9 |
|
A Carafe of Ubuntu
![]() Join Date: Feb 2005
Location: Fairview
Beans: 127
Kubuntu 9.10 Karmic Koala
|
Re: How to use rdesktop (Windows remote desktop connection)
Good tutorial, thanks.
ctrl-alt-enter doesn't get me out of full-screen mode. Well, it does for a fraction of a second, but then I'm right back into my windows desktop. Desktop switching doesn't appear to work for me either (ctrl-alt-direction arrow). Any ideas? db |
|
|
|
|
|
#10 | |
|
A Carafe of Ubuntu
![]() Join Date: Feb 2005
Location: Fairview
Beans: 127
Kubuntu 9.10 Karmic Koala
|
Re: How to use rdesktop (Windows remote desktop connection)
Quote:
db |
|
|
|
|
| Bookmarks |
| Tags |
| rdesktop, remote connection, ssh |
| Thread Tools | |
| Display Modes | |
|
|