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.
  • Stefan

    Very helpful..thanks!

  • Andrew Taylor

    I hope you can respond to this. I can follow all your instructions except, getting xrdp to start, and the update part for xrdp. It tells me is not an executable

    • rajisingh

      Most likely this is just a permissions issue.
      ls -al can show you the current permission.
      You need to use chmod 755 to make it executable.
      Let me know if this worked for you.

      • Andrew Taylor

        I did try this and it was a no go as well. I could not do the steps where you wget xrdp tar it and move it. the wget never created a directory, although it appeared to have completed without issue

        • rajisingh

          I don’t think wget creates a directory. It just downloads the file to the current directory.

          If this did not work

          you may have to go to the and determine if they have moved the download location. I had to go through all this when I was setting his up as well. Download locations change so they no longer work.
          Let me know if there you have a new location for wget to download xrdp so I can update the blog post as well.

  • Pingback: Remote Desktop on CentOS running in Windows Azure VM | Mohammad Manwarul Abedin()

  • Colin

    Super helpful, but I did have to make some changes for 6.5 / Azure changes / ?


    Step “xrdp was not available on CentOS so you can use the following steps to download it. ” 6 fails, change from:

    rpm -Uvh


    rpm -Uvh

    Step “Install xrdp, tigervnc-server” 1 fails, change from:

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

    openssl-devel pam-devel libX11-devel libXfixes-devel

    into a single line, i.e.:

    sudo yum install -y tigervnc-server autoconf automake libtool openssl-devel pam-devel libX11-devel libXfixes-devel

    This fails to install xrdp, because of dependency issues.

    Step “Download the latest xrdp to update it” 1 is:


    should be:

    sudo wget -O xrdp-v0.6.0.tar.gz

    Add sudo to step 3

    Don’t do step 4 (5 is the same with sudo)

    Omit 6,7,8 and do cd /usr/xrdp-v0.6.0/

    Add sudo to 9, 10,

    Skip 11, 12

    Add this line:

    vncserver /.vnc/passwd

    “Setup user groups” omit step 1

    “Start the services” omit step 2

    • admin

      I will update my blog post with the information you provided.

      Thanks Colin.