So, I have been forced to press an Ubuntu box using 32-bit Wine packages to help someone keep an old application written for Windows NT running a little longer. (yes, I know, horrible idea, they should get new software, they have been warned). Multiple users are able to run the software via XRDP from Windows workstations, this is actually all working great, even better than I would have predicted. The glitch comes in when the user logs off, the system doesn't actually log off, it just refreshes the RDP session, no matter how many times you try to disconnect. Of course you can force a disconnect on the Windows side, but that leaves the user session still running at the other end, which sometimes becomes a problem. I've tried MATE, XFCE, and the default Unity desktop environment, same problem with each thus far. How can I make the logoff function actually trigger the end of the user session?


1 Answer 1


Can you provide exact version of Ubuntu you are running (i.e. 18.04 or 18.04.3,...) How did you perform the installation of the xrdp package ? manual installation or scripted installatioin ?

When you perform a remote connection, which desktop interface is actually used ? (Default Gnome Ubuntu with the Dock or default Gnome Desktop interface ?)

the first I would try is to execute this command


> sudo sed -i.bak "4 a #Improved Look n Feel Method\ncat <<EOF >
> ~/.xsessionrc\nexport GNOME_SHELL_SESSION_MODE=ubuntu\nexport
> XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/xdg\nEOF\n"
> /etc/xrdp/startwm.sh


This command will update the /etc/xrdp/startwm.sh file. The script will create the ~/.xsessionrc file for each user performing a remote desktop connection. The ~/.xsessionrc file will basically ensure that the Default Ubuntu Desktop interface (when logged locally) is also available when remotely connect. The Desktop interface between local login and remote login (on this specific Ubuntu machine) should be the same.....

Logout functionality should then be working for the users.....

If this is still not working, we then might need to have a look at polkit configuration and ensure that standard users are indeed allowed to logout from remote session

Hope this help

till next time

See ya

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .