Yes. xfce4 starts up with ~/startwm.sh in place, using the contents and
permissions you described.
> If you got success with ~/startwm.sh,
> there might be a bug of xrdp. Some people reported similar issue to yours.
OK. That is a separate issue, but a big one for me, as it makes remote
management difficult.
Where is the appropriate place to report the clipboard issue?
> Let me break down the issue and help us improve xrdp before looking at
> clipboard issue.
>
> 1. remove ~/startwm.sh
> 2. confirm /usr/local/etc/xrdp/startwm.sh starts startxfce4
> 3. login via xrdp
> 4. you'll see xterm
> 5. see /var/log/xrdp-sesman.log
> 6. you'll see the log like this
>
> [20180710-23:08:24] [CORE ] waiting for window manager (pid 41266) to exit
> [20180710-23:08:24] [CORE ] error starting default wm for user meta -
> pid 41266
> [20180710-23:08:25] [DEBUG] errno: 2, description: No such file or
> directory
> [20180710-23:08:25] [DEBUG] execlp3 parameter list:
> [20180710-23:08:25] [DEBUG] argv[0] = startwm.sh
> [20180710-23:08:25] [DEBUG] argv[1] = startwm.sh
>
> If you see the log like this, xrdp is failing to find
> /usr/local/etc/xrdp/startwm.sh.
> If you specify the full path to startwm.sh in sesman.ini, it should
> work. Try it.
> Don't forget to restart xrdp-sesman after you edited sesman.ini.
>
> ```
> DefaultWindowManager=/usr/local/etc/xrdp/startwm.sh
> ```
>
> Thank you for your cooperation.
Thank YOU, Iwao-san, for your help with this.
The behavior is exactly as you described, but only if we replace the
startwm.sh script supplied with the pkg with the two-line version you
suggested:
#!/bin/sh
startxfce4
The startwm.sh script supplied with the package has three different
cases for Linux distributions (lines 66-88) but nothing for xfce4 on
FreeBSD.
Thanks again for your help with the startup issue, and in advance for
pointers on debugging the clipboard issue.
dn