xRDP – How to Fix Theme issues in Ubuntu 18.04 remote session

Hello World, 

In the previous post, we have performed a simple/standard installation of xRDP using the Ubuntu repository package through our Std-install-xrdp script (version 0.2).  The script streamline the installation and configuration of xrdp on top of Ubuntu 18.04 (at least for the user running the script !!!).   If you perform a manual installation of xRDP (out-of-the-box), the first time you connect remotely, Dock, top bar will not be enabled and the theme is not set to the default Ambiance theme as it should when login locally on the Ubuntu machine. So, without the script, you will then need to perform some manual actions to have a similar look’ n feel in your remote session.  

The Std-install-xrdp script (version 0.2) can perform some of the additional configuration actions needed to mimic the local desktop into the Remote session.  However, there is a small limitation (which will be adjusted in the Std-Install-xrdp-v0.3.sh script).   These additional configuration settings only affect the user that run the script.  So, if you have a system where multiple users connect via remote desktop, they will see a gnome desktop with no Dock and no Top bar menu.  Moreover, the theme will not be set to the default one used by Ubuntu.  

So, in this post, it’s time to fix this situation.  This post will explain what’s the issue we want to tackle and we will explain how to manually solve them.  This information will be integrate in the Std-Install-xrdp-v0.3.sh script that will be released shorter after this post….. 

So, let’s go….. 

xRDP & Ubuntu Dock,Top bar and Theme Issues

Assumptions

For this post, we have make some assumptions.

  • The Ubuntu  18.04 final release will be used
  • At time of writing, all available updates were installed on the Ubuntu machine
  • No alternative Desktop will be used. Default Gnome desktop will be the default desktop accessible via the xrdp session
  • The default Ubuntu Theme is used (i.e. Ambiance and Humanity Icons) for everybody connecting to the machine
  • We are using the standard xrdp package available within the Ubuntu repository for Ubuntu 18.04
  • Ubuntu machine has been installed as virtual machine using Virtualbox software  and Hyper-V 

Look’n Feel Issues in Remote sessions

Dock and Top bar missing in Remote Session

Performing a standard installation of xRDP (not using our script), the remote software will be installed and users will be able to connect remotely to the system.  However, the first time the connection is performed, the desktop interface will look like the following on the screenshot below 

Polkit_3

Click on picture for better resolution

The dock bar and the app Indicator menu extensions are not enabled within the remote session.  To manually fix this issue (for each user), you will need to install the gnome tweaks tool and enable the different extensions and settings you want to use.

Desktop_02

Click on picture for better resolution

Using the Std-Install-xRDP script (version 0.2), these settings can be configured automatically but only for the user that has run the script.  If another user perform a remote connection, the standard Ubuntu Gnome Desktop (no Ubuntu Dock, no App Indicator, no Ambiance theme) will be presented in the remote session….So, Install script needs improvements….

No Default Ubuntu Theme or nor icons in Remote Session

The other recurrent issue/annoyance when performing a remote connection is the fact that the look’n feel is not the one that’s configured by default on the local session. The Dock will be there and the wallpaper is still there.  However, looking a little bit closer, you can see some small differences…

Desktop_04

Click on picture for better resolution

The Std-Install-xRDP script has tackled the Dock and App Indicator bar but does not contain the logic to set the proper Ubuntu theme by default. So, the first time any users connect, they will notice a different look’n feel compared to the one available by default on Ubuntu 18.04 LTS. The first time you connect through remote desktop, you will notice that the icons in the Dash are not similar (I would say ugly) to the one you would see when locally connected to Ubuntu 

04_SoftInstall

Click on picture for better resolution

When opening Nautilus in a remote session, you can see immediately the difference.  The icon set are all the same (white icons) and the decoration of windows is gray not brown like in the standard Ubuntu theme.

05_SoftInstall

Click on picture for better resolution

Finally, if you open Terminal, you will see also a non standard white background. The standard color should be purple 

06_SoftInstall

Click on picture for better resolution

To fix this theming issues, it’s really easy.  You will be using the Gnome Tweak utility and set the proper theme and icon Set to be used….  In the screenshot below, you can see that the theme is set to adwaita.  

07_SoftInstall

Click on picture for better resolution

From the dropdown box list, select the theme that you want to use.  We want to have the same look n feel in remote connection and local connection so we have selected the Ambiance Theme

08_SoftInstall

Click on picture for better resolution

As soon as the option is selected, you should see the new theme applying.  However, the icons in the Dock has not changed yet.  

09_SoftInstall

Click on picture for better resolution

To change the icons, you have to select also the correct icons set. In the gnome Tweak tool, we have selected the option Humanity or Humanity-dark

10_SoftInstall

Click on picture for better resolution

Again, as soon as we changed the settings, the icons set in the Dock changes…

11_SoftInstall

Click on picture for better resolution

You (or the users) will need to perform these changes for each users in their remote session to get the same look’n feel between local sessions and remote sessions.   

Fixing Look’n Feel issues for all the users….. 

To fix these issues once for all and ensuring that your default settings would apply to all your users, the solution is actually quite simple.  The trick to have a similar Look n’ Feel between local sessions and remote session is to add the necessary commands into the /etc/xrdp/startwm.sh file.  However, note that there is some limitations with this approach.  If you modify the startwm.sh file, this means that the same theme will be applied to all users performing a remote connection.  If the user change the theme inside its remote session, these changes will be reverted back to the default you will have set inside the startwm.sh file 

So, the startwm.sh file should contains the following commands (at the top of the file).  These commands will be executed every time a user remotely connect to the machine…. 

gnome-shell-extension-tool -e ubuntu-dock@ubuntu.com
gnome-shell-extension-tool -e ubuntu-appindicators@ubuntu.com
gsettings set org.gnome.desktop.interface gtk-theme 'Ambiance'
gsettings set org.gnome.desktop.interface icon-theme 'Humanity'

Updating the Std-Install-Xrdp Script (Work in Progress…) 

In a near future, our famous Std-Install-xRDP script will be updated in order to take into account this minor look and feel issues.  These issues might be minor but fixing them will provide a better experience to the user which will make them adopt and use the solution more easily.  The script might (maybe or maybe not) might provide a more flexible solution for fixing the theme issue and might be able to take into account users preferences…. We will see if we have enough time to work on this…..

Final Notes 

That’s it for this post !  

As you can see, we have recently taken actions to tackle the most common issues and annoyances that can occur when using xRDP.  In a previous post, we have see how to fix (correctly) the issue related to the annoying popup asking permissions to create managed devices.  In another one, we have tried to fix the crash popup when login into the machine…With this post, we have tackled the look’n feel issues as well.  

There is still a small look n feel issue that we would like to tackle..  

xrpd_manual_10

Click on picture for better resolution

The different lock screens in remote sessions and local sessions.. If we have enough time, we will try to tackle this issue as well but might be a little bit more complicated than changing themes and enabling extensions….

Stay tuned…

Till next time 

See ya 

 

Leave a Reply