Hello World,
Based on the positive feedback we have received from our posts about XRDP and Ubuntu 14.04, we are providing hereafter an update on how to install XRDP from the sourceforge web site (and not the one found in Ubuntu Repositiories)
The Official version of XRDP is 0.6.x. However, the team behind xrdp has been working on the next version. In this post, we will be using the version 0.9. This version is not officially supported and considered as in developpment for the moment.
Why a custom installation ?
Some people might be wondering why performing a custom installation of XRDP. If you work with xrdp, you know that the main issue is the fact that you cannot reconnect to the same session if you are using the default packages available in Ubuntu Repositories. However, if you tweak a little bit some configuration files, you can overcome this limitation and connect to the same remote session (see our posts : http://c-nergy.be/blog/?p=4471, http://c-nergy.be/blog/?p=5382 – Check the section reconnecting to the same session)
If we perform a custom installation, we do not need to tweak the configuration files and we will be able to reconnect to the same session after finishing our installation (see http://c-nergy.be/blog/?p=4168, http://c-nergy.be/blog/?p=4242). This post will describe how to perform this custom installation and as you will see, it’s really not that difficult.
So, Let’s go !
Custom Installation of xrdp
Step 1 – Get the xrdp package
As mentioned earlier, we will be using the xrdp packages 0.9 available here. From this location, on the right side, you will be able to download the xrdp.zip package.
Click on picture for better Resolution
By default, the package will be dowloaded at ~/Downloads directory
Step 2 – Install necessary dependencies for xrdp installation
In order to be able to compile the xrdp package from source, you will need to download some additional packages that will be used by the compilation script.
Execute the following command in order to install the pre-requisites for the xrdp installation.
sudo apt-get install autoconf libtool libpam0g-dev libx11-dev libxfixes-dev libssl-dev libxrandr-dev
Step 3 – Install alternate desktop to be used with XRDP
Then we will need to install a alternate desktop interface. Indeed, as you probably know, xrdp and Unity or Gnome Shell 3 is not working. We have to install a desktop interface that can work with xrdp. You can choose from xfce,LXDE or MATE Desktop). You can have a look at the following posts to see how you can install these desktops and use them with XRDP
Because I want to you the MATE Desktop interface, I will need to install the following component by issuing the following commands.
sudo add-apt-repository “deb http://repo.mate-desktop.org/archive/1.8/ubuntu $(lsb_release -cs) main” wget -q http://mirror1.mate-desktop.org/debian/mate-archive-keyring.gpg -O- | sudo apt-key add - sudo apt-get update sudo apt-get install mate-core mate-desktop-environment mate-notification-daemon
I have then to say to xrdp to use the MATE Desktop as default desktop while connecting. You will be doing this by issuing the following command
echo mate-session> ~/.xsession
Step 4 – Install X11VNC Component
Finally, I can install the X11VNC component (which replaces the vnc4server software)
sudo apt-get install x11vnc
Step 5 – Compile and install xrdp package
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.
sudo ./bootstrap sudo ./configure sudo make sudo make install
Post Setup Actions
Step 1 – Install/remove ubuntu xrdp package
We will first install/remove the xrdp packages from ubuntu repository. This action will create the startup script needed to have xrdp service running when the computer restarts. To perform this; from the console; we executre the following commands :
sudo apt-get install xrdp sudo apt-get remove xrdp
Step 2 – Configuration changes
To finalize our custom installation, we will need to issue 4 additional commands in order to have a working xrdp solution
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
Step 3 – Restart your computer
Everything should be ready and you should be able to use the xrdp software after rebooting your machine. Rebooting the computer ensure that the xrdp service will effectively be restarted automatically and thus making it useable for remote connection.
If you try to perform a remote connection, you will see the new login screen from xrdp software. In the dropdown menu, you will have to select the option sesman-Xvnc in order to complete the login process.
Click on picture for better Resolution
Customize XRDP Login Screen
If you open the file /etc/xrdp/xrdp.ini, you will see that you have some option that can help you control the look and feel of the login screen. The fist thing I modify in the xrp.ini file is the order of the dropdown box menu. Because we are using x11vnc, we have to select it in the drop down menu. By switching section 1 with section 2 (see screenshot), the sesman-x11vnc will always be the first on in my drop down list.
The image below shows the final result
Click Picture for better Resolution
By changing some other settings; you can also customize the color and the size of the login box. for the moment, I have configured my login screen as following
Click Picture for better Resolution
Bonus
We have compiled all the commands into a script so that you can use it to easily perform the installation. The only thing you need is an internet connection. The script has not been fully tested but should be working.
######################################################################################## # Script_Name : xrdp-install.sh # Description : Perform an automated custom installat of xrdp # on ubuntu 14.04 # Date : May 2014 # written by : Griffon - http://www.c-nergy.be - http://www.c-nergy.be/blog # # Disclaimer : Script provided AS IS. Use it at your own risk.... # ########################################################################################
#-Go to your Download folder
echo "Moving to the ~/Download folders..." echo "-----------------------------------" cd ~/Downloads
#Download the xrdp latest files echo "Ready to start the download of xrdp package" echo "-------------------------------------------" wget https://github.com/neutrinolabs/xrdp/archive/master.zip
#Unzip xrdp package echo "Extracting content of xrdp package..." echo "-----------------------------------" unzip master.zip
#Install prereqs for compilation echo "Installing prereqs for compiling xrdp..." echo "----------------------------------------" sudo apt-get -y install autoconf libtool libpam0g-dev libx11-dev libxfixes-dev libssl-dev libxrandr-dev
#Install the desktop of you choice - I'm Using Mate Desktop echo "Installing alternate desktop to be used with xrdp..." echo "----------------------------------------------------"
sudo add-apt-repository "deb http://repo.mate-desktop.org/archive/1.8/ubuntu $(lsb_release -cs) main" wget -q http://mirror1.mate-desktop.org/debian/mate-archive-keyring.gpg -O- | sudo apt-key add - sudo apt-get -y update sudo apt-get -y install mate-core mate-desktop-environment mate-notification-daemon --force-yes echo "DoNE ??"
#Configure the Xsession file echo mate-session> ~/.xsession
#Install the X11VNC echo "Installing X11VNC..." echo "----------------------------------------" sudo apt-get -y install x11vnc
#Add/Remove Ubuntu xrdp packages
echo "Add/Remove xrdp packages..." echo "---------------------------"
sudo apt-get -y install xrdp sudo apt-get -y remove xrdp
#Compile and make xrdp
echo "Installing and compiling xrdp..." echo "--------------------------------"
cd xrdp-master sudo ./bootstrap sudo ./configure sudo make sudo make install
#Final Post Setup configuration
echo "Post Setup Configuration..." echo "---------------------------"
sudo mv /etc/xrdp/startwm.sh /etc/xrdp/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
echo "Restart the Computer" echo "----------------------------" sudo shutdown -r now
Save this script into a file (I called it xrdp-install.sh).
Before executing the script, do not forget to mark it as executable. Right-click on the file, go to properties, then select permissions and tick the box allow executable….
Click on Picture for better resolution
When this is done, open the Terminal and issue the following command (from the location where you saved the script) sudo ./xrdp-install.sh
Click on Picture for better resolution
Final Notes
This is it for this post. You should be able to perform a custom installation of xrdp and play around with the latest version in development. Using this solution, you will be able to reconnect to the same remote session with no tricks or workaround.
I hope you enjoyed this post
Till next time
See ya
This works brilliantly! It solves the problem I was having with the other tutorial.
How would I be able to download xrdp from github over ssh?
Hey Andrew,
Nice to hear that this worked for you.
For your other question; I do not think you can download the file using ssh. You could create a clone and then you can use the ssh protocol to perform this action
Hope this help
Till next
See ya
sudo apt-get install autoconf libtool libpam0g-dev libx11-dev libxfixes-dev libssl-dev lib xrandr-dev
should be
sudo apt-get install autoconf libtool libpam0g-dev libx11-dev libxfixes-dev libssl-dev libxrandr-dev
This guide is amazing– I was having the same problems as Andrew and this post fixed it.
Hello there,
Thank you very much for the positive feedback and comments….
The post has been updated to correct the typo…. 🙂
See you next time
Hey Griffon,
This guide worked for me flawlessly on Ubuntu Desktop (as I commented 7/13) but I recently switched to Flawless Server/Linux Mint MATE and it’s not functioning properly. I skipped the MATE installation section as that’s the basic desktop environment for Mint but do you know where I could have been going wrong?
I understand that this is a guide for Ubuntu 14.04 and apologize if my question is out of place on this post or on your website. Thank you for your time and consideration.
Hello Bishop,
I never used the Flawless server. Googling a little bit, It seems that the server is using Linux Mint OS. So, I’m assumning that you are using the CINAMON DESKTOP…..
So you should modify the .xsession in order to display your desktop through xrdp….. (I’m guessing here)
I would try something like this in the .xsession file
gnome-session –session=cinnamon
Hope this help
Till Next Time
See ya
I’ve found that if you reinstall this again over an old installation, you get a grey screen with a terminal box in the top left corner. Is there any fix for this? I’ve accidently bricked an Ubuntu Server :/
I started from a fresh 14.04 server install in a vmware vcloud. Did these exact commands I have below, but I get an error from vnc. I haven’t been able to find a problem. Any ideas?
======Connection Log======
connecting to sesman ip 127.0.0.1 port 3350
sesman connect ok
sending login info to session manager, please wait …
xrdp_mm_process_login_response: login successful for display 10
VNC started connecting
VNC connecting to 127.0.0.1 5910
VNC error – problem connecting
=========commands==========
sudo apt-get update
sudo apt-get install -y openssh-server ssh make cmake pkg-config autoconf libtool libpam0g-dev libx11-dev libxfixes-dev libssl-dev libxrandr-dev
sudo apt-get install -y –no-install-recommends lubuntu-desktop
sudo apt-get install -y x11vnc
echo lxsession -s Lubuntu -e LXDE> ~/.xsession
sudo apt-get install -y –no-install-recommends xrdp
sudo apt-get remove -y xrdp
unzup xrdp-master.zip
cd xrdp-master
sudo ./bootstrap
sudo ./configure
sudo make
sudo make install
sudo mv /etc/xrdp/startwm.sh /etc/xrdp/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
shutdown -r now
My problem was not installing vnc4server. It still needed that
Hello there,
if you use X11vnc package, you do not need to install vnc package……
My guess is that you didn’t select the right option in the xrpd login box. From the dropdown box, you should select the option Sesman-XVNC
Check also http://c-nergy.be/blog/?p=4242…..
A lot of people seems to make the mistake
Till next time
See ya
@Joe @Griffon: I have a 14.10 sytem with LXQT as the DE for xrdp. I had the same error as Joe described, and I fixed them the exact same way – by installing vnc4server. After service xrdp restart, everything went smooth with the connection to the remote windows machine.
Yes, I made double sure to use the right option. I would really like to know why vnc4server is needed.
Hello Erik,
We have checked this. You are right xrdp has dependencies with vnc4server. This is probably something used within the module libvnc.so that is called when using the sesman-xvnc. When we will have time, we will try to see wich vnc modules might be needed for xrdp to work.
The other option would be to use the x11rdp-sesman option (if you want to get rid of vnc4server) but then you will need to install the xrdp server. Actually, you will need to compile it and see if this could work ….
Actually, we never noticed this situation because when we are performing the installation, the vnc4server is automatically installed with the ubuntu xrdp package..
Thank for pointing us this situation. We might come back to this problem/issue and see how could overcome this little annoyance.
Till next time
See ya
Hi,
I get same problem as Joe and Erik but I have verified or can see that vnc4server is installed.
If I try the x11rdp-sesman option It takes longer time before the error:
Started connecting
Connection problem, giving up
some problem
any suggestions on where I should look for problem ?
Hello Johan,
Have you used the script to perform your installation or did you perform a manual installation ? Could you try to use the script and see if this fix your issue?
Note also that we have noticed that the first connection to the xrdp server fails (we do not know yet why) but any successive connection are going through
In the xrdp dialog box, the only valid option is sesman-xvnc
Because you didn’t installed the X11RDP server, you cannot use the x11rdp-sesman option
try the following (using sesman-xvnc)
connect the first time to xrdp ->possible result =failed
connect a second time to xrdp ->expected result = success
If all of this fails, provide xrdp logs file and .xsession.error files so we can try to see on which direction to look
Hope this help
Till next time
See ya
hello Johan,
Reading back your comment, I understand now that you are trying to perform a ssh connection first and then launch the xrdp interface….
I’ill have to test the configuration in order to give you a proper answer.
I’ll probably publish a post on how to make ssh connection and start xrdp connection
So stay tuned
you might get your answer
Till next time
See ya
Thank you for the articles. I followed them with a few corrections because some things just don’t exist the way they’re described here. I am starting from a minimal remote server image and installing XRDP with XFCE as the only GUI.
I can’t log in however. Here’s what the xrdp.log says:
[20141124-23:04:13] [DEBUG] returnvalue from xrdp_mm_connect 0
[20141124-23:04:14] [DEBUG] VNC Error after security negotiation
[20141124-23:04:14] [DEBUG] VNC error before sending share flag
[20141124-23:04:14] [DEBUG] VNC error before receiving server init
[20141124-23:04:14] [DEBUG] VNC error before receiving pixel format
[20141124-23:04:14] [DEBUG] VNC error before receiving name length
[20141124-23:04:14] [DEBUG] VNC error before receiving name
[20141124-23:04:14] [DEBUG] xrdp_mm_module_cleanup
[20141124-23:04:15] [DEBUG] VNC mod_exit
[20141124-23:04:15] [INFO ] An established connection closed to endpoint: NULL:NULL – socket: 15
[20141124-23:04:15] [INFO ] An established connection closed to endpoint: 127.0.0.1:3350 – socket: 14
This all happens in the moment I confirm my username and password. All other log lines are from other times. What’s wrong here?
This is from auth.log:
Nov 24 23:04:24 mond2 XRDP-sesman[1503]: pam_unix(gdm:session): session opened for user yves by (uid=0)
Nov 24 23:04:24 mond2 systemd-logind[580]: Removed session c1.
Nov 24 23:04:24 mond2 systemd-logind[580]: New session c2 of user yves.
Nov 24 23:04:24 mond2 systemd-logind[580]: Session c2 has display :10 with non-existing socket /tmp/.X11-unix/X10.
Nov 24 23:04:24 mond2 XRDP-sesman[1503]: pam_unix(gdm:session): session closed for user yves
This is something from syslog:
Nov 24 23:04:14 mond2 XRDP-sesman[1504]: (1504)(140503914972992)[ERROR] env_set_user: error creating .vnc dir
The directory ~/.vnc exists with the file sesman_yves_passwd in it, mode 600.
Well, I completely reset the machine and retried with the X11RDP-o-Matic script. That did an awful lot of things and it took its time, but the result was a prefectly working remote desktop session. The first time™. Gone be VNC. 😉
Hello Yves,
Sorry that i didn’t work for you and we are glad that the scriptomatic worked for you as well.
Because you have solved your issue, we will not further investigate the problem (at the moment – no time) but the procedure provided has been performed multiple times on different system and different ubuntu version and worked as expected.
If we have time, we will update the post to check for any improvements
till next time
See ya
So i have this working great for myself, but what’s the best way to set the .xsession file for all users, including new users?
Thanks.
Having an issue with reconnecting/multiple connections. When I first start/restart the xrdp service, I can connect just fine. However, once I log out, I cannot connect again unless I restart the xrdp service.
I get:
connecting to sesman ip 127.0.0.1 port 3350
sesman connect ok
sending login info to session manager, please wait…
xrdp_mm_process_login_response: login successful for display 10
VNC started connecting
VNC connecting to 127.0.0.1 5910
VNC error – problem connecting
Hello Jason,
have a look at this post (http://c-nergy.be/blog/?p=6050) which provides you the way to have the .xsession file populated automatically. this is working for a standard installation.
You will need to update the file for which we have created a symlink in the custom setup procedure….(i.e. Xsession file)
Please not ealso that with ubuntu 14.10, you do not need to perform a custom installation as the reconnection option is available out of the box.
Have a look at Check http://c-nergy.be/blog/?p=6046
and http://c-nergy.be/blog/?p=6063
I hope this help. Thank for the visit
Till next time
See ya
Hello Jason,
We didn’t not encountered such issue. The problem seems more related to the vnc service that the xrdp service…. Check that the vnc server is configured accordingly.
Possiblity, you could try to remove and re-install again the xrdp package from your system and see if this fix the issue.
have a look also at the logs for xrdp and vnc, you might find a hint about the issue. If I have time, I will try again and see if i can reproduce your issue
Hope this help
Till next time
See ya
Hi, I tried your steps on a linux mint 17.1 machine (with MATE desktop). When i try to connect using RDP, i get the error saying “Cannot connect to the server”. I skipped the steps to install MATE as I already have it. Other than that, I executed all other steps successfully. Any ideas what could be wrong?
Thanks,
S T
Hello ST,
I have no clue what could be wrong as I not a Linux Mint user…
So, I cannot really help…. I would need to test the install linux mint and give it a try
Best regards
What about KDE? Is it possible to access KDE Desktop over XRDP?
Hello Zlatan,
I’m assuming that you can install kde as the preferred desktop interface… you would need to install the kde desktop package and then modify the startwm.sh and adding the command startkde…. I’m just guessing here…. Not tested… I do not have much time right now…But as soon as I have somte I will give it a try
Hope this help… If you wanna give it a try…please do it on a test environment as I never tried xrdp with kde
Till next time
See ya
Howdy from Texas.
Fresh install of Ubuntu 14.04, update/upgrade. Installed Zentyal which gave me LXDE desktop. Followed these instructions using LXDE info instead of Mate. It connects but then errors out. This is what it says:
connecting to sesman ip 127.0.0.1 port 3350
sesman connect ok
sending login info to session manager, please wait…
xrdp_mm_process_login_response: login succesful for display 10
VNC started connecting
VNC error – only supporting 8, 15, 16 and 24 bpp rdp connections
Hello Jerald,
This error is usually thrown because in your /etc/xrdp.ini file, [Globals] Section, the value for max_bpp is set to an higher value than 24….(you have set probably 32) to max_bpp=24
Try to change your line from max_bpp=
If this fail then try value of 16 and try again
You might also need to check the settings on your remote Desktop Client (open your remote desktop connection client, show options, go to display tab and in the color section, use 24 and give it a try
Hope this help
Till next time
See ya
Yeah, I feel stupid. I changed the setting on my RDP client down from 32 to 24 and it worked fine. Thank you very much.
P.S. Does this work with multiple users? If for example my co-worker has a login on the server too. Can he login remotely also? Or are there more steps?
Hello Jerald,
Yes; it works for multiple users… You should read the following post about that topic : XRDP – Enable multiple users to connect via xrdp – HowTo Configuration
Till next time
see ya
OK, I have worked out a solid implementation for this and the guide plays through nicely apart from an additional command to change file permissions, simply run
sudo chown xrdp:xrdp /var/log/xrdp.log /var/log/xrdp-sesman.log /etc/xrdp/rsakeys.ini
and including a 1s wait in xrdp.ini, it appears xvnc takes a few ms to startup and this combats it.
However, I am still stuck on 1 particular element. I have seen it mentioned before and you stated you were unable to reproduce the error.
*** Summary ***
I have observed that for the first time you connect, if you define your port, a new xvnc session is not started and it will fail even if the port defined is free, yet setting to -1 will look for an open port and create one.
If you connect from a new machine with port set to -1, you get a new session, not the existing one, seen on windows 7 and android.
*** My requirements ***
1. Work – I have a training box with a number of users configured. I want to set up xrdp.ini so each user has a defined port which they can reconnect to from any machine or for offsite tutors to remote in and support trainees. We run a virtualised desktop environment spread over many sites which gives you a different IP address each time you log in, effectively looking like a new machine.
2. Home – I have a remote machine with a UI I have written that controls a number of other machines, applications and activities from restarting all available network hardware to copying files. This machine is to be run by a number varying levels of technical knowledge. This machine should be available using a single port from any machine chosen.
Is there any way of getting around this issue/limitation being either shell scripting, rc.d or further editing the xrdp source or are there any other remote connection capabilities, we are not limited in software usage in either scenario for server or client?
*** Version details ***
Ubuntu 14.04.2 LTS (GNU/Linux 3.16.0-39-generic x86_64)
x11vnc version: 0.9.13 lastmod: 2011-08-10
xrdp version 0.9.0
.xsession desktop lxde
*** Tests ***
I only have 1 user defined on this box therefore to ease testing I have hardcoded the username and password, I have done much testing around this and it does not impact the below scenarios..
* Scenario 1 *
Reboot
If I set port=-1 in xrdp.ini, I can log in through rdp fine and it creates a vnc listener on 5910.
If I disconnect and reconnect from the same machine, I connect to the same session
If I connect in from a difference machine, I get a new xvnc listener running on 5911
and so on.
* Scenario 2 *
Reboot
If I set port=5910 in xrdp.ini, I get
———————————————————
VNC started connecting…
Waiting 1000 ms for VNC to start
VNC connecting to 127.0.0.1 5910
VNC error -problem connecting
———————————————————
* Scenario 3 *
Reboot
If I set port=ask-1 in xrdp.ini and connect using default settings, I get the same behaviour as scenario 1
If at the logon screen I change port to an existing instance, I can reconnect to an existing session from any other machine.
* Scenario 4 *
Reboot
If I set port=ask5910 in xrdp.ini and connect using default settings, I get the same as scenario 2
If I change the port to -1, I connect fine to 5910
If I disconnect and reconnect from any machine using default settings, I connect to the same session
If I change the port to -1 from a new machine I get a new session on port 5911
* Scenario 5 *
Reboot
If I set port=ask-1 in xrdp.ini and change the port ast logon to 5910, I get the same behaviour as scenario 2
*** Logs ***
xrdp.log when defining port for first connection
[20150618-11:02:56] [DEBUG] VNC Error after security negotiation
[20150618-11:02:56] [DEBUG] VNC error before sending share flag
[20150618-11:02:56] [DEBUG] VNC error before receiving server init
[20150618-11:02:56] [DEBUG] VNC error before receiving pixel format
[20150618-11:02:56] [DEBUG] VNC error before receiving name length
[20150618-11:02:56] [DEBUG] VNC error before receiving name
[20150618-11:02:56] [ERROR] Failure to connect to: 127.0.0.1
[20150618-11:02:56] [DEBUG] xrdp_mm_module_cleanup
[20150618-11:02:56] [DEBUG] VNC mod_exit
[20150618-11:02:56] [INFO ] An established connection closed to endpoint: NULL:NULL – socket: 11
[20150618-11:02:56] [DEBUG] returnvalue from xrdp_mm_connect 1
xrdp-sesman.log is only logging successful connects so appears not to be getting that far.
syslog shows exactly the same output as xrdp.log
auth.log and ~/.xsession-errors show nothing for the time period.
I have noticed another oddity, after following this guide, xrdp is running, I can connect, I can start lxde and everything looks happy, but when I do a status on the xrdp service, it appears to be failing, contrary to my ability to use it.
testing@testing-VirtualBox:/etc/xrdp$ sudo service xrdp status
* Checking status of Remote Desktop Protocol server xrdp [fail]
* Checking status of RDP Session Manager sesman [fail]
Thanks
Hello there,
Have you checked the post http://c-nergy.be/blog/?p=8069 where we explain possible issues with xrdp and how to fix them
this post explain how to fix the fact that the service is not starting properly
This post also explain how to avoid the situation where the first xrdp connection is failing when using the latest xrdp package and x11vnc
Hope this help
till next time
Hello there,
This is a long comment,
I will have a look at it this weekend…
I already answer to your other comment
Till next time
see ya
Hello Stuart,
After performing some basic tests, we have indeed noticed that if you connect from different workstations the xrdp session is not maintained for the user…At the moment, I can only provide you a quick and dirty fix or another option
The Other Option is noVNC. You could give it a try and see if you connect always to same session from whatever location…have a look at http://c-nergy.be/blog/?p=5872
The Quick Fix
We already described this option in one of our posts (see http://c-nergy.be/blog/?p=5382 – Reconnect to the same session through xrdp) In your comment, It seems that you already have read this post but just in case….
The idea here is to find which port you are connecting the first time when performing your xrdp connection. Modifying the xrdp.ini file, you can present an additional textbox in the xrdp login screen to provide the port number.
The first connection, you simply accept the value -1 in the login box. It will start your session. Consecutive connections, you have to know the port you were connected to.
Hope this can help as a starting point for a possible solution….
as soon as we have some time, we will try to look a little bit deeper into this scenario
Till next time
See ya
Sorry for the long post but I thought I’d get it all out there for you to digest as you got the chance. No stone left unturned as so forth.
Hi, thanks for your response. I have spent quite a lot of time reading your posts which are very helpful but yes it just does not quite do what I need it to.
For the noVNC options, the real kicker is one of the machines I have built does not have a gpu that supports unity, but this is not an issue for the user as it does not plug into a monitor, just sits in the corner of his room whirring away with nothing but a power cable and cat5 sticking out of the back, due to this I have taken out the gpu anyway.
I have also tried to suggestions in http://c-nergy.be/blog/?p=8069 and it does appear to fix the service status fail issue, this was a low level issue anyway as it was obviously working, also I have adopted the delay, although only 1 second, and also in your examples it shows -1 rather than defining a specific port.
You assume correctly I have read http://c-nergy.be/blog/?p=5382 many times and played around with the different options hence leading to my post.
I was hoping to stay away from having to use -1 and hard coding each user to use their own dedicated port mainly due to varying knowledge levels, but looks like this cannot be done.
Thanks for you help anyway. It’s been a journey.
as a side note, to quickly find your port in an ssh session, the command
netstat -anpo | grep Xvnc
will only report on the processes you as a user own and provide a list of the instances of Xvnc you are currently running. This ultimate usefulness of this command obviously is negated by running as root or with sudo.
Thanks
Hello there!
Can anyone tell me how you can make xrdp to list all running(and/or just created) sessions?
I really do miss this feature. Google did’nt help there.
Nomachine’s NX server, for example, has this. You just use the command nxserver –list and it shows you all of the sessions that were created and which ones of them are running at the moment etc.
Thanks
Hello Stuart,
xrdp is a really useful programm but has still a lot of limitation.
NoVNC might still be an option if you define Mate-destkop as your main desktop environemnt instead of using Unity. (even do Unity is sexier..)
At the moment, we have not much time to test additionnal configuration and settings with XRDP but It might be a good idea to send a request/feedback to xrdp team. Maybe in the near future, they might include this request into the next xrdp iteration
Thank your for sharing your thought and your experience on this topic
Till next time
See ya
i went through the step above ,but i got a “VNC error problem connecting”
after that i changed the port number to 5900 and ran x11vnc with -display :0 -rfbauth ~/.vnc/passwd ,and now i get a “VNC error password failed” ,any ideas?
thanks
Hello There,
Where did you change the port number ? in the xrdp.in config file in the X11vnc files ?
If you have changed the x11vnc port configuration, you might need to update the xrdp.ini file or you need at least to specify the port you want to use while login in
For the password thing, check that the file exists in your .vnc folder, try to re-issue the command and see if this help
I’m just back from a heavy project abroad..So didn’t got much time to blog…but we will start again with some new posts related to ubuntu, xrdp and vnc
Hope this help
Stay tuned
Till next time
See ya
Till next time
See ya
Hi Griffon,
I am using the LXDE environment and ubuntu 14.04. When I log in now after following all these instructions, the desktop screen is all rainbow colors and hard to read the text. can access the desktop and open up terminals, but it is very hard to read. Any ideas what I might have done wrong?
Thanks!
Denise
@Denise
possible to post some screenshots because we not heavily using LXDE but we never encounter such issue
Have you checked the rdp client settings for screen display/color depth ??
for the moment no clue, waiting for screenshots if possible
till next time
See ya
Hi Griffon,
You can find a screen shot here:
http://miyceramics.com/blog/wp-content/uploads/2016/06/Capture.png
I am able to login, but the display is messed up. If I login again, I am logging in to the same session so that works. If I use XFCE the connection hangs and I don’t connect.
Thanks for your help!
Denise
Let me rephrase the xfce, if I use xfce it seems to work, I can see the mouse moving but the screen is all black, so I am not sure if the environment is working, If I right click I don’t see anything. When using LXDE, I can see a blurry image and open an terminal.
Hello,
Thank you for the super useful post! I am using Ubuntu 14.04 with xrdp-devel 0.9 and x11vnc 0.9.13. I am able to connect and verify the reconnect as well. However, I get a screen mentioning:
connecting to sesman ip IP port PortNumber
sesman connect ok
sending login info to session manager, please wait…
login successful for display 11
started connecting
connection problem, giving up
some problem.
There are two issues – This popup comes after at least 3-4 minutes almost making one believe that the connection didn’t work out. Second, the error message about connection problem. Once I click OK here, I get the login screen and can successfully connect, but it doesn’t make for the best user experience. Any thoughts on this ?
@Shveta,
never encounter such performance/delay situation….This quite strange…you can use /etc/xrdp/xrdp.ini and sesman.ini file to hide the log windows.
Howerver, this will not solve your performance issue. in xrdp.ini file, you should have a ms_delay parameters, is the value set and active, what’s the value ?
Can you check logs and ~/.xsession-errors file to see what could be the problem
till next time
See ya
1. Thanks!
2. Post-Setup > Step 2. The 1st 2 commands won’t work in the way you’ve wrote. It’s needed either to cd before, or replace the 1st mv with:
mv /etc/xrdp/startwm.sh{,.bak}
@Dima,
thank you for the feedback and positive comments. When time permits will double check the post and make the necessary changes
Till next time
See ya
Thanks for all your blogs on this. They have been a lot of help. Eventually I found that updating to Xubuntu 16.10 and installing the updated packages for x11vnc and xrdp works great.
I’m 99% to the where I need it to be, however I’m running into a little problem and can’t seems to track down the solution.
I have X11VNC working, with a password file in the .vnc folder. Connecting via tightvnc from another pc is solid. Connecting via XRDP fails password authentication. I have tried recreating the password file, storing the password directly in xrdp.ini, using rfbauth or usepw switches for x11vnc.
Do you have any ideas why xrdp and x11vnc can’t seem to no agree on the password? XRDP says “VNC password failed” and x11vnc says “authProcessClientMessage: authentication failed from ::1”.
I did notice that tightvnc connects with protocol 3.8 and xrdp tried to connect with protocol version 3.3