Hello world,
Ubuntu 17.10 is about to be released and it will bring a bunch of new features and new technologies that we will need to master quite quickly. Ubuntu 17.10 will ship by default with Wayland Display server which introduces an interesting question about xRDP compatibility. Can xRDP still be used in Ubuntu 17.10 or do we need to find other options to perform remote sessions to Ubuntu systems. Apparently, Wayland does not really support remote sessions solutions out of the box. Nowadays, remote administration of system is critical and so widely used that there is a need to have a solution to be implemented within Wayland protocol or there must be a way to fallback to X11 session type.
In this post, we will try to see what steps are needed to have xrdp installed on Ubuntu 17.10 systems and see if this is still a viable solution…
Let’s go !
xRDP installation on Ubuntu Gnome 17.10
Assumptions
For this post, we have make some assumptions.
- The Ubuntu 17.10 Beta 2 will be used
- No alternative Desktop will be used. Gnome desktop will be the default desktop accessible via the xrdp session
- We are using the standard xrdp package available within the Ubuntu repository for Ubuntu 17.10
- Ubuntu machine has been installed as virtual machine using Virtualbox software
- Default session used is Wayland (it’s supported in Virtualbox)
The following screenshot shows the current version of Ubuntu we are using and shows that we are indeed running a Wayland session…
Click on picture for better resolution
As you can see, the Ubuntu 17.10 Beta 2 has made some progress in terms of look n feel and layout. As you probably know, Canonical has customized the GDM login page in order to display the purple Ubuntu color and their logo.
Click on picture for better resolution
The Ubuntu 17.10 Beta 2 also provide the dock bar. This feature was a crucial element in order to ensure a smooth transition from Unity. We didn’t publish any xrdp post before because we were waiting for this feature and see how it would work on Ubuntu locally but also when accessing a system remotely….
Click on picture for better resolution
Installation Process
If you are a regular ready of this blog, the installation is really straight forward. The installation process will be used the xRDP package from the Ubuntu repository. We will simply use the standard apt-get install command to install the xrdp software on our system. So, from the a terminal console, we will simply need to issue the standard apt-get install command as provided below.
sudo apt-get install -y xrdp
You might be prompted for a password. Provide it. You might be asked for confirmation to proceed with the installation. Please confirm and wait for completion
Click on picture for better resolution
In the perfect world, you should be able to start your remote desktop client and perform a remote connection… But we are not in a perfect world, so there are some additional configuration actiosn to be performed.
Post Setup Configuration Steps
Step 1 – Configure Access Console
If you do not perform any configuration changes on your system, when you try for the first time to establish a remote desktop connection to Ubuntu through xRDP software, you should ending up accessing the xRDP login page
Click on picture for better resolution
After providing your credentials, you will only see a green background and no desktop will be shown and ultimately a error message might be popping up..
Click on picture for better resolution
As described in this post, a configuration change needs to happen on the system in order to allow remote session to occur. We have to navigate to the following location /etc/X11
Click on picture for better resolution
In this folder, there is a file called Xwrapper.config. If you edit this file (with admin privilege – i.e. sudo), you can see that the last line indicates that only console access is granted through this file
Click on picture for better resolution
The file needs to be updated. You have to replace the line allowed_users=console by allowed_users=anybody as shown in the screenshot below
Click on picture for better resolution
Make the changes, reboot your system to ensure that the changes is applied accordingly and try to connect again.
Note : The first time you connect to xrdp, you will be disconnected. You will need to connect a second time in order to access your remote session.
If everything is ok, you should be able to perform your remote desktop session
Click on picture for better resolution
Step 2 – Configure Polkit file
Just after login into your Ubuntu system through xRDP, you might see the following popup asking for some authentication as shown in the screenshot below
Click on picture for better resolution
You will need to cancel multiple time this popup before accessing your desktop interface. To avoid this prompt, we will need to change the polkit configuration. Using admin privileges, create a file called 02-allow-colord.conf under the following directory /etc/polkit-1/localauthority.conf.d/
The file should contains the following instructions and you should not be prompted anymore with such authentication request while remoting into your system
polkit.addRule(function(action, subject) { if ((action.id == "org.freedesktop.color-manager.create-device" || action.id == "org.freedesktop.color-manager.create-profile" || action.id == "org.freedesktop.color-manager.delete-device" || action.id == "org.freedesktop.color-manager.delete-profile" || action.id == "org.freedesktop.color-manager.modify-device" || action.id == "org.freedesktop.color-manager.modify-profile") && subject.isInGroup("{group}")) { return polkit.Result.YES; } });
Step 3 – Configure Dock in xRDP
After passing the polkit warning message, you should be able to access the desktop interface. As shown in the screenshot, we have indeed access to the Desktop but the Dock is not visible or not present.
Click on picture for better resolution
Checking settings in the console and within the remote desktop session, a clear difference appears. In the console session, we can clearly see that Dock option in the settings window. However, in the remote session, there is no Dock options available.
Click on picture for better resolution
To fix this issue, you will first need to install the gnome tweak tool (which seems not be installed by default)
Click on picture for better resolution
When installed, open the Gnome Tweak application, go to extensions node and check the status of Ubuntu Dock. As you can see, the dock is not enabled. This is why there is no Dock visible the first time you perform the remote connection
Click on picture for better resolution
So, to view the Dock, simply enable these extensions and you should be good to go
Click on picture for better resolution
Step 4 – Update Theme
A final minor issue people might want to fix is the default Ubuntu theme to be used. Within the remote desktop session, the Ubuntu theme is not applied by default or it’s kind of mangled as seen in the screenshot below
Click on picture for better resolution
As you can see, in the Gnome Tweak > Appearance, under the Themes section, the applications field is empty. Changing this value to Ambiance will set the standard look to your remote session.
Click on picture for better resolution
Other Considerations
GDM Login page color inconsistent
Some other small considerations are related to look n feel of the gdm login page within the remote session. When login locally on the system, the gdm page is the customized page created by Canonical (purple background). If accessing the system while system is locked, the gdm login page background fall back to the standard grey background
Click on picture for better resolution
Session type
Ubuntu 17.10 is using Wayland as Default Display Server, it was a surprise that xRDP is indeed still working. After some basic checks, xRDP can still work because the implementation is falling back to the X11 session type (as seen on the screenshot)
Click on picture for better resolution
A single user can access console and remote session
Since the console session is running under Wayland and the remote session is running under x11, we assume that the same user can now indeed connect simultaneously to console and remote session. So, with this Ubuntu release, a user logged into the console should be able to access the remote session as well. This is not the case. We have tested this… If the user is connected through remote desktop session, and if the same user tries to connect to the console, the login process will loop. If the user is logged into the console, the remote session will only show a black screen. So this point is still not fixed…..
Final Notes
Voila ! This is the current status of xRDP in conjunction with Ubuntu 17.10. So far, xRDP can still be used against Ubuntu systems because it fall back to x11 session type which are still available in Ubuntu. In this post, we have seen that installing xRDP is quite straight forward but there is a need to perform a lot of small tweaks to make it worked smoothly. The future seems to be Wayland and we are excited to see what new features or software will be developed to provide remote session capabilities to Linux systems
Hope you enjoyed this post
Till next time
See ya
Hi, thanks for this tutorial. Unfortunately, even with the change in /etc/X11/Xwrapper.config (there’s a typo in your tutorial btw, should be allowed_users=anybody) I still get the green background after logging in, and I’m disconnected after some seconds…
Any idea what could be the problem?
Christian
@Christian;
Thank for the info about the typo… this has been updated….
To help with this issue; we would need more info…. Have you checked the log files for xrdp ?
The disconnect issue can be anything…so we need more info in order to troubleshoot. Check all logs for xrdp and xorg as well
Till next time
See ya
We are having trouble using xrdp with two or more concurrent users, is this even possible ? It seems to show a locked screen with a grayed out password and the screen is unresponsive not sure why .. do i have to find the port number for the existing connection ?
Thanks!
Best post ever!
Hi, thanks for this tutorial. It seems that I have the same issues as @Christian. After restarting ubuntu and trying to connect from Windows, the blue screen does disappear but I am disconnected after a short delay. I have Ubuntu 17.04 installed and it is a desktop setup, not VM, if it matters. Journal is listed below. Any idea what could be the problem? (cleand ubuntu ip from the log, hope it doesn’t matter)
Thanks
Nov 07 13:26:59 michaels-lx systemd[1]: Starting xrdp daemon…
Nov 07 13:27:00 michaels-lx systemd[1]: xrdp.service: PID file /run/xrdp/xrdp.pid not readable (yet?) after start: No such file or directory
Nov 07 13:27:01 michaels-lx systemd[1]: Started xrdp daemon.
Nov 07 13:27:02 michaels-lx xrdp[942]: (942)(139996347718464)[INFO ] starting xrdp with pid 942
Nov 07 13:27:02 michaels-lx xrdp[942]: (942)(139996347718464)[INFO ] listening to port 3389 on 0.0.0.0
Nov 07 13:30:48 michaels-lx xrdp[942]: (942)(139996347718464)[INFO ] A connection received from: ::ffff: port 60141
Nov 07 13:30:48 michaels-lx xrdp[942]: (942)(139996347718464)[DEBUG] Closed socket 12 (AF_INET6 ::ffff: port 3389)
Nov 07 13:30:48 michaels-lx xrdp[3276]: (3276)(139996347718464)[DEBUG] Closed socket 11 (AF_INET6 :: port 3389)
Nov 07 13:30:48 michaels-lx xrdp[3276]: (3276)(139996347718464)[INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
Nov 07 13:30:48 michaels-lx xrdp[3276]: (3276)(139996347718464)[INFO ] Using default X.509 key file: /etc/xrdp/key.pem
Nov 07 13:30:48 michaels-lx xrdp[3276]: (3276)(139996347718464)[DEBUG] Security layer: requested 11, selected 0
Nov 07 13:30:49 michaels-lx xrdp[3276]: (3276)(139996347718464)[DEBUG] Closed socket 12 (AF_INET6 ::ffff: port 3389)
Nov 07 13:30:49 michaels-lx xrdp[942]: (942)(139996347718464)[INFO ] A connection received from: ::ffff: port 60142
Nov 07 13:30:49 michaels-lx xrdp[3276]: (3276)(139996347718464)[ERROR] Listening socket is in wrong state, terminating listener
Nov 07 13:30:49 michaels-lx xrdp[942]: (942)(139996347718464)[DEBUG] Closed socket 12 (AF_INET6 ::ffff: port 3389)
Nov 07 13:30:49 michaels-lx xrdp[3277]: (3277)(139996347718464)[DEBUG] Closed socket 11 (AF_INET6 :: port 3389)
Nov 07 13:30:49 michaels-lx xrdp[3277]: (3277)(139996347718464)[INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
Nov 07 13:30:49 michaels-lx xrdp[3277]: (3277)(139996347718464)[INFO ] Using default X.509 key file: /etc/xrdp/key.pem
Nov 07 13:30:49 michaels-lx xrdp[3277]: (3277)(139996347718464)[DEBUG] Security layer: requested 0, selected 0
Nov 07 13:30:49 michaels-lx xrdp[3277]: (3277)(139996347718464)[DEBUG] xrdp_00000ccd_wm_login_mode_event_00000001
Nov 07 13:30:49 michaels-lx xrdp[3277]: (3277)(139996347718464)[INFO ] Loading keymap file /etc/xrdp/km-00000409.ini
Nov 07 13:30:49 michaels-lx xrdp[3277]: (3277)(139996347718464)[WARN ] local keymap file for 0x00000409 found and doesn’t match built in keymap, using local keymap file
Nov 07 13:30:59 michaels-lx xrdp[3277]: (3277)(139996347718464)[DEBUG] xrdp_wm_log_msg: connecting to sesman ip 127.0.0.1 port 3350
Nov 07 13:31:00 michaels-lx xrdp[3277]: (3277)(139996347718464)[INFO ] xrdp_wm_log_msg: sesman connect ok
Nov 07 13:31:00 michaels-lx xrdp[3277]: (3277)(139996347718464)[DEBUG] xrdp_wm_log_msg: sending login info to session manager, please wait…
Nov 07 13:31:00 michaels-lx xrdp[3277]: (3277)(139996347718464)[DEBUG] return value from xrdp_mm_connect 0
Nov 07 13:31:00 michaels-lx xrdp[3277]: (3277)(139996347718464)[INFO ] xrdp_wm_log_msg: login successful for display 10
Nov 07 13:31:00 michaels-lx xrdp[3277]: (3277)(139996347718464)[DEBUG] xrdp_wm_log_msg: started connecting
Nov 07 13:31:01 michaels-lx xrdp[3277]: (3277)(139996347718464)[INFO ] lib_mod_log_peer: xrdp_pid=3277 connected to X11rdp_pid=3287 X11rdp_uid=110131247 X11rdp_gid=10001 client_ip=::ffff: client_port
Nov 07 13:31:01 michaels-lx xrdp[3277]: (3277)(139996347718464)[DEBUG] xrdp_wm_log_msg: connected ok
Nov 07 13:31:01 michaels-lx xrdp[3277]: (3277)(139996347718464)[DEBUG] xrdp_mm_connect_chansrv: chansrv connect successful
Nov 07 13:31:01 michaels-lx xrdp[3277]: (3277)(139996347718464)[DEBUG] Closed socket 16 (AF_INET6 ::1 port 58332)
Nov 07 13:31:01 michaels-lx xrdp[3277]: (3277)(139996347718464)[INFO ] The following channel is allowed: rdpdr (0)
Nov 07 13:31:01 michaels-lx xrdp[3277]: (3277)(139996347718464)[INFO ] The following channel is allowed: rdpsnd (1)
Nov 07 13:31:01 michaels-lx xrdp[3277]: (3277)(139996347718464)[INFO ] The following channel is allowed: cliprdr (2)
Nov 07 13:31:01 michaels-lx xrdp[3277]: (3277)(139996347718464)[INFO ] The following channel is allowed: drdynvc (3)
Nov 07 13:31:01 michaels-lx xrdp[3277]: (3277)(139996347718464)[DEBUG] The allow channel list now initialized for this session
Nov 07 13:31:03 michaels-lx xrdp[3277]: (3277)(139996347718464)[DEBUG] Closed socket 18 (AF_UNIX)
Nov 07 13:31:03 michaels-lx xrdp[3277]: (3277)(139996347718464)[DEBUG] Closed socket 12 (AF_INET6 ::ffff: port 3389)
Nov 07 13:31:03 michaels-lx xrdp[3277]: (3277)(139996347718464)[DEBUG] xrdp_mm_module_cleanup
Nov 07 13:31:03 michaels-lx xrdp[3277]: (3277)(139996347718464)[DEBUG] Closed socket 17 (AF_UNIX)
Nov 07 13:31:03 michaels-lx xrdp[3277]: (3277)(139996347718464)[ERROR] Listening socket is in wrong state, terminating listener
Nov 07 13:34:16 michaels-lx xrdp[942]: (942)(139996347718464)[INFO ] A connection received from: ::ffff: port 60166
Nov 07 13:34:16 michaels-lx xrdp[942]: (942)(139996347718464)[DEBUG] Closed socket 12 (AF_INET6 ::ffff: port 3389)
Nov 07 13:34:16 michaels-lx xrdp[3638]: (3638)(139996347718464)[DEBUG] Closed socket 11 (AF_INET6 :: port 3389)
Nov 07 13:34:16 michaels-lx xrdp[3638]: (3638)(139996347718464)[INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
Nov 07 13:34:16 michaels-lx xrdp[3638]: (3638)(139996347718464)[INFO ] Using default X.509 key file: /etc/xrdp/key.pem
Nov 07 13:34:17 michaels-lx xrdp[3638]: (3638)(139996347718464)[DEBUG] Security layer: requested 11, selected 0
Nov 07 13:34:17 michaels-lx xrdp[3638]: (3638)(139996347718464)[DEBUG] Closed socket 12 (AF_INET6 ::ffff: port 3389)
Nov 07 13:34:17 michaels-lx xrdp[942]: (942)(139996347718464)[INFO ] A connection received from: ::ffff: port 60167
Nov 07 13:34:17 michaels-lx xrdp[3638]: (3638)(139996347718464)[ERROR] Listening socket is in wrong state, terminating listener
Nov 07 13:34:17 michaels-lx xrdp[942]: (942)(139996347718464)[DEBUG] Closed socket 12 (AF_INET6 ::ffff:172.18.13.18 port 3389)
Nov 07 13:34:17 michaels-lx xrdp[3642]: (3642)(139996347718464)[DEBUG] Closed socket 11 (AF_INET6 :: port 3389)
Nov 07 13:34:17 michaels-lx xrdp[3642]: (3642)(139996347718464)[INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
Hello, I’m extremely new to linux. Just installed for the first time. You kind of flew over a few steps as an experienced linux user.
1.) “If you edit this file (with admin privilege – i.e. sudo), you can see that the last line indicates that only console access is granted through this file” I don’t know how to open a file that is only accessible to the root user. I tried googling, but people made it very confusing and wanted to install other things, just to open a root file. I’m sure there’s a way to do it from command prompt. Would be useful if those screenshots were included with these steps.
2.) “Using admin privileges, create a file called 02-allow-colord.conf under the following directory /etc/polkit-1/localauthority.conf.d/” Just like #1 If I don’t even know how to read a file that requires root access, how can I know how to create a file with admin privileges. I’d like to know the commands to do this too.
3.) “To fix this issue, you will first need to install the gnome tweak tool (which seems not be installed by default) ” How do we install gnome tweak tool?
Your tutorials are great and I really appreciate them. Sorry for the annoying questions. I’ve worked in Windows forever. I’m just now trying to step out and learn linux, but is very confusing for a beginner.
There were a few steps left out for those of us new to Linux. I’ve included those steps here for anyone needing additional help as I did.
1. ) How to edit a file that has administrative privileges (i.e. Xwrapper.config)
sudo nano /etc/X11/Xwrapper.config
After modifying file in nano, press Ctrl + O to save changes. Then press Ctrl + X to exit.
2.) How to create a file with administrative privileges (i.e. 02-allow-colord.conf )
Navigate to the following directory
cd /etc/polkit-1/localauthority.conf.d/
Use touch to create file
sudo touch 02-allow-colord.conf
3.) Install gnome tweak tool
sudo apt install gnome-tweak-tool
Once installed tool is listed under utilities applications called Tweak.
I got everything working perfectly. This is great! I only have one problem now. Since we created the “02-allow-colord.conf” file I get an error upon restart/login “System program problem detected” I checked the crash logs in /var/crash/ and the only crash item reporting is _usr_lib_policykit-1_polkitd.0.crash. I assume this is because we created the new file in that directory and modified it. Anyway to prevent these crashes? Other than the annoying crash message every time. Everything seems to work.
@Calfaro;
xRDP should allow multiple connections. This was possible in the past. Remember that the a unique user can perform only a single connection. UserA will be able to connect only to a single session. If you have UserA and UserB and userC, they should be able to connect to their own session. xRDP can be configured to limit number of concurrent connections….
As Ubuntu has been moved to Gnome Desktop and Wayland display manager, some changes might occurs but we have not extensively test xRDP with the latest release
Hope this help
Till next time
@Jangwon,
Thank you for the visit and the feedback… It always rewarding to see that our work has some value out there 🙂
Till next time
See ya
@Michael,
Which version of Ubuntu 17.04 are you using ? Ubuntu 17.04 Unity or Ubuntu 17.04 Gnome ? Have you modified accordingly the Xwrapper.config file to allow multiple connections to your Ubuntu Box ? Can you run xrdp in debug mode to see if you can get more info (check http://c-nergy.be/blog/?p=10887 )
Hope this help
Till next time
@Stephen;
We are trying to find right balance for the user audience we have. As we have been writing about a long time about xRDP, we are expecting that some basic knowledge of Linux exists when following our instructions. Indeed, there are still people that are not familiar with Linux basics which is good as this demonstrate the interest of more people in Linux. For all the comments you have done, I would suggest you to google and you should find immediate response to your questions..
Hope you understand the situation
Till next time
See ya
@Stephen,
Thank you for providing the info for other uses
Till next time
See ya
@Stephen,
To validate your assumption, delete the file created and see if the crash is still happening.
The file created should not trigger the crash. The file is a configuration file that relax a little bit Ubuntu security
Hope this help
Till next time
See ya
I need to connect to the same session simultaneously from three different terminals; do I need to try the xrdp walkthroughs for 14.04 ?
I see your site shows many differences in both installation process but also in functional results depending on which desktop, xRDP, flavour, and release. I’m flexible but I’m trying to figure out the combination that will actually work.
@Thorr18,
xRDP could be an option for your remote desktop session. The solution would depend mostly on the version of Ubuntu you are running and the flavour.
We have achieved good results with the latest Ubuntu version 17.10 introducing the new Ubuntu Gnome Desktop….
About accessing the same session, as long as you are not logged directly on the Ubuntu machine, you will be able to reconnect to your xrdp session from different computers.
If you need to access the local session of your Ubuntu machine, you need to logoff from the remote session first. IF you are try to connect with the same account on Ubuntu locally and remotely, you will be able to access only one session (either local or remote depends which one is active)
Hope this answer your question
Till next time
See ya
Is there a way to boot up directly into the remote session (I have a headless computer, so I don’t need local). I would like it to boot up, and start running a few applications on its own. But I would like to be able to connect via rdp to it without logging out first.
@David,
I’m not sure to understand what you are trying to achieve here…..
xRDP should be working on a headless setup (I never tried myself) but I’m assuming that you can install it and configure your system to using xRDP. When installation is completed, reboot your system, and try to access the system via rdp protocol, you will need to login first and then you can have access to your desktop
Hope this answer your question
Till next time
See ya
Thanks! I was just confused thinking you had to be logged out before you could connect to RDP. I have it figured out now.
Thanks. It worked and saved me a lot of time.
I used one of your older tutorials to get xrdp running on 16.04 with mate. Which steps would I have to roll back from that tutorial to get xrdp running on the new default gnome desktop? Any changes necessary for the lightdm to gdm change? I have no preference for mate and only installed it because unity would not work well with xrdp at the time. Thanks.
@Garret,
maybe you should first read this post (http://c-nergy.be/blog/?p=10938). Actually, it’s possible to connect to Unity through xRDP if you perform a custom installation on Ubuntu 16.04. starting from Ubuntu 16.10, xrdp package has been upgraded and you can connect to unity desktop.
In theory, you should not need to rollback anything on your current system. You simply need to add the Gnome Desktop as a desktop option and configure xRDP to use Gnome when performing the remote session
You can see a demo of all the different Desktop environment that can be used with xRDP software see http://c-nergy.be/blog/?p=10028
In the post http://c-nergy.be/blog/?p=10028, there is also a link that explain how we did in order to have access to all these different desktop
Please before trying anything, make sure you have a full backup of your system because a lot of changes occurs since ubuntu 16.04 and some stuff might not work as expected….
Hope this help
till next time
See ya
Hi Griffon,
Have you managed to get remote desktop working with Ubuntu 17.10 Server (witheither Mate or Xfce desktop installed).
In previous releases I managed to acheive this except now.
Thanks in advance.
@Turbotim,
We will need to check this… might take some times as we are travelling and we are busy in heavy project
but this will be covered in 2018 for sure
Till next time
See ya
Just installed Ubuntu 17.10 to find that xrdp didn’t work. (finally) found your instructions and everything now works like a charm.
Thank for putting this together.
@Bytemon,
Thank you for the visit and positive comments. We are always happy to see that some of our posts are useful
Till next time
See ya
Great tutorial!
Had huge problems getting this to work, until I found this page..
I have the same problem as Stephen had, with the usr_lib_policykit-1_polkitd.0.crash, but this I can live with…
@Roger
Thank for your visit and your feedback. that’s the spirit indeed. xrdp is probably not the perfect solution but at least offer a way to work and use RDP protocol
Till next time
See ya
Hi there – how to get it so it doesn’t use the XFCE desktop? It won’t show me my actual Ubuntu orange-ish pink desktop; it only remotes into a blue-ish desktop with some rodent running across the screen.
I also never experienced the polkit message you mention above so didn’t complete any of those subsequent steps (since it allowed me to remote in regardless)
@T,
have you read the post completely ? have you checked for more recent posts about this topic through the blog.
In a few words, you simply install default xrdp package, you ensure that console access is allowed and you will have access to the Gnome Desktop and that’s it
This apply for Ubuntu 17.10 and above… are you using Virtual machines, physical machines ? are you trying to install vnc server software (not needed anymore). Everything should be working out of the box
Hope this help
till next time
See ya
@Griffon – thanks for the reply:
I have gone back and forth between this article, and http://c-nergy.be/blog/?p=11336, and http://c-nergy.be/blog/?p=11399. I never get to the standard Gnome desktop, despite following all directions (before the Polkit section, because I never receive that warning message you mention); it always brings me to the blue desktop that tells me it’s using XFCE4 and not my current pink desktop. I have uninstalled everything and tried to perform the steps again, but it doesn’t work. I have a physical box with Ubuntu 17.10.1 installed, RDP’ng to it from a Windows 10 machine.
Is there somewhere I can tell it to use xRDP Gnome desktop, and not the XFCE4 desktop? Despite the fact that the terminal log in box says “xRDP – just connecting”, it still doesn’t give me what I want.
@T,
we are confused by your explanation…Do you have xfce desktop installed on your system… if answer is NO, you never connected to any xfce desktop interface……
If you speaking about the blue/green background you see when you get the xrDP login page, this is still the xRDP login process… This means that the connection is not going through…
You have to check your logs /var/logs/xrdp.log and /var/logs/xrdp-sesman.log and also ~/.xsession or ~/.Xorg file
try to post some pictures…..
Hope this help
Till next time
see ya
@Griffon – thanks for continuing to engage –
I figured the blue desktop out – turns out it was utilizing XFCE4, and that’s why I saw this: https://goo.gl/images/bqYZLy. I’ve gone and uninstalled XFCE4 for now to see if I can get this to work without it.
This is what I’ve done most recently: Removed/purged the original xRDP to start fresh. Made sure that I have the wayland session / gnome desktop. Followed your link here, http://c-nergy.be/blog/?p=11399, to execute the script that does everything. Strangely enough, it never asked me for the sudo password; it just executed and ended. It never rebooted my system, either. So I did that manually, then logged off once more.
Attempting to RDP from my Windows machine, it allows me to see the xRDP logon box, but after inputting user name and password, it only shows a black screen. It sits there for a while without doing anything. I am uncertain as to what could be going on. I’d love to get this to work so I can make the machine headless.
@T,
just an idea…. when you perform rdp session to ubuntu machine, can you ensure that nobody is logged into the Ubuntu Machine….You cannot have a user called JohnDoe logged on into your real ubuntu machine and trying to perform a remote desktop connection to this machine using the JohnDoe user… only a single session is allowed for a user either local or remote….
Can you double check that the Xwrapper config file is set to allowed_users=anybody ?
have you checked your logs ??
Hope this help
Till next time
See ya
@Griffon –
There’s no user logged into the system when I am attempting to RDP; it sits at the login screen for my only user. The Xwrapper.config file is set to “anybody” in that last line, per that copied line executed you mention in your tutorials.
——
Here’s a bit from the xrdp.log:
——
[20180322-10:48:49] [INFO ] starting xrdp with pid 2259
[20180322-10:48:49] [INFO ] listening to port 3389 on 0.0.0.0
[20180322-10:49:21] [DEBUG] Closed socket 11 (AF_INET6 :: port 3389)
[20180322-10:49:59] [INFO ] starting xrdp with pid 886
[20180322-10:49:59] [INFO ] listening to port 3389 on 0.0.0.0
[20180322-10:55:55] [INFO ] A connection received from: fe80::f160:ec4:4071:1842 port 64303
[20180322-10:55:55] [DEBUG] Closed socket 12 (AF_INET6 fe80::c50e:e51d:d50e:1605 port 3389)
[20180322-10:55:55] [DEBUG] Closed socket 11 (AF_INET6 :: port 3389)
[20180322-10:55:55] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
[20180322-10:55:55] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
[20180322-10:55:55] [DEBUG] Security layer: requested 11, selected 0
[20180322-10:55:55] [DEBUG] Closed socket 12 (AF_INET6 fe80::c50e:e51d:d50e:1605 port 3389)
[20180322-10:55:55] [ERROR] Listening socket is in wrong state, terminating listener
[20180322-10:55:57] [INFO ] A connection received from: fe80::f160:ec4:4071:1842 port 64304
[20180322-10:55:57] [DEBUG] Closed socket 12 (AF_INET6 fe80::c50e:e51d:d50e:1605 port 3389)
[20180322-10:55:57] [DEBUG] Closed socket 11 (AF_INET6 :: port 3389)
[20180322-10:55:57] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
[20180322-10:55:57] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
[20180322-10:55:57] [DEBUG] Security layer: requested 0, selected 0
[20180322-10:55:58] [DEBUG] xrdp_000007f2_wm_login_mode_event_00000001
[20180322-10:55:58] [INFO ] Loading keymap file /etc/xrdp/km-00000409.ini
[20180322-10:55:58] [WARN ] local keymap file for 0x00000409 found and doesn’t match built in keymap, using local keymap file
[20180322-10:56:02] [DEBUG] xrdp_wm_log_msg: connecting to sesman ip 127.0.0.1 port 3350
[20180322-10:56:02] [INFO ] xrdp_wm_log_msg: sesman connect ok
[20180322-10:56:02] [DEBUG] xrdp_wm_log_msg: sending login info to session manager, please wait…
[20180322-10:56:03] [DEBUG] return value from xrdp_mm_connect 0
[20180322-10:56:03] [INFO ] xrdp_wm_log_msg: login successful for display 10
[20180322-10:56:03] [DEBUG] xrdp_wm_log_msg: started connecting
[20180322-10:56:04] [INFO ] lib_mod_log_peer: xrdp_pid=2034 connected to X11rdp_pid=2037 X11rdp_uid=1000 X11rdp_gid=1000 client_ip=fe80::f160:ec4:4071:1842 client_port=64304
[20180322-10:56:04] [DEBUG] xrdp_wm_log_msg: connected ok
[20180322-10:56:04] [DEBUG] xrdp_mm_connect_chansrv: chansrv connect successful
[20180322-10:56:04] [DEBUG] Closed socket 16 (AF_INET6 ::1 port 38024)
[20180322-10:56:04] [INFO ] The following channel is allowed: rdpdr (0)
[20180322-10:56:04] [INFO ] The following channel is allowed: rdpsnd (1)
[20180322-10:56:05] [INFO ] The following channel is allowed: cliprdr (2)
[20180322-10:56:05] [INFO ] The following channel is allowed: drdynvc (3)
[20180322-10:56:05] [DEBUG] The allow channel list now initialized for this session
[20180322-10:56:05] [DEBUG] Closed socket 18 (AF_UNIX)
[20180322-10:56:06] [DEBUG] Closed socket 12 (AF_INET6 fe80::c50e:e51d:d50e:1605 port 3389)
[20180322-10:56:06] [DEBUG] xrdp_mm_module_cleanup
[20180322-10:56:06] [DEBUG] Closed socket 17 (AF_UNIX)
[20180322-10:56:06] [ERROR] Listening socket is in wrong state, terminating listener
[20180322-10:56:07] [INFO ] A connection received from: fe80::f160:ec4:4071:1842 port 64305
[20180322-10:56:07] [DEBUG] Closed socket 12 (AF_INET6 fe80::c50e:e51d:d50e:1605 port 3389)
[20180322-10:56:07] [DEBUG] Closed socket 11 (AF_INET6 :: port 3389)
[20180322-10:56:08] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
[20180322-10:56:08] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
[20180322-10:56:08] [DEBUG] Security layer: requested 11, selected 0
[20180322-10:56:08] [DEBUG] Closed socket 12 (AF_INET6 fe80::c50e:e51d:d50e:1605 port 3389)
[20180322-10:56:08] [ERROR] Listening socket is in wrong state, terminating listener
[20180322-10:56:13] [INFO ] A connection received from: fe80::f160:ec4:4071:1842 port 64306
[20180322-10:56:13] [DEBUG] Closed socket 12 (AF_INET6 fe80::c50e:e51d:d50e:1605 port 3389)
[20180322-10:56:13] [DEBUG] Closed socket 11 (AF_INET6 :: port 3389)
[20180322-10:56:13] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
[20180322-10:56:13] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
[20180322-10:56:13] [DEBUG] Security layer: requested 0, selected 0
[20180322-10:56:13] [DEBUG] xrdp_00000844_wm_login_mode_event_00000001
[20180322-10:56:13] [INFO ] Loading keymap file /etc/xrdp/km-00000409.ini
[20180322-10:56:13] [WARN ] local keymap file for 0x00000409 found and doesn’t match built in keymap, using local keymap file
[20180322-10:56:27] [DEBUG] xrdp_wm_log_msg: connecting to sesman ip 127.0.0.1 port 3350
[20180322-10:56:28] [INFO ] xrdp_wm_log_msg: sesman connect ok
[20180322-10:56:28] [DEBUG] xrdp_wm_log_msg: sending login info to session manager, please wait…
[20180322-10:56:28] [DEBUG] return value from xrdp_mm_connect 0
[20180322-10:56:28] [INFO ] xrdp_wm_log_msg: login successful for display 10
[20180322-10:56:28] [DEBUG] xrdp_wm_log_msg: started connecting
[20180322-10:56:29] [INFO ] lib_mod_log_peer: xrdp_pid=2116 connected to X11rdp_pid=2136 X11rdp_uid=1000 X11rdp_gid=1000 client_ip=fe80::f160:ec4:4071:1842 client_port=64306
[20180322-10:56:29] [DEBUG] xrdp_wm_log_msg: connected ok
[20180322-10:56:33] [ERROR] xrdp_mm_connect_chansrv: connect failed trying again…
[20180322-10:56:33] [DEBUG] Closed socket 18 (AF_UNIX)
[20180322-10:56:37] [ERROR] xrdp_mm_connect_chansrv: connect failed trying again…
[20180322-10:56:37] [DEBUG] Closed socket 18 (AF_UNIX)
[20180322-10:56:41] [ERROR] xrdp_mm_connect_chansrv: connect failed trying again…
[20180322-10:56:41] [DEBUG] Closed socket 18 (AF_UNIX)
[20180322-10:56:46] [ERROR] xrdp_mm_connect_chansrv: connect failed trying again…
[20180322-10:56:46] [ERROR] xrdp_mm_connect_chansrv: error in trans_connect chan
[20180322-10:56:46] [DEBUG] Closed socket 16 (AF_INET6 ::1 port 38032)
[20180322-10:56:46] [DEBUG] Closed socket 12 (AF_INET6 fe80::c50e:e51d:d50e:1605 port 3389)
[20180322-10:56:46] [DEBUG] xrdp_mm_module_cleanup
[20180322-10:56:46] [DEBUG] Closed socket 17 (AF_UNIX)
[20180322-10:56:46] [DEBUG] Closed socket 18 (AF_UNIX)
[20180322-10:56:46] [ERROR] Listening socket is in wrong state, terminating listener
——-
Here’s a bit from the xrdp-sesman.log:
——-
[20180322-10:48:47] [DEBUG] libscp initialized
[20180322-10:48:47] [INFO ] starting xrdp-sesman with pid 2249
[20180322-10:48:47] [INFO ] listening to port 3350 on 127.0.0.1
[20180322-10:49:22] [INFO ] shutting down sesman 1
[20180322-10:49:22] [DEBUG] Closed socket 7 (AF_INET6 ::1 port 3350)
[20180322-10:49:56] [DEBUG] libscp initialized
[20180322-10:49:56] [INFO ] starting xrdp-sesman with pid 867
[20180322-10:49:56] [INFO ] listening to port 3350 on 127.0.0.1
[20180322-10:56:02] [INFO ] A connection received from ::1 port 38024
[20180322-10:56:03] [INFO ] ++ created session (access granted): username tb, ip 0.0.0.0:64304 – socket: 12
[20180322-10:56:03] [INFO ] starting Xorg session…
[20180322-10:56:03] [DEBUG] Closed socket 9 (AF_INET6 :: port 5910)
[20180322-10:56:03] [DEBUG] Closed socket 9 (AF_INET6 :: port 6010)
[20180322-10:56:03] [DEBUG] Closed socket 9 (AF_INET6 :: port 6210)
[20180322-10:56:03] [DEBUG] Closed socket 8 (AF_INET6 ::1 port 3350)
[20180322-10:56:03] [DEBUG] Closed socket 7 (AF_INET6 ::1 port 3350)
[20180322-10:56:03] [INFO ] Xorg :10 -auth .Xauthority -config xrdp/xorg.conf -noreset -nolisten tcp
[20180322-10:56:03] [INFO ] starting xrdp-sessvc – xpid=2037 – wmpid=2036
[20180322-10:56:06] [INFO ] ++ terminated session: username tb, display :10.0, session_pid 2035, ip 0.0.0.0:64304 – socket: 12
[20180322-10:56:27] [INFO ] A connection received from ::1 port 38032
[20180322-10:56:28] [INFO ] ++ created session (access granted): username tb, ip 0.0.0.0:64306 – socket: 12
[20180322-10:56:28] [INFO ] starting Xorg session…
[20180322-10:56:28] [DEBUG] Closed socket 9 (AF_INET6 :: port 5910)
[20180322-10:56:28] [DEBUG] Closed socket 9 (AF_INET6 :: port 6010)
[20180322-10:56:28] [DEBUG] Closed socket 9 (AF_INET6 :: port 6210)
[20180322-10:56:28] [DEBUG] Closed socket 8 (AF_INET6 ::1 port 3350)
[20180322-10:56:28] [DEBUG] Closed socket 7 (AF_INET6 ::1 port 3350)
[20180322-10:56:29] [INFO ] Xorg :10 -auth .Xauthority -config xrdp/xorg.conf -noreset -nolisten tcp
[20180322-10:56:29] [INFO ] starting xrdp-sessvc – xpid=2136 – wmpid=2135
[20180322-10:56:29] [INFO ] ++ terminated session: username tb, display :10.0, session_pid 2134, ip 0.0.0.0:64306 – socket: 12
——
There are other sections of the logs, but it’s the same lines. All attempts have been met with either the green screen and a “connection problem, giving up, some problem” message, or a complete black screen that goes on forever and never loads. I’m also not certain what “listening socket is in wrong state” means…
I’m not certain how to debug any of this based on the tutorials. Do you have any other advice? Thanks for continual engagement.
Hello T,
No more ideas here…. what’s the output you receive when you run the following command in ubuntu
Xorg :10 -auth .Xauthority -config xrdp/xorg.conf -noreset -nolisten tcp
Till next time
See ya
@Griffon –
I execute “10 -auth .Xauthority -config xrdp/xorg.conf -noreset -nolisten tcp” from the command line and receive “10: command not found”
@T,
This is the command Xorg :10 -auth .Xauthority -config xrdp/xorg.conf -noreset -nolisten tcp
and not 10 -auth .Xauthority -config xrdp/xorg.conf -noreset -nolisten tcp
Till next time
See ya
@Griffon –
Thanks for the clarification. This is what spits out, without going back to the command line input:
tb@ubuntu:~$ Xorg :10 -auth .Xauthority -config xrdp/xorg.conf -noreset -nolisten tcp
X.Org X Server 1.19.5
Release Date: 2017-10-12
X Protocol Version 11, Revision 0
Build Operating System: Linux 4.4.0-97-generic x86_64 Ubuntu
Current Operating System: Linux ubuntu 4.13.0-37-generic #42-Ubuntu SMP Wed Mar 7 14:13:23 UTC 2018 x86_64
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.13.0-37-generic.efi.signed root=UUID=fc4e1d8e-7d94-4230-8742-9346925a6aa3 ro quiet splash vt.handoff=7
Build Date: 15 October 2017 05:51:19PM
xorg-server 2:1.19.5-0ubuntu2 (For technical support please see http://www.ubuntu.com/support)
Current version of pixman: 0.34.0
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (–) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: “/home/tb/.local/share/xorg/Xorg.10.log”, Time: Mon Apr 9 13:31:57 2018
(++) Using config file: “/etc/X11/xrdp/xorg.conf”
(==) Using system config directory “/usr/share/X11/xorg.conf.d”
xorgxrdpSetup:
xrdpdevSetup:
rdpmousePlug:
rdpkeybPlug:
rdpIdentify:
rdpDriverFunc: op 10
rdpProbe:
rdpPreInit:
rdpScreenInit: virtualX 800 virtualY 600 rgbBits 8 depth 24
rdpScreenInit: pfbMemory bytes 1920000
rdpScreenInit: pfbMemory 0x7f118db32010
rdpSimdInit: assigning yuv functions
rdpSimdInit: cpuid ax 1 cx 0 return ax 0x000306c3 bx 0x03100800 cx 0x7ffafbff dx 0xbfebfbff
rdpSimdInit: sse2 amd64 yuv functions assigned
rdpXvInit: depth 24
rdpScreenInit: out
rdpmousePreInit: drv 0x555f143fafa0 info 0x555f146a4550, flags 0x0
rdpmouseControl: what 0
rdpmouseDeviceInit:
rdpmouseCtrl:
rdpRegisterInputCallback: type 1 proc 0x7f118df0bc70
rdpmouseControl: what 1
rdpmouseDeviceOn:
rdpkeybPreInit: drv 0x555f143dea70 info 0x555f146a6e40, flags 0x0
rdpkeybControl: what 0
rdpkeybDeviceInit:
rdpkeybChangeKeyboardControl:
rdpkeybChangeKeyboardControl: autoRepeat on
rdpRegisterInputCallback: type 0 proc 0x7f118dd08530
rdpkeybControl: what 1
rdpkeybDeviceOn:
rdpSaveScreen:
rdpDeferredRandR:
rdpResizeSession: width 1024 height 768
calling RRScreenSizeSet
rdpRRScreenSetSize: width 1024 height 768 mmWidth 271 mmHeight 203
rdpRRGetInfo:
screen resized to 1024×768
RRScreenSizeSet ok 1
rdpInDeferredUpdateCallback:
rdpkeybChangeKeyboardControl:
rdpkeybChangeKeyboardControl: autoRepeat off
rdpSaveScreen:
rdpSaveScreen:
rdpSaveScreen:
rdpSaveScreen:
rdpSaveScreen:
rdpSaveScreen:
@T,
I have no more ideas…. Can you try to perform a new installation (fresh install – do not install anything else except updates) on a virtual machine (possibly using Ubuntu 18.04 which is on its way) and give it another try..
If this is working, this would mean that something might be broken on your other system..
Hope this help
Till next time
See ya