Pages

Thursday, December 30, 2010

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.

Steps

1. Enable Remote connection in Windows.(Server side)

2. Client side

Commands

a) 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:

$rdesktop 143.210.123.456


b) If the usernames are different and your Windows username is (suppose) john, enter:

$rdesktop -u john 143.210.123.456


c) To disconnect, open Windows Start menu and click 'Disconnect'.

Most cases, you'll use one of the following two commands:

$rdesktop -u john -fP 143.210.123.456

$rdesktop -u john -g 100% -PKD 143.210.123.456
Both commands display remote desktop in full screen (corresponding option : -f, -g 100% -D) and bitmap cache is enabled for speed (-P). There is a bug and clipboard functionality (copy paste between remote desktop and local one) doesn't work in full screen mode. To make clipboard work, you need to escape full screen mode by pressing ctrl+alt+enter. ( Press ctrl+alt+enter again to get back to full screen mode. ) This bug only affects the first command and not the second command. So if you need to copy and paste between two desktops a lot, go with the second command. (Install dragking if you want to copy by selecting a text and paste by middle-click on your Windows desktop. dragking.ahk script requires ahkstructlib.ahk). The two commands also differs in how the keybindings are handled,

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


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

No comments:

Post a Comment