Xrdp: disable $HOME/thinclient_drives/ and $HOME/xrdp-chansrv.log

Created on 28 Feb 2015  路  14Comments  路  Source: neutrinolabs/xrdp

Hello,
in /etc/xrdp/xrdp.ini, in the channel section, I have disabled drive redirection (rdpdr)
However, when I connect with my client, the directory $HOME/thinclient_drives/ is created (even if it is empty)

In /etc/xrdp/sesman.ini , I can change it to something else
[Chansrv]
FuseMountName=/tmp/thinclient_drives

Can I disable it entirely ? I don't want this folder to be created.

Also, can I disable creation of the log file $HOME/xrdp-chansrv.log ?

many thanks,
Martin

Most helpful comment

only thing working for me is
sudo umount -f thinclient_drives

All 14 comments

~/thinclient_drives/ directory is still used by cliprdr (aka clipboard_file) even if you disabled rdpdr. ~/thinclient_drives/.clipboard/ it that.

Try this workaround.

[Chansrv]
FuseMountName=.thinclient_drives

OK, thanks.

And what about $HOME/xrdp-chansrv.log ? Can I disable this? I really don't need logfile in my $HOME. Besides, it does not even log errors. It logs some debugging info:

[20150228-16:03:53] [CORE ] main: app started pid 3518(0x00000d44)

actually, the directory ~/thinclient_drives/ is empty, even when i am using clipboard. There is nothing inside, no ~/thinclient_drives/.clipboard/

Ok, configuring & building xrdp _without_ --enable-fuse option is another workaround to entirely disable thinclient_drives.

It seems no feature to disable xrdp-chansrv.log now, AFAIK. Comment out chansrv.c:1492 is the workaround.

I also think thinclient_drives directory and xrdp-chansrv.log file should be disabled by user configuration. It requires some implementation.

The directory
~/thinclient_drives/.clipboard/
Is only used when copy and pasting files. Not normal clipboard data.

What options should we add? The reason chansrv log is in home is because it runs a normal user.
There is a CHANSRV_LOG_PATH environment variable that can set the directory but maybe we also need CHANSRV_LOG_FILE so we can set it to /dev/null.

It looks like a bug when the thinclient_drives directory gets created and you are not doing drive redirection.
Should we default the log to a .xrdp directory in home?
I don't think we want the thinclient_drives directory hidden, people need to find it.

Ok, I see it is a bug that thinclient_drives directory is always made. I agree thinclient_drives directory should not be hidden.

BTW, if I'm not misunderstanding, CHANSRV_LOG_PATH looks to be not actually working. You suppose that CHANSRV_LOG_PATH environment variable is set by user in .bash_profile, .zprofile or something like that?

Executing xrdp-chansrv from user shell properly reads environment variable and xrdp-chansrg.log is written in CHANSRV_LOG_PATH. However xrdp-chansrv which is forked by xrdp-sessvc forked by xrdp-sesman(root privileges) does not have CHANSRV_LOG_PATH environment variable.

When xrdp-chansrv is executed not via user's shell, user-defined environment variables are useless.

Adding CHANSRV_LOG_PATH to the [SessionVariables] in sesman.ini worked for me.

eg:

[SessionVariables]
PULSE_SCRIPT=/etc/xrdp/pulse/default.pa
CHANSRV_LOG_PATH=/tmp

nice!

What happens for the second remote user ?

It would be great if the username will be part of the log file name. This would really allow CHANSRV_LOG_PATH=/tmp.

The chansrv log path has been changed to .local/share/xrdp/.

2020 and still facing the same issue.
and it's become annoying cause everytime you ls you get this error message
image

only thing working for me is
sudo umount -f thinclient_drives

only thing working for me is
sudo umount -f thinclient_drives

it works for me too , thanks a lot

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Zer0CoolX picture Zer0CoolX  路  3Comments

porunov picture porunov  路  3Comments

AlexNikolaenko picture AlexNikolaenko  路  3Comments

sblack1969 picture sblack1969  路  7Comments

jsorg71 picture jsorg71  路  7Comments