Connect to Linux through RDP

In another post, https://geekhobbyist.wordpress.com/2012/12/21/install-linux-on-hyper-v/, I wrote about how to install CentOS 6.3 on Hyper-V.  For me, it is very convenient to connect to my Linux virtual machine in the same manner that I do a Windows virtual machine, through MSTSC, otherwise known as Remote Desktop.  This how-to describes how to connect to Linux by RDP using Remote Desktop and assumes that Centos was installed with Desktop, or Desktop-minimum.  Additional dependencies may need to be met if installation packages were customized.

Why CentOS 6.3?  It is one of the few Linux distributions that works cleanly with both Hyper-V and XRDP, an open source remote desktop protocol (RDP) server.  Other distributions may work, but I’ve had limited success.

Task:  Install XRDP on Centos 6.3 (Desktop):

Download the current version of XRDP from www.xrdp.org and save the file locally.

Login into a terminal as root and change directories to where XRDP was downloaded.

Extract the source files:  tar -zxvf xrdp-v0.6.0.tar.gz

Install prerequisites.  During these, the yum package manager will queue several other packages as dependencies.  The yum install might ask to import a GPG key.  Allow it to do so.

yum install autoconf automake libtool openssl-devel pam-devel libX11-devel libXfixes-devel vnc-server

Change to the xrdp directory, and run the following to compile the program:

./bootstrap
./configure
make
make install

If installed, open TCP and UDP ports in the Gnome firewall
System -> Administration -> Firewall
Other Ports -> Add
3389 TCP / UDP

Next, configure XRDP to load on system startup.  Execute the following from a terminal as root:

Copy the xrdp.sh initialization script to init.d:  cp /etc/xrdp/xrdp.sh /etc/init.d/

Add XRDP as a service in linux:  chkconfig –add xrdp.sh

Either reboot or manually start XRDP:  /etc/xrdp/xrdp.sh start

Done

You may also be interested in how to disable the system bell in Gnome, if it becomes an issue.  Read this:  https://geekhobbyist.wordpress.com/2012/12/29/disable-the-system-bell-in-gnome/

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s