Hi all.
I know this is a pretty old post, but I think is a good place to explain how I was able to compile and install the X11rdp Server and the xrdp “Gateway” (let me call it this way) in a brand new openSUSE 11.3 installation.
First of all, I work in networking and also I’ve some skills in programming and administering different systems, but I’m very newbie on Linux and I’m an absolutely rookie with xrdp, so I apologize if I say a lot. Only want to share my experience hoping this helps anyone to get this excellent tool working, to save some time and to not to get frustrated.
I downloaded the latest versions I've been able to find. On today (December 2010) they can be found here:
http://server1.xrdp.org/xrdp/xrdp-5.0.tar.gz
http://server1.xrdp.org/xrdp/x11rdp_xorg71.tar.gz
To compile them it is also required to have the modules “openssl-devel”, “pam-devel” and “gcc” installed. I did this task using YaST.
The installation of the xrdp-5.0 module was very easy. Simply to untar it in a temporary directory, and to follow the instructions on the readme.txt file, ie from this temporary folder and as root execute the following commands to compile the modules:
Code:
./bootstrap
./configure
make
…and finally to execute the following one to install each file the corresponding folder:
This installs some xrdp files and libraries in the following directories:
Code:
/usr/local/share/xrdp
/usr/local/lib/xrdp
…the xrdp executables in the following one:
…and some scripts, ini files and keyboard layouts at:
In this folder is located the “xrdp.sh” script. And also the “xrdp.ini” and “sesman.ini” files are here. The ini defaults are ok by the moment, and with the script you can start or stop the xrdp server with the commands:
Code:
/etc/xrdp/xrdp.sh start
/etc/xrdp/xrdp.sh stop
(note: I think in older versions of xrdp this script was called “xrdp_control.sh”)
It’s a good idea to start it automatically as a service when the system starts. To do this step I follow the instructions I found in different posts to create a service called xrdp_control:
Code:
cp /etc/xrdp/xrdp.sh /etc/init.d/xrdp_control
chkconfig -add xrdp_control
chkconfig -level 35 xrdp_control on
service xrdp_control start
Well, if all was OK at this point we should be able to connect to our Linux system from a MS Windows machine using Remote Desktop. When connecting the xrdp service will offer us a “sessman” login window on which we can select between different session modules like “sesman-Xvnc”, “console”, ”vnc-any”, etc.
The configuration for the six default session modules resides in the “xrdp.ini” file. The first five are “VNC” sessions (they use lib=libvnc.so) and the last one, “sesman-X11rdp”, is a “X11 RDP Server” session (it uses lib=libxup.so), but it is not yet available because we have not yet installed the X11rdp Server, only the xrdp "VNC to RDP gateway".
I’m not an expert, but it seems that this "VNC" gateway module works opening an internal VNC session between our Linux machine and the xrdp service, and then this xrdp service “translates” the session content to our Windows client, dumping it as graphic content via the rdp protocol.
This may be enough for many people, as it works fine in LAN environments, but consumes some server resources and the performance decreases noticeably when the bandwidth and latency conditions are not so good.
At this point it may be interesting to install the “X11 RDP Server”, as it seems to use some native rdp functions, consuming fewer resources and giving better performance.
But the installation was a little bit tricky, and I get the same error Stuart was:
Code:
/usr/include/X11/extensions/Printstr.h:761: error: expected specifier-qualifier-list before 'PrivateRec'
The “Printstr.h” is part of the xorg-x11-proto-devel source files, so not so much to do…
But after some googling and reading I found a different definition for the offending function (in the _XpContext structure) on which the line all wasthe same except thta the line “PrivateRec *devPrivates;” appears as “DevUnion *devPrivates;”. Not sure of what I was doing but I edited the file, change this line, tried to install again and… tadaaa, it woks!
To facilitate the work here they're steps I did:
- They’re some required modules to compilethe X11rdp server, like “xorg-x11-proto-devel”, “openssl-devel”, “pam-devel” or “gcc” (don’t remember if they’re more modules required, experiment by yourself…). As before I did this task using YaST.
- Untar the server source file (x11rdp_xorg71.tar.gz) in a temporary folder.
- Not sure if at this time this step is still required, but I follow the recommendations from shadowsnipes to add the “--with-fontdir=” parameter to the “./configure” command to recompile the X11 server in the
buildx.sh script file (
line 815). In my case the correct directory is “/usr/share/fonts”:
Code:
# xorg-server
if ! test -f $PCFILEDIR/xorg-server.pc
then
cd xorg-server-X11R7.1-1.1.0
./configure --prefix=$PREFIXDIR --with-fontdir=/usr/share/fonts --enable-xglx
--with-mesa-source=$SRCDIR/Mesa-6.5 --disable-dmx
if ! test $? -eq 0
then
…
…
- The next step is to edit the
/usr/include/X11/extensions/Printstr.h and change it as follows (
line 761):
Code:
typedef struct _XpContext {
XID contextID;
char *printerName;
int screenNum; /* screen containing the printer */
struct _XpClient *clientHead; /* list of clients */
CARD32 state;
VisualID pageWin;
/*PrivateRec *devPrivates;*/
DevUnion *devPrivates;
XpDriverFuncs funcs;
ClientPtr clientSlept;
int imageRes;
} XpContextRec, *XpContextPtr;
- Next one is easy. Simply execute as root the “buildx.sh” script with the required parameter (the build directory). In my case “/usr” is the correct one:
- As shadowsnipes says is a good time to do other things, as it is a time consuming process, but if all goes OK it is the last step and there is nothing else to do. The current version of the script takes care of all the compiling process and executes all the required configure, make and make install commands.
- At the end all the modules will be installed in the correct places and you only need to start your rdp client and connect to the “sesman-X11rdp” session module.
- Finally, I prefer to have this session as the default one, so as a final step I edited the “/etc/xrdp/xrdp.ini” file and move the “sesman-X11rdp” session to the first place.
Hope this helps others to have X11 RDP Server up and running. I’m delighted with mine
Bernardo.