Xrdp Tip – How to reconnect to the “same” remote session

xrdplog2rec

Hello World,

We have received positive feedback on our posts related to  XRDP installation on Ubuntu and how to perform remote desktop connection from windows computers. However, we are still receiving questions related to xrdp and how to reconnect to a existing remote session.

We have already described the installation procedure to perform just that but in a discrete way.  This time we will expose the problem and the solution for such situation in more visible way.

Let’s go !

The Problem

In our previous post, we have described the easy way to install xrdp in Ubuntu and we have explained the needed configuration to have a working keyboard and a workable desktop interface.  Using this installation procedure; you will end up with a quite common problem : you will not be able to reconnect to an existing remote session.

Click on picture for better resolution

To illustrate the problem, let’s imagine the following situation.  You have performed the installation of xrdp as described in our previous post, you have made a remote desktop connection and everything works as expected.  You are currently working on your spreadsheet and your are inserting data to it.  If you decide to disconnect from the remote desktop session in Ubuntu (or if you have been disconnected (time out) and try to remote desktop back to your Ubuntu system, you will notice that a brand new desktop is displayed.  You have lost your spreadsheet and the work you were doing.

This is the standard behaviour when working with xRdp and underlying VNC Server component.  Each time you connect to your Ubuntu machine, you will be creating a new remote session on the server (even if you are using the same user account).

Note : There might be ways to change this behavior when xrdp is configured to use VNC Server but we didn’t check for it.  We have used another approach…

The Solution

To overcome this situation, we have described in this post  how to perform a custom installation of xRDP. Custom installation because you will compile yourself the xrdp source and replace the default VNC Server component found in the Ubuntu package with the X11VNC software solution.

By replacing the default VNC Server with the X11VNC component, you should be able to reconnect to your existing remote session.  You will be able to disconnect from your session and reconnect and find the same desktop session as before.  If you were working on a spreadsheet, you will be able to resume your work on it.  Cool, isn’t it

For this post, we will be using the latest version of XRDP Sources available (which is 0.7.0).  This post provides detailed information about how to perform the installation.  In this post, we will summarize these steps and outline the deviation in the installation process.

Prepare Ubuntu machine for manual installation of xRDP

At this stage, we are simply installing software needed in order to compile xrdp sources on your Ubuntu machine. During this phase, we will also install the alternative desktop to be used (in my case gnome) and create the necessary configuration file to have it working.  Finally, we will be installing the X11VNC package which will replace the VNC4Server package

From a command line, you should type the following commands

sudo apt-get install autoconf libtool libpam0g-dev libx11-dev libxfixes-dev libssl-dev
 sudo apt-get install gnome-session-fallback 
 echo  ”gnome-session --session=gnome-fallback” > ~/.xsession
 sudo apt-get install x11vnc
For more information, have a look at this location 

Download and Install Xrdp packages from sources

The xrdp project has been joining the FreeRDP community. You will find the latest version of the package sources at this location : https://github.com/FreeRDP/xrdp.  The current version of xRDP is version 0.7.0

You can then go to the location where the package has been downloaded (in my case /home/griffon/Downloads) and extract the content of the archive by right-clicking the package and selecting extract here.  We are ready to perform the installation of the xrdp package.

To compile and install the xrdp package, from a Terminal, type the following commands
 
cd /home/<%youraccount%>/Downloads/xrdp-master/ (go to the location where xrdp source files are )
sudo ./bootstrap
sudo ./configure
sudo make
sudo make install
 

 

Post Setup Configuration

 

At this stage, we have installed the xrdp software but we still need to configure our system in order to have xrdp using X11Vnc package and have the xrdp service started automatically when the Ubuntu computer is restarted.  To have this done, you will again open your terminal box and issue the following commands

 

sudo apt-get install xrdp 
sudo apt-get remove xrdp

sudo mv startwm.sh startwm.sh.backup
sudo ln -s /etc/X11/Xsession /etc/xrdp/startwm.sh
sudo mkdir /usr/share/doc/xrdp
sudo cp /etc/xrdp/rsakeys.ini /usr/share/doc/xrdp/rsakeys.ini

 

As a final step, you will need to update the /etc/init.d/xrdp configuration file because we have made a custom installation of xrdp software. Simply copy the content of the modified xrdp script file into your /etc/init.d/xrdp file and you should be good to go.

<-------   Begin of the Script -------->
#!/bin/sh -e
#
# start/stop xrdp and sesman daemons
#
### BEGIN INIT INFO
# Provides:          xrdp
# Required-Start:    $network $remote_fs
# Required-Stop:     $network $remote_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start xrdp and sesman daemons
# Description:       XRDP uses the Remote Desktop Protocol to present a
#                    graphical login to a remote client allowing connection
#                    to a VNC server or another RDP server.
### END INIT INFO

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/local/sbin/xrdp
PIDDIR=/var/run
SESMAN_START=yes
USERID=xrdp
RSAKEYS=/etc/xrdp/rsakeys.ini
NAME=xrdp
DESC="Remote Desktop Protocol server"

test -x $DAEMON || exit 0

. /lib/lsb/init-functions

check_root()  {
    if [ "$(id -u)" != "0" ]; then
        log_failure_msg "You must be root to start, stop or restart $NAME."
        exit 4
    fi
}

if [ -r /etc/default/$NAME ]; then
   . /etc/default/$NAME
fi

# Tasks that can only be run as root
if [ "$(id -u)" = "0" ]; then
    # Check for pid dir
    if [ ! -d $PIDDIR ] ; then
        mkdir $PIDDIR
    fi
    chown $USERID:$USERID $PIDDIR

    # Check for rsa key 
    if [ ! -f $RSAKEYS ] || cmp $RSAKEYS /usr/share/doc/xrdp/rsakeys.ini > /dev/null; then
        log_action_begin_msg "Generating xrdp RSA keys..."
        (umask 077 ; xrdp-keygen xrdp $RSAKEYS)
        chown $USERID:$USERID $RSAKEYS
        if [ ! -f $RSAKEYS ] ; then
            log_action_end_msg 1 "could not create $RSAKEYS"
            exit 1
        fi
        log_action_end_msg 0 "done"
    fi
fi

case "$1" in
  start)
        check_root
        exitval=0
        log_daemon_msg "Starting $DESC " 
        if pidofproc -p $PIDDIR/$NAME.pid $DAEMON > /dev/null; then
            log_progress_msg "$NAME apparently already running"
            log_end_msg 0
            exit 0
        fi
        log_progress_msg $NAME
        start-stop-daemon --start --quiet --oknodo  --pidfile $PIDDIR/$NAME.pid \
	    --chuid $USERID:$USERID --exec $DAEMON
        exitval=$?
	if [ "$SESMAN_START" = "yes" ] ; then
            log_progress_msg "sesman"
            start-stop-daemon --start --quiet --oknodo --pidfile $PIDDIR/xrdp-sesman.pid \
	       --exec /usr/local/sbin/xrdp-sesman
            value=$?
            [ $value -gt 0 ] && exitval=$value
        fi
        # Make pidfile readables for all users (for status to work)
        [ -e $PIDDIR/xrdp-sesman.pid ] && chmod 0644 $PIDDIR/xrdp-sesman.pid
        [ -e $PIDDIR/$NAME.pid ] && chmod 0644 $PIDDIR/$NAME.pid
        # Note: Unfortunately, xrdp currently takes too long to create
        # the pidffile unless properly patched
        log_end_msg $exitval
	;;
  stop)
        check_root
	[ -n "$XRDP_UPGRADE" -a "$RESTART_ON_UPGRADE" = "no" ] && {
	    echo "Upgrade in progress, no restart of xrdp."
	    exit 0
	}
        exitval=0
        log_daemon_msg "Stopping RDP Session manager " 
        log_progress_msg "sesman"
        if pidofproc -p  $PIDDIR/xrdp-sesman.pid /usr/local/sbin/xrdp-sesman  > /dev/null; then
            start-stop-daemon --stop --quiet --oknodo --pidfile $PIDDIR/xrdp-sesman.pid \
                --chuid $USERID:$USERID --exec /usr/local/sbin/xrdp-sesman
            exitval=$?
        else
            log_progress_msg "apparently not running"
        fi
        log_progress_msg $NAME
        if pidofproc -p  $PIDDIR/$NAME.pid $DAEMON  > /dev/null; then
            start-stop-daemon --stop --quiet --oknodo --pidfile $PIDDIR/$NAME.pid \
	    --exec $DAEMON
            value=$?
            [ $value -gt 0 ] && exitval=$value
        else
            log_progress_msg "apparently not running"
        fi
        log_end_msg $exitval
	;;
  restart|force-reload)
        check_root
	$0 stop
        # Wait for things to settle down
        sleep 1
	$0 start
	;;
  reload)
        log_warning_msg "Reloading $NAME daemon: not implemented, as the daemon"
        log_warning_msg "cannot re-read the config file (use restart)."
        ;;
  status)
        exitval=0
        log_daemon_msg "Checking status of $DESC" "$NAME"
        if pidofproc -p  $PIDDIR/$NAME.pid $DAEMON  > /dev/null; then
            log_progress_msg "running"
            log_end_msg 0
        else
            log_progress_msg "apparently not running"
            log_end_msg 1 || true
            exitval=1
        fi
	if [ "$SESMAN_START" = "yes" ] ; then
            log_daemon_msg "Checking status of RDP Session Manager" "sesman"
            if pidofproc -p  $PIDDIR/xrdp-sesman.pid /usr/local/sbin/xrdp-sesman  > /dev/null; then
                log_progress_msg "running"
                log_end_msg 0
            else
                log_progress_msg "apparently not running"
                log_end_msg 1 || true
                exitval=1
            fi
        fi
        exit $exitval
        ;;
  *)
	N=/etc/init.d/$NAME
	echo "Usage: $N {start|stop|restart|force-reload|status}" >&2
	exit 1
	;;
esac

exit 0

 

Minor Configuration changes since version 0.6.0

After you have updated the /etc/init.d/script, you should normally restart the service by issuing the command

sudo service xrdp restart 

With version 0.7.0, you will get an error when you will perform this operation.  You will be notified that the log file cannot be opened.  The problem here is just a permission issue.  You will have to navigate to the location /var/log and change the permissions in a way that the service script can open the file and write on it.

Click on Picture for better resolution

 

After making this change, you should be good to go and you should be able to remote desktop to your Ubuntu machine or to reconnect to a previous remote session you had to leave. To show you that this is a working configuration, we have made a small video as well about it.  Have a look at it !

 

Choosing the correct sesman module when prompted for the XRDP connection

We had to update this post because a lot of people were encountering a small issue while trying to perform the xrdp remote connection.  A connection error message was displayed when trying to perform the connection.   You have to select the sesman-Xvnc module in the xrdp login box in order to be able to connect to your desktop while using this custom setup.

We have write a small post explaining the problem and the solution and how to fix it permanently.  Please have a look at this location  http://c-nergy.be/blog/?p=4242 before trying your first remote desktop connection.

Customization your XRDP login interface

In the video above, you have probaly noticed that we have customize the login interface when connecting to the xrdp interface.  We have explain the process in this post.  You can follow exactly the same instruction in order to change background image and customize your login box.  However, there is again here a small change related to the permissions.  If you simply replace the file and do not change the permissions, the background image you have selected will not be displayed

Click on picutre for better resolution

 

Final Notes

And voila ! We are done with this post.  As mentioned earlier, we already talked about this topic but we kept receiving questions about how to reconnect to existing remote desktop session using xrdp.  We hope that this post will be more visible and will provide the answer to the question.

Till next time

See ya

 

52 thoughts on “Xrdp Tip – How to reconnect to the “same” remote session

  1. After I’ve done all steps Gnome not started (just xterm without window manager). After I’ve recoverered fiel startwm.sh from backup gnome works ok.

    Regards

  2. Hello There,

    Thank you for the feedback….

    When you have perform your xrdp connection, have you selected from the module dropdown box the option Sesman-Xvnc.
    If you select the default one, It’s possible indeed that you will end up with a not working desktop interface….

    We did not encounter this issue….. If more people have the error let us know and we will check….
    Again thank you for the feedback

    Till next time
    See ya

  3. Hi Griffon,
    Thanks for the excellent instructions — when I try to log in, though, I get:
    ===============START======================
    Connecting to sesman ip 127.0.0.01 port 3350
    sesman connect ok
    sending login info to session manager, please wait…
    xrdp_mm_process_login_response: login successful for display 11
    started connecting
    connecting…
    connect error
    connecting…
    connect error
    connecting…
    connect error
    connecting…
    connect error
    connecting…
    connect error
    connection problem, giving up
    some problem
    ==============END======================

    It worked fine with the standard xrdp package, but I’m getting this now after trying the custom compile you suggested for reconnecting to remote sessions.

    Any ideas? THANKS!!

  4. Hello Bob,

    When you are presented with the login box of xrdp software, in the module drop down box, you have to select the option Sesman-Xvnc and not the default one that’s presented to you

    Please give it a try and let me know if this fix you problem

    Till next time
    See ya

  5. Hello Griffon,
    Thank you very much for sharing this idea to reconnect to the same session. It helped me a lot and my boss is now happy. 😀

    But I am now facing a new problem and asks some favor from you in this regard. I want to connect to the same session from every computer of our institute. The computers which have Windows XP as OS, worked as I expected. But the computer which has Windows 7, opens a new session. I want to access to the same session from each computer. Please give it a try and let me know about this.

    THANKS

  6. Hello there,

    I will have a look but so far in my test, this process is working for win xp as well as win 7.. check the video, i demonstrate the process using win 7

    I let you know

    till next time

    see you

  7. Hello RobotBoy,

    I’ve checked the situation. I was able to reconnect to the same session while working on different Windows 7. I’ve performed the custom xrdp installation and used the X11 interface…
    I cannot reproduce your situation. Can you provide some more information about your setup, screenshots showing the different xrdp sessions from xp and windows 7, which version of mstsc are you using on WindowS 7,….

    Provide me the logs of the xrdp connection from windows XP and from Windows 7, (you know the dialog box that show the steps while connecting to the remote using….)

    I’m assuming that you are connecting using always the same user account….

    AGain, it works fine for me, so…It should be working as well for you

    Till next time
    See ya

  8. Hi,

    got the same problem as ITUTIL above – no xsession.

    sudo ln -s /etc/X11/xsession /etc/xrdp/startwm.sh

    When I use Xsession instead, the problem was gone, X was back.

    sudo ln -s /etc/X11/Xsession /etc/xrdp/startwm.sh

    Still have the situation that each rdp is a new session – but i took xrdp from the ubuntu (13.04) sources. Are there reasons not to?

  9. Hello There,

    Linux is case sensitive,… I’ll check the post for type but the correct command should be sudo ln -s /etc/X11/Xsession /etc/xrdp/startwm.sh

    If you have followed the steps described in this post http://c-nergy.be/blog/?p=4168 and if you have read this additional information, you should be good to go !
    We have tested this procedure with Ubuntu 13.04 and it’s still working….

    Now, You are telling me that you have used the xrdp package from ubuntu repositories. I assuming you have simply download and install the ubuntu package and install the X11VNC components and created the symbolic link to the X11 directory.

    We have noticed indeed that you are indeed not reconnecting to your remote session but you are simply recreating one… This is why we use the latest version of the xrdp software and perform a custom installation.

    Hope this help

    Till next time

    See ya

  10. Hello Hello,

    This is so cool ! I was not expecting to have so many feedback about xrdp piece of software…..

    Thank you for confirming that’s working fine also on Onther Linux Distributioin

    Till Next Time
    See ya

  11. xrdp was working well with debian wheezy/mate-session and mdm earlier…
    after following your steps (except replacing echo ”gnome-session –session=gnome-fallback” > ~/.xsession with echo ”mate-session –session=gnome-fallback” > ~/.xsession), I’m just getting a blank screen.. can you help…

  12. Hello there,

    I think you need to specify which desktop interface you want to use with XRDP…. That’s why we use the xsession file.
    Originally, Ubuntu Unity (3D version) was not supported with XRDP, this is why we had to specify a fallback desktop environment which would be supported by XRDP. In our example, we have used the gnome-fallback environment. We assume that other desktop interface can be used such as enlightment, XFCE,…

    I would say, try to install the gnome fallback Desktop and modify the xsession and see if this fix your problem. If you have another preferred desktop environment, try to configure the xsession in such way that you can used it

    Hope this help

    Till Next time
    See ya

  13. Hey

    I tried to follow your example to the letter, but i never managed to get 0.7 xrdp to start. It always complained about that log-file. I looked to my /var/log/ folder and there was xrdp-sesman.log, for which i granted 666 permissions. No use. Then i created /var/log/sesman.log file (because error said about ./sesman.log) and granted correct rights for it. Still no use. Then i tried to create xrdp.log file (because that seems to be name of logfile in your screencapture). Not helping. I tried to change ownership for files to be root, xrdp or current user, but nothing helped. I also tried to create same files into following folders /etx/xrdp/, /var/bin, /urs/local/sbin, but everything was no-go.

    When i downloaded sources for version 0.6, it compiled and started just fine…. but i still couldn’t connect. Only after i removed everything and installed xrdp back from official repos, it started working, but my original problem remains… i can’t reuse existing sessions.

  14. should be working. we have tested this solution multiple time. Have you followed the instructions correctly
    step 1 – install xrdp package from ubuntu
    step 2 – uninstall xrdp the package
    step 3 – install necessary libraries needed to compile xrdp package
    step 4- download and install the xrdp 0.7
    step 5 – edit /etc/init.d/xrdp.ini file and update it
    Step 6 – restart the service
    step 7 – if error about log, change permissions on the mentionned file

    can you provide the complete error message you are getting ?

    till next time
    see ya

  15. Hello MarkKu,

    If you are using the Standard xrdp package from ubuntu and you want to reconnect to the same session, you will need to edit the /etc/xrdp/xrdp.ini file

    and replace in the first section [XRDP1] the following line

    port=-1 to
    port=5910

    You can actually select any other port you want….

    Restart the xrdp service and you should be able to reconnect to the same session

    Hope this Help

    Till next time

  16. I am experiencing the same problem Markku is. I went back and did all the steps again. Every time I run sudo service xrdp restart I get this error:

    Generating xrdp RSA keys……
    Generating 512 bit rsa key…

    ssl_gen_key_xrdp1 ok

    saving to /etc/xrdp/rsakeys.ini

    done (done).
    Stopping RDP Session manager : sesman xrdp.
    Starting Remote Desktop Protocol server : xrdplogging configuration:
    LogFile: /var/log/xrdp.log
    LogLevel: 4
    EnableSyslog: 1
    SyslogLevel: 4
    Could not start log
    error opening log file [The log is not properly started]. quitting.

    I tried commenting out the logging lines in /etc/xrdp/xrdp.ini, but then it gives the same error, but noting ./sesman.log

    /var/log/xrdp.log and /var/log/sesman.log do not exist in /var/log. But xrdp-sesman.log does. I’ve tried creating them both, but no luck.

  17. Step 4 is not working griffen :'(

    alex@golf343:~/xrdp/xrdp-master$ sudo ./bootstrap
    /usr/bin/autoconf
    /usr/bin/automake
    /usr/bin/libtool
    /usr/bin/pkg-config
    ln: failed to create symbolic link ‘/home/alex/xrdp/xrdp-master/sesman/tools/config.c’: File exists
    autoreconf: Entering directory `.’
    autoreconf: configure.ac: not using Gettext
    autoreconf: running: aclocal –output=aclocal.m4t
    aclocal: macro `_LT_DECL_SED’ required but not defined
    aclocal: macro `_LT_FUNC_STRIPNAME_CNF’ required but not defined
    autoreconf: aclocal failed with exit status: 1

  18. Hello Alex,

    We never encountered this issue. You can try the following in order to fix your issue….

    1. you can try to use the script to automate the installation (see http://c-nergy.be/blog/?p=3541)

    2. you can try to delete the file/symlink and re-run the script

    3. you can edit the bootstrap file and comment the line that might cause the issue

    Hope this help

    Till next time

    See ya

  19. Great stuff Griffon, thank you. Is there a way to configure a remote desktop session to never time out? My sessions from Win 7 to Ubuntu 12.01 time out after about 5 minutes of inactivity and kills any jobs I have running.
    thanks,

  20. this is great, thanks for this! one issue/question though… I’m finding I have to manually do a sudo service xrdp restart after booting the machine for the session remembering to start working. after that it sticks fine. Any thoughts or ideas on how to get this to work immediately from boot up?

  21. hello there,

    using the described solution, you should not need to issue any commands after a reboot. We have provided a modified init script that should start the application evey after a reboot.
    this is why we have updated the init script.. This post was valid for Ubuntu 12.X and xrdp package 0.6.X
    Which version of Ubuntu/Xrdp are you using ?

    We will update the post for Ubuntu 14.04 and see if this post is still valid

    Till next time

    See ya

  22. thanks for your response Griff… I’m using Ubuntu 14.04 with XRDP 0.6.1.

    I have the updated init as you have provided, but its as if my system is ignoring that on startup… as mentioned, after a restart of the xrdp service it works a treat.

    i’ll keep digging around when I have some time, but curious to hear if anyone else with 14.04 is having a similar issue

  23. How do you undo this? – I followed every step but despite my best efforts was unable to get this to work. Now, not only can I not RDP into my machine it has also messed up the desktop on my system.

    I tried what seemed to make logical since but no success….. at this point my only other optoin wil be to re-install the OS.

  24. Hello Ian,

    We have tested again this procedure and applied to the successive versions…this is working for us we cannot reproduce your error.
    This should be working for you as well…
    which version of Ubuntu are you using ? If you are using ubuntu 14.04, you should check this post (http://c-nergy.be/blog/?p=5439 ?)
    which version of xrdp have you installed (0.7 or latest 0.9.x) ? If you are using the latest version, you do not need to update the xrdp startup file

    What did you do to roll back ?

    waiting for you reply
    So we can try to help you with this

    Till next time
    See ya

  25. Thanks for the great write up. Using Mint 16, I had to make a few modification…

    Needed to “sudo apt-get install libxrandr-dev” before making xrdp.

    Also, “step 5 – edit /etc/init.d/xrdp.ini file and update it” is currently missing from the instructions.

    Comment 16 states:

    “replace in the first section [XRDP1] the following line

    port=-1 to
    port=5910 ”

    I had to change the port to 5919.

    Thanks!

  26. Hello Jack,
    good to hear that this post is still useful. Note that this post does not contains the latest info about a custom installation of XRDP, you should have checked he following post (http://c-nergy.be/blog/?p=5439) which mention the libxrandr-dev component…..

    Thank for the visit and the feedback

    Till next time

    See ya

  27. So I had this working perfectly and then something happened and it all stopped. Now I’m trying to reinstall it, and I noticed that /etc/X11/Xsession no longer exists.

    How do I get it back?

    Thanks.

  28. Hello Jason,

    How did you manage to get rid of the Xsesion file….? I do not really know how to recreate it because normally the xsession is generated by the xsession process…. You could try to copy/paste the content of the xsession file from one machine to another one and see if this can fix your problem

    Hope this help
    Till next time
    See ya

  29. After much experimentation into trying to log back into your current xsession I have finally figured out a way that seems to work, thanks to some information from this site, I used the xrdp o matic to install my xrdp, but I think this will work for any type of install, all I got curious after reading the “How to reconnect to the existing session while using the xrdp package from Ubuntu Repository” article and decided hey I need to look in the xrdp log for the most current connection. so if you go to var/log/ and open xrdp look for established connection at the very end of the log file it should read something like ” An established connection closed to endpoint: 127.0.0.1:3350 – socket: 11″ so with info I went to etc/xrdp and opened xrdp.ini with a text editor and added the following I got this idea from this sites article but changed it a bit saved the file and then just disconnected from my session then I brought the rdp back up and just recconected and bam it connected to the exact same session I was in. so that’s what worked for me.

    [xrdp8]
    name=Reconnect
    lib=libxup
    username=ask
    password=ask
    ip=127.0.0.1
    port=3350

  30. Hello There,
    Thank for sharing the info,
    We will perform some test with that and see whats the outcome

    Till next time
    see ya

  31. Hello There,

    If we compile the xrdp package it’s to get the latest version of the tool (even if the latest version is not officially released by the team). We can reconnect because we are using the X11VNC software which allows you to reconnect to an existing X session (That what the purpose of X11VNC tool).

    If you want to use the xrdp package from ubuntu repository and be able to connect to the same session, have a look at
    http://c-nergy.be/blog/?p=4471
    or check the other method (still using the xrdp ubuntu package) on this post http://c-nergy.be/blog/?p=5305 (section How to reconnect to the same session)

    Hope this help
    till next time
    See ya

  32. How can i connect to my real desktop? just like desktop sharing on ubuntu.

    anda how i remote my desktop from windows

    thanks

  33. Hello Ditto,

    You cannot connect to real desktop using xrdp (as far as I know)
    The other question I do not get it. How do you remote from Windows ? You open your remote desktop client, input ip address or name of the linux machine you want to connect and voila… Provide your credentials and you are done …

    Hope this help
    Till next time
    See ya

  34. I solved the error:

    error opening log file [The log is not properly started]. quitting.

    by performing:

    chown xrdp /var/log/xrdp.log

    for 0.8.0

  35. Hello Pim,
    Good to hear….
    By the way, this is specified in the post….In the post, we have mentioned that you needed to change permissions on the log files
    Thank for the visit
    Till next time
    See ya

  36. I did all the things that where said but I still can’t connect I connect to my ubuntu server and it does this:

    connecting to sesmain ip 127.0.0.1 port 3350
    sesman connect ok
    sending login info to sesion manager, plais wait…
    xrdp_mm_proces_login_response:login successful for display
    started connecting
    connecting to 127.0.0.1 5911
    tcp connected
    error – problem connecting

    What do I do now ?

  37. Hello There,

    Which ubuntu version are you using ?
    Check this post as well (http://c-nergy.be/blog/?p=5984). If you are using recent ubuntu version, you do not need to do anything special.
    Check the logs of xrdp and check what could be stopping you. Check also your .Xsession-errors file. (the faq post – http://c-nergy.be/blog/?p=5984 – will provide you the location where to find these files..

    Hope this help
    Till next time

    See ya

  38. Hey folks,
    I was testing with Ubuntu 14.04 and it works absolutely perfect.
    The tests were from other *NIX systems with various RDP clients as well as several versions of Windows version combinations with various options selected.
    Where I have run into issues is with remote client access via Dell-Sonicwall gateways. The different client scenarious tested through the Sonicwall SRA4600 ans SMA (E-Class Aventail) boxes were the same:
    1) client side RDP agent to XRDP – Works
    2) client side Java App to XRDP – Works
    3) Client side HTML5 Canvas to RDP Proxy to XRDP – FAILS.

    #3 is interesting since it shows that the remote desktop dimensions are kept, but it shows grey. If I move the mouse around on the “grey screen” while monitoring the remote Ubuntu XRDP desktop locally, I can see the mouse move, but again, no view of the display – just grey.
    There appears to be some option or protocol that is not being called correctly that is causing the XRDP side or the Sonicwall side to not work properly.
    Is there a way to get debugs of any session message errors on the XRDP?

    Since both the HTML5-RDP functionality on the small-med business and the enterprise version of the Sonicwall lines are showing the same symptoms, I am thinking there is a protocol issue and not a single release of code on the sonicwall side.

    Thoughts on how to troubleshoot this further?

    Thanks,
    G

  39. haha! It works! My previous not about the Sonicwall issues has been corrected by a recompile.

    The XRDP package available in the standard Ubuntu repos has a glitch that doesn’t with with HTML5 canvas to RDP in the Sinocwalls when pointing them to and XRDP service.

    After a recompile from the GIT (after a bit of cleanup) everything is working. I think there a few tweeks needed as something is a bit laggy, but the recompile from source fixed the display issues.

  40. Hey Greg,

    Good to hear that you have found the solution to your problem…
    Thank you for the visit and sharing out your findings…

    till next time
    See ya

  41. So I’m trying to accomplish this task on a Centos server, I’m not sure I’m understanding the details of why x11vnc allows for this while the default xrdp daemon does not?

  42. Hello Cliff,

    First of all ,This post is quite old and you should have a look at the following two posts

    Second, there was a “bug” in the xrdp package in past. This issue has been fixed in most recent packages available from xrdp. The workaround to always reconnect to the same session is to use the x11vnc as vnc server. You can basically configure x11vnc software to reconnect to your session

    PS: We never tried to install this on a CentOS box

    Hope this help
    till next time

  43. Actually, when I issue the “service xrdp restart” command, it is giving an error stating – xrdp: unrecognized service. I tried un-installing and re-installing the service but it is not working. I am trying on Ubuntu 14.04. Previously at least the RDP was working although it started a new session each time. Now xrdp stopped working totally. Please advice what to do.

  44. Hello Hari,
    The post you have used is specific to Ubuntu 12.04. Why nobody check our blog to see if there is any other posts related to ubuntu 14.04 or higher ?
    Have you checked these posts

    http://c-nergy.be/blog/?p=5439 (custom installation for ubuntu 14.04)
    http://c-nergy.be/blog/?p=6046 (reconnect made easy) – ubuntu 14.10 and later specific)
    http://c-nergy.be/blog/?p=6063 (demo of the reconnect made easy – ubuntu 14.10 and later specific)

    UBuntu 16.04 has just been released and we are about to release a new post for ubuntu 16.04 and xrdp as there is a small change in the process…

    Hope this help
    Till next time
    See ya

Leave a Reply