XRDP – Small bug in Ubuntu 16.04.3 breaks custom XRDP install – Missing fontutil.h file

Hello World,  

Recently, a lot of our readers have encountered issues when performing the custom installation of xRDP on Ubuntu 16.04.3 version as described here.  In this post, a script to automate the custom installation process (version 1.9) was provided and used to work on Ubuntu 16.04.2 release….until now.  After some digging and after receiving some feedback from some of our followers (thank you Brian ! ), it appears that something has changed in the Ubuntu 16.04.3 that has broken the xrdp custom installation process.  There is a small bug that prevent the script to complete the installation.  In this short post, we will quickly explain the problem and try to provide some solutions and workarounds. 

As we have been travelling abroad and as we have been working on a lot of different projects, we didn’t got time to have a close look into this issue.  We have been really surprised and pleased to see that some readers have reacted and provided positive feedback and useful info about this issue.  We would like to thanks the people that have reported either issues, people that have been testing the install process that helped identify the issue and people who have filed a bug to Ubuntu so a fix could have been provided… Thank to all of you 🙂

Problem Description 

In our previous posts, we have described the process to perform a custom installation of xRDP based on the information made available by the team behind xRDP software.  In order to automate the installation, we have been providing for some time now, a nice little script that perform the installation for you.  The latest version of the script is set to 1.9 (install-xrdp-1.9.sh). However, people trying to run the script on Ubuntu 16.04.3 release will find out that the installation did not proceed as expected and that the xRDP solution does not work for them.   

Indeed,  if you leave your system unattended during the installation, your system will reboot and you would assume that the installation has been completed and successfully performed. When you connect through your remote desktop client to your Ubuntu 16.04.3 machine, you will see the xRDP login prompt. After putting your credentials and pressing the OK button, you will be only presented a green desktop and you will never see your Unity Desktop interface. 

error_fontutli_custom_1

Click on Picture for Better Resolution 

You will be either disconnected after some time or you might see the following error dialog box…. 

error_fontutli_custom_1b

Click on Picture for Better Resolution 

When you run the install script we have provided, if you monitor the installation, when the xorgxrdp package is in the process of being compiled, a fatal error occur which terminate the compilation process and the xorgxrdp component is basically not installed.  The error is the following 

fatal error : X11/fonts/fontutil.h No such file or directory
compilation terminated 

error_fontutil_custom_install

Click on Picture for Better Resolution 

 

Because the installation process cannot find this file, the installation has not proceeded successfully and  this is why you see this green desktop in front of you and you cannot access the remote session using the xorg option with xRDP software…  

 

Solution & Workarounds 

Obviously, this small bug has detected by multiple person and we have been notified that a fix was available.  Actually, you can fix the “compilation” problem in two different ways.  

Make fontutil.h file available 

Because the compilation process is complaining about a missing file, to overcome the situation, you could simply manually create the file or obtain a copy of the file and place it in the correct directory on your system. 

If you want to manually create the file, perform the following actions. 

From a terminal, issue the following command

sudo nano /usr/include/X11/fonts/fontutil.h 

error_fontutil_custom_install_2

Click on Picture for Better Resolution 

Then, open the file (using sudo) and copy the following text inside the file and save it 

#ifndef _FONTUTIL_H_
#define _FONTUTIL_H_

#include <X11/fonts/FSproto.h>

extern int FontCouldBeTerminal(FontInfoPtr);
extern int CheckFSFormat(fsBitmapFormat, fsBitmapFormatMask, int *, int *,
			 int *, int *, int *);
extern void FontComputeInfoAccelerators(FontInfoPtr);

extern void GetGlyphs ( FontPtr font, unsigned long count,
			unsigned char *chars, FontEncoding fontEncoding,
			unsigned long *glyphcount, CharInfoPtr *glyphs );
extern void QueryGlyphExtents ( FontPtr pFont, CharInfoPtr *charinfo,
				unsigned long count, ExtentInfoRec *info );
extern Bool QueryTextExtents ( FontPtr pFont, unsigned long count,
			       unsigned char *chars, ExtentInfoRec *info );
extern Bool ParseGlyphCachingMode ( char *str );
extern void InitGlyphCaching ( void );
extern void SetGlyphCachingMode ( int newmode );
extern int add_range ( fsRange *newrange, int *nranges, fsRange **range,
		       Bool charset_subset );

#endif /* _FONTUTIL_H_ */

error_fontutil_custom_install_3

Click on Picture for Better Resolution 

When the file is place in the /usr/include/X11/fonts directory and properly populated, you can run the custom installation script and you should see that the compilation process simply go through (see screenshot no more fatal error message) 

error_fontutil_custom_install_4

Click on Picture for Better Resolution

Enabling Ubuntu proposed repository 

The other option would consist of enabling on your Ubuntu system, the proposed repository option. Since some users have reported the issue to xRDP and Ubuntu team, see the following links 

a quick fix package has been made available but it’s not available by default.    To be able to compile xrdp, you will need to enable Developer Options Ubuntu package download.   

You can enable this option via the GUI or via the command line.  So, let’s first see how to perform this action through the GUI 

Enable Pre-Release Updates via GUI

To do this, perform the following actions 

  • click on the Dash and search for software Updates. In the result page, click on the icon Software   & Updates icon 

    U16.04.3_0

    Click on Picture for Better Resolution

  • The Software and Updates dialog box is displayed 

U16.04.3_1

Click on Picture for Better Resolution

  • Click on the Developer Option tab and tick the checkbox next to the Enable Pre-release Updates. You might be prompted for a password in order to enable this feature

U16.04.3_2

Click on Picture for Better Resolution

U16.04.3_3

Click on Picture for Better Resolution

  • Press close button and you will be informed that info about software is out-to-date.  Press the reload button and wait for the process to complete. 

U16.04.3_4

Click on Picture for Better Resolution

U16.04.3_5

Click on Picture for Better Resolution

 

Enable Pre-Release Updates via command line 

If you prefer to perform the same actions via a command line, you simply need to issue the following commands in a terminal console 

sudo add-apt-repository “deb http://archive.ubuntu.com/ubuntu/ $(lsb_release -cs)-proposed restricted main multiverse universe”

sudo apt-get update

U16.04.3_6

Click on Picture for Better Resolution

You should be then ready to proceed with your custom installation either using the custom installation script or perform your manual compilation process 

Final Notes

This is for this post !  As you can see, changes in Ubuntu can break your xRDP installation.  The small bug detected recently has shown that a simple missing file can break the compilation process. The custom installation script remains valid as long as you perform the correct actions to either create your fontutil.h file or if you enable the proposed repository.  We wanted to describe both options as in some environment, deploying developer options packages might not be a good idea.  

Now, while investigating and documenting this issue, we have discovered some additional issues with Ubuntu 16.04.3 and xRDP. We will address these other issues in separate posts and we will probably updated the custom install script as well to ensure that you can perform the installation in an automated way 

Stay Tuned 

Till next time 

See ya

 

 

 

4 thoughts on “XRDP – Small bug in Ubuntu 16.04.3 breaks custom XRDP install – Missing fontutil.h file

  1. @Brendan,

    Thank you for sharing the info with us and for your visit.. We will try to take this into account in our next posts about xrdp
    Till next time
    see ya

  2. Thanks for the instructions. Tried it out today. The workaround seems not to be needed any more.
    fontutils.h is there. Still I get a black screen and an error message after a while

Leave a Reply