XRDP session fails to open

remote

#1

I can connect remotely using RDP to an Ubuntu MATE 14.04.2 desktop running xrdp but cannot connect to xrdp on Ubuntu Server 14.04.2 with Ubuntu MATE installed (ubuntu-mate-core and ubuntu-mate-desktop packages installed).

Does anyone know of the difference between the Ubuntu MATE ISO install and the Ubuntu Server plus Ubuntu MATE packages install that would explain this behaviour? Or better still a fix.

I’ve tried both these scenarios on the same hardware: ISO install works, server+packages does not. Message in server syslog:

 Apr 28 14:56:53 hph9-server x-session-manager[2747]: WARNING: software acceleration check failed: Child process exited with code 1

The same problem is described here: http://askubuntu.com/questions/445485/ubuntu-14-server-and-xrdp

The related Launchpad bug states it’s fixed in 14.04.3 – yet it appears to have been fixed in Ubuntu MATE 14.04.2 desktop: https://bugs.launchpad.net/ubuntu/+source/gnome-session/+bug/1251281


#2

i never had a server with Desktop installed, i always used the command line it seems more powerful then the GUI. Are you able to connect trough SSH, FTP or just RDP is not working?


[Solved] XRDP "Could not acquire name on session bus" = Ubuntu Mate 17.04
#3

I use the command-line for admin work but the server is the only machine I can guarantee is always turned on when I’m off-site and need a remote desktop.


#4

Your description here initially made me think you cannot connect at all, but when the link describes a grey screen with an X cursor… that’s something I’ve come across a few times.

There is a script executed by XRDP on successful login which defines how to start the desktop environment. Presumably because the server install doesn’t include any desktop (or an X server) by default, this will be blank or points to the wrong thing.

The file you want is /etc/xrdp/startwm.sh

I’ve written a forum post a few years ago for Lubuntu (LXDE), but a similar thing can be applied for the MATE desktop. Instead of lxsession, it’s mate-session.

In a nutshell, a compact 1-2-3 fix:

  1. Open the script (which is executed on successful logins):

sudo nano /etc/xrdp/startwm.sh

  1. Comment out by putting a hash (#) in front of:

. /etc/X11/Xsession

  1. Add at the bottom:

mate-session

Then press CTRL+X and y to save.

Changes should take effect immediately for the next xrdp session. If not:

sudo service xrdp restart

(This will kill any existing xrdp sessions that are still running)

Just a note: If you decide to switch away from MATE to a different environment for remote desktops on the server, you’ll need to change mate-session to the corresponding desktop.


How to close all sessions in Xrdp . Problem with drives
XRDP does not reconnect to old session
#5

Brillant! Works perfectly. Thank you so much.


#6

A post was split to a new topic: XRDP does not reconnect to old session


#8

Thank you very much for this solution. It works for Ubuntu-Mate 18 on RPi 3B and will be further tested on RPi 2. I will post a link to this on Raspberry Pi forum that shows the migration steps for upgrading from Mate 16.


#9

Here are the Mate upgrade instructions below that works.

https://www.raspberrypi.org/forums/viewtopic.php?f=56&t=223749&p=1372449

For xrdp to run, used the link below to make xrdp work using xfce desktop manager.


#10

This worked for about a week for me, and now I’m back to the session not opening mate (or any destkop). I found if I Ctrl-Alt-T to open Terminal, then type sudo mate-session, it opens a mate session, but not the one I’ve configured.

Any suggestions?


#11

Try running mate-session without sudo, since “sudo” will run the entire session as the root user (not a good idea). At least if it fails, they’d be further details on the terminal to diagnose. I don’t actually use XRDP anymore.

Has XRDP been updated recently? The “fix” could have been overwritten by newer packages.


#12

I don’t think it has updated. It’s a headless server. When I just run mate-session without sudo in Terminal, I get the following response:
(mate-session:28587): dbind-WARNING **: 22:25:43.374: Couldn’t register with accessibility bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
mate-session[28587]: WARNING: Failed to acquire org.gnome.SessionManager
Gtk-Message: 22:25:43.592: GtkDialog mapped without a transient parent. This is discouraged.