Installing Gnome desktop on CentOS running in Windows Azure VM

I recently tried to setup Gnome Desktop on CentOS 6.3 running in a Windows Azure virtual machine. It turned out to be a bit harder than expected so I thought I will document this for other who may attempt to do this in future.


You have access to Windows Azure and have already created a Linux virtual machine with CentOS 6.3 Image provided in the image gallery. You also need to have root access to the virtual machine.

Install Gnome Desktop

Every Linux VM has WALinuxAgent Package. Gnome desktop has a dependency NetworkManager package which conflicts with WALinuxAgent package. Before installing Gnome desktop you can disable NetworkManager with these steps.

Edit /etc/yum.conf and add the following line to the end of the file:

Installing xrdp

   1: exclude=NetworkManager*

   2: sudo yum clean all 

   3: sudo yum groupinstall basic-desktop desktop-platform x11 fonts 

xrdp was not available on CentOS so you can use the following steps to download it. 

   1: su root 

   2: rpm -Uvh 


   4: sudo rpm -Uvh 


   6: sudo rpm -Uvh 


   8: sudo yum -y update 

   9: sudo yum repolist 


Install xrdp, tigervnc-server

   1: sudo yum install -y xrdp tigervnc-server autoconf automake libtool 

   2: openssl-devel pam-devel libX11-devel libXfixes-devel 

Download the latest xrdp to update it

   1: wget 


   3: tar -zxf xrdp-v0.6.0.tar.gz 

   4: mv xrdp-v0.6.0 /usr/xrdp-v0.6.0 

   5: sudo mv xrdp-v0.6.0 /usr/xrdp-v0.6.0 

   6: sudo cd /usr/xrdp-v0.6.0/ 

   7: cd /usr 

   8: cd xrdp-v0.6.0/ 

   9: ./bootstrap 

  10: ./configure 

  11: make 

  12: make install 

  13: sudo make 

  14: sudo make install 

Setup user groups

   1: groupadd tsusers 

   2: sudo groupadd tsusers 

   3: sudo groupadd tsadmins 

   4: sudo nano -w /etc/group 

Edit the following lines to look like this.

   1: tsusers:x:501:YOURUSERNAME 

   2: tsadmins:x:502:root 

Now to setup VNC Password for the user that you want to use XRDP Services


   2: vncpasswd 


Edit VNC Server configuration

   1: sudo nano -w /etc/sysconfig/vncservers 

   2: #Insert at the end of file 


   4: VNCSERVERARGS[1]="-geometry 1024x768 -depth 16" 


Update rc.local file so vncserver starts even after reboots

   1: sudo nano -w /etc/rc.local 

   2: #Add the following to the end of the file 

   3: /etc/xrdp/ start 


Start the services

   1: sudo chkconfig vncserver on 

   2: sudo service vncserver on 

   3: sudo service vncserver start 

   4: sudo /etc/xrdp/ start 


Create Remote Desktop Endpoint allow RDP connection to the virtual machine 

You can either use Azure command line tools and run this command line tools

azure vm endpoint create mylinuxtemplate 3389 3389


You can also use the Windows Azure Portal.

Select the virtual machine and navigate the “endpoints” tab.

Select “Add” button from the bottom tool bar and select Port 3389 as internal and external port.

Use the connect button from the bottom toolbar in the portal to connect to Gnome desktop



I couldn’t have done this setup without these blog posts.


This entry was posted in Azure, Cloud, IAAS, Linux, Virtual Machines, Windows Azure. Bookmark the permalink.