Annoying problem w/ xrdp

i had to install an linux based server, so after facing many problems over and over again, i finally managed to overcome all of them

so now i was configuring the xrdp and at the first look, everything worked fine, but then came the problem i cant find a way to fix it at all

here at my work we have lots of computers, and only 2 of them run linux, the rest is all windows, and them problem is at UI remote conection between windows/linux

when some1 use windows native remote app, that person can connect without problems, you can even share files with the remote computer (the server one) by the thinclient thing, but just at the very first time..

when a user ends his session, later, after coming back and starting a new session, at trying to open the thinclient_drives again, its doesnt work

the user receive the following error:
error message without handling: error getting information for the file. Endpoint transport is not connected.

i didnt get it at all, because the first time some1 logs in, it works perfectly, you can even quit the remote conection without ending your session and coming back later, and everything will still working

however, if you do finish your session and log back again later, it doesnt work anymore until server reboot

i tried lots of stuff, i first tought it was some hidden session left behind, i even tried rebooting the xrdp, but the problem didnt got fixed at all

i also tried umounting, but it doesnt let me umount the thinclient

i tried the command “ps aux” to see all process runing, and killed a lot of
them, trying to fix without reboot, but no success

no matter how hard i try, i cant find whats is going on, i know it might be some hidden process left i cant see or something else, but i dont know how to find it if it is something like that

the only solution for now is not fishing a session while leaving the remote connection, otherwhise the server has to be rebooted

at reboot, thinclient works fine again, but just once, then the same thing happens all over again

any tips on what’s causing all of that or how to fix it?

Asked By: Kouhei

||

after looking around at the internet for a way to fix that, i found a temporary solution

looks like the cause is a problem with the 18.04 version of ubuntu itself

the way to fix it is quite simple, after logging in, the first thing you should do is umounting the thinclient thing, i did that by terminal using

sudo umount -f thinclient_drives

after that, you must rename the thinclient_drives to .thinclient_drives

just add a dot before and it will fix everything, however, looks like ubuntu isnt umounting correctly when finishing the session, so, you gotta umount manualy every time, that way, it will work and mount correctly the next time you log in

im gonna try to see now if its possible to run some kind of command before logging off, if it is, then ill fix it by setting a command to umount everytime b4 login out

Answered By: Kouhei

vi(m) the /etc/xrdp/sesman.ini file.

Under [Chansrv] add:
FuseMountName=/tmp/%u/thinclient_drives

Log out and log back in. The thinclient_drives will now be mounted in /tmp/{uid}/thinclient_drives.

You can rmdir thinclient_drives in your homedir.

Answered By: Chili1946

I like all the answers here and for me, the most efficient way to solve this problem is to combine both methods by using sed to to look in /etc/xrdp/sesman.ini and change FuseMountName=thinclient_drives to FuseMountName=.thinclient_drives .

#!/usr/bin/env bash

#set -o errexit
set -o nounset
#set -eu -o pipefail
#set -x
#trap read debug

thinclient=$(sudo cat /etc/xrdp/sesman.ini | grep FuseMountName)

if [ -z "$thinclient" ]; then
  echo 'Entry doesn''''t exist, adding...''
  sudo sed -i '/Chansrv/a FuseMountName=.thinclient_drives' /etc/xrdp/sesman.ini
else
  echo 'Entry exists, modifying...'
  sudo sed -i s/"$thinclient"/FuseMountName=.thinclient_drives/g /etc/xrdp/sesman.ini
fi

The problem should resolve itself after logging out and then back in.

Answered By: Arkham Angel
Categories: Answers Tags:
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.