XRDP – Remote Connect to Gnome Classic Interface – Option 1

Hello World,

As you have probably noticed, we have been quite busy playing around with XRDP,Ubuntu 16.04 and TigerVNC software package.  In our recent post, we have demonstrated that’s possible to use xrdp to remote connect to the Unity Desktop directly when installing TigerVNC instead of the standard X11vnc or Vnc4server packages. In another post, we have also shown that XRDP can connect to different Desktop environment and not only to the Unity Desktop.

So, this is great news for people wanting to connect to the Unity Desktop Interface through xrdp software solution. But what if some people want to connect to a different Desktop Environment and more specifically the Gnome Classic interface. 

In this two-part posts, we will show you that the Gnome Classic (or Gnome 2) package has been updated and it’s now possible to perform a remote desktop connection and access the Gnome Classic Interface.

In this part, we will cover the easy way process that can be used to have the Gnome classic desktop working with XRDP. In the next post (Part II), we will describe another way that allows you to access the Gnome Classic Desktop via XRDP.

So, Ready to dive in…..Let’s go…!!!

Installation Process – The Easy Way

In this section, we will describe the installation process that can be used to access the Gnome Desktop Interface through the XRDP solution.  The easy install method means for us that we will use the standard xrdp package and install it. We will not perform any custom installation or use the TigerVNC software package.

Step 1 – Install the XRDP Package

As a first step, we need to install the xrdp package from the Ubuntu repository. To perform the installation, we simply issue the following command in a Terminal Console

sudo apt-get install xrdp -y 

You might be prompted for a password. Provide it and wait for the process to complete

Step 2 – Install Gnome Classic Desktop

To install the Gnome Classic Desktop, you will issue the following command in a terminal console.

sudo apt-get install gnome-session-flashback -y 

Click on Picture for Better Resolution

Wait for the process to complete. When completed, login from the console and select the gnome metacity option in the login menu (see screenshot below).  Ensure that your gnome metacity session is configured properly and that you can see the panel in the top bar

Click on Picture for Better Resolution

Step 3 – Configure your xrdp settings 

You need to specify which desktop to start while connected through xRDP session.  To perform this action, you would need to create and populate either the .xsession file (per user) or the /etc/startwm.sh (all users) with the proper configuration information (as described below)

1 –  Open a Terminal console and issue the following command (if you have only one user on your system)

echo "gnome-session --session=gnome-flashback-metacity --disable-acceleration-check & gnome-panel"
>~/.xsession

or

sudo sed -i.bak '/fi/a #xrdp multi-users \n "gnome-session --session=gnome-flashback-metacity --disable-acceleration-check & gnome-panel" \n' /etc/xrdp/startwm.sh

Step 4 – Configure the Keyboard Settings for XRDP

If you are using a keyboard layout different that en-US with your system, you will need to perform an additional configuration. By default, when you provide your credentials in the xrdp login page, the keyboard layout will be en-us.  The same would occur inside your XRDP session.  To change that, you can perform the following actions :

If you wish to use a different keyboard layout, proceed with the following actions

1 : You go to the /etc/xrdp directory

2 : you issue the command setxkbmap -layout <%your layout%> to define which keyboard map/layout to use. In my case, in using a belgian keyboard, so I would type setxkbmap -layout be 

3 : create a copy of the km-0409.ini file into the same directory. It seems that this is the default file used by xrdp to define the keyboard layout. You will need to use sudo in order to be able to write into the directory

4 : Check that you have a backup of your file by typing the dir or ls command

5 : update the file by issuing the following command sudo xrdp-genkeymap km-0409.ini

Step 5 – Reconnect to the same session

Since Ubuntu 14.10, a new xrdp package has been made available in the Ubuntu repository. This package fixes a long time issue related to the fact that users could not reconnect to the same session.  If you are using the packagexrdp 0.6.1-1 or later, you do not need to perform any customization, you will reconnect automatically to the same session.

Final Notes

That’s it for this post !  We have been able to connect to the Gnome Classic Desktop using the default xrdp package available in the Ubuntu repository.

Click on Picture for Better Resolution

 The fact that we can connect to the gnome Classic Desktop is due to the fact that a new option has been made available…   The option is

  • Disable-acceleration-check

We discovered this new option by pure luck.  Some people notified us that the logout option was not working as expected when performing the XRDP connection to Ubuntu 16.04. We were looking at using the command line option gnome-session and we saw this new option (see screenshot below)….

Click on Picture for Better Resolution

If you are familiar with xRDP, you would be aware that the gnome 2 desktop was failing with an error related to the hardware acceleration failure…This new option remove the constraint of hardware acceleration and make it possible to connect to your Gnome Classic Interface like in the past…

In the second part of this article, we will demonstrate that we can achieve the same result and no need to disable the acceleration capabilities through the usage of the TigerVNC package

Till next time

See ya

6 thoughts on “XRDP – Remote Connect to Gnome Classic Interface – Option 1

  1. Thank you

    I have been learning Linux for the last few days of my holiday and have found your articles very useful

    I have done a few silly things but through trial and error and articles like your own I am much more confident

    Cheers!
    Steve

  2. @Steve D,

    Thank you for your positive feedback and visiting our blog ! We are happy to see that our articles can provides you the info you are looking for…
    This is nice to see that our hard work is useful

    Till next time
    See ya

  3. @Greg F

    No we never tried to install xrdp on ARchLinux.. We see more and more requests for OS we do not use…As soon as we have a little bit of time, we will see if we can cover these Oses (Linux Mint, ARcLinux, Raspbian…)

    Till next Time
    See ya

  4. What does it mean ” login from the console” in step 2:
    How can I do this?

    Thanks!

Leave a Reply