:FM

Jlggfik`e^N`e[fnjk\id`eXcZc`\ekj]ifd`elon`k_oi[g K

indows-to-Linux remote desk- Once connected and authenticated to the new Linux user or Windows Admin- top connectivity is often band- the Linux RDP server, the remote user is istrator, you’ll need the following: Nwidth intensive, insecure, and presented a Linux graphical desktop. ฀ ฀฀฀฀ difficult to configure. What if a remote The best part is you don’t have to run an ฀ ฀฀฀฀฀฀฀ Windows users could establish a con- X server on your Windows computer or server, nection to a Linux system as easily as export your Linux display to the Win- ฀ ฀฀฀฀฀ connecting to a Windows system – and dows computer. Also, you’ll need to navigate the Linux using the same application used to con- Setting up the RDP server on Linux is filesystem, use some basic DOS-like nect to Windows? easy and only takes a few minutes. For commands, and understand basic net- Xrdp is an open source implementa- work connectivity. It also helps if you tion of RDP (), Table 1: Linux Runlevels the protocol used with Windows Termi- 0 Halt nal Services for native Windows desktop 1 Single-user mode connectivity. The xrdp package provides 2 Multiuser, without NFS RDP functionality, along with an X 3 Full multiuser mode server capable of accepting connections 4 Unused from [1] and Windows Termi- 5 X11 (GUI) nal Server clients. =`^li\(1I\dfk\;\jbkfg:fee\Zk`fen`e[fn%

36 ISSUE 97 DECEMBER 2008

036-039_rdp.indd 36 16.10.2008 16:51:55 Uhr xrdp :FM

xrdp and approached the situation as if I To connect to your Linux computer’s were a Windows administrator, assum- RDP service from a Windows computer, ing things would work out of the box select Start | Programs | Accessories | without a lot of tweaking, it didn’t take Communications | Remote Desktop long for this Windows approach to frus- Connection . (On some Windows com- trate me, so I began poking around in puters, this is under Start | Programs | the /usr/local/xrdp directory a bit and Accessories | Remote Desktop Connec- speaking via email with one of the xrdp tion). Enter the name or IP address of developers. your Linux computer and click Connect, Eventually, I discovered the answers as shown in Figure 1. myself. Once the system is installed, you The RDP client opens a new dialog, as need to issue the following commands shown in Figure 2, prompting you for a =`^li\)1

=`^li\*1K_\oi[gJ\jj`feDXeX^\i:fee\Zk`feCf^% =`^li\+18[\jbkfgZfee\Zk`fefg\e]fiYlj`e\jj%

DECEMBER 2008 ISSUE 97 37

036-039_rdp.indd 37 16.10.2008 16:51:57 Uhr :FM

=`^li\,1ME:Ëj

Manager first connects to the RDP port, tempts a connection to the RDP server, Address specified in the /etc/xrdp/xrdp. then to the VNC port to present the the server and client negotiate an en- ini file. desktop to you. Figure 4 shows my cryption level; keys and server capabili- The user’s login credentials, screen Cent OS 5 desktop. ties are exchanged. resolution, and color depth pass to ses- When disconnecting from a Linux The client chooses the session color man for authentication. RDP session, you’ll see the screen depth and screen resolution. If sesman finds a running session with shown in Figure 5. Notice that the only If the user enters a username and the specified resolution and color depth, two actions available are End Current password in the client software, authen- it returns that display to the user; other- Session and Cancel, which is a standard tication begins; otherwise, the user se- wise, it starts a new xvnc instance with feature of VNC remote connections. lects the module from a drop-down list the user’s desktop specifications. and enters a username and password at ?fn@kNfibj the xrdp login screen, as shown in Fig- JlddXip The Linux server runs xrdp and sesman, ure 6. Xrdp is easy to install, configure, cus- listening for RDP connections. Once a The libvnc module loads, and a TCP tomize, and use. To work with this capa- Windows Terminal Server client at- connection is made to 127.0.0.1 or the IP ble product, you don’t need years of Linux experience. With nothing to install Xrdp FAQ on the Windows side, you can’t go Some useful facts about xrdp: find the binary at http:// server1. xrdp. org/ wrong with xrdp. Does RDP provide a remote control ses- temp. Although I haven’t performed any sion? What are the prerequisites for installing extensive network speed or bandwidth No, it is a remote terminal session, just xrdp? analysis with this product, because it’s like a Windows Terminal Server client ses- You need make, gcc, PAM headers, and RDP, you can be sure that performance sion. OpenSSL headers. begins to suffer as the number of simul- Why don’t I have to run an X server on Are my Windows-to-Linux RDP sessions taneous users approaches the two dozen Windows and export my display? encrypted? mark. However, I really like xrdp, and it Because the Linux server supplies a desk- Yes, that is the RDP standard. Available is now part of my standard cross-plat- top session through the VNC protocol, you encryption includes 40-bit one-way, 40-bit form arsenal. p won’t need to run an X server. two-way, and 128-bit two-way for low, me- Do I need a VNC server to use xrdp? dium, and high encryption, respectively. INFO I notice you use the KDE desktop. Is that If you aren’t going to use X11rdp, you will [1] Rdesktop: http:// www. rdesktop. org need a VNC server; however, you can only my only option? [2] Xrdp: http:// xrdp. sourceforge. net connect using one of those two protocols. No, you may run any window manager On the Windows computer, you do not you like, but it must exist on the Linux sys- need a VNC client or VNC server. tem and set up in the /usr/local/xrdp/ Ken is a freelance technical writer and If I want to use X11rdp, should I compile it startwm.sh file. Move the window man- journalist. He covers a variety of open or use the binary version from xrdp.org? ager you want to the top of the file, and source topics, including Linux, data- issue a force-reload to xrdp as root with: You can do either. If you are lucky, the bi- bases, and virtualization. Reach him nary will work for you because recompil- # service xrdp_control 5 via his website at www. kenhess. com. ing X is time consuming and painful, and force-reload. Thanks to Jay Sorg of xrdp and Matt it can cause your X server to be de-opti- Don’t run the startwm.sh file from the Chapman of the rdesktop project for mized, or worse, not to work at all. You’ll command line. AUTHOR THE their help with this article.

38 ISSUE 97 DECEMBER 2008

036-039_rdp.indd 38 16.10.2008 16:51:58 Uhr