Score:0

Issues with logging in and maintain remote RDP sessions with XRDP to VPS ubuntu 22.04

pg flag

I have 2 VPS servers running on Ubuntu 22.04. 1 x86_64 at Contabo (VPS1) and one Oracle cloud free tier ARM64 (VPS2).

On Vps1, xfce4, loging in over RDP for some reasons, only allows 1 device at the moment. Any attempt to connect from another client will be refused. My recent changes are to delete the annoying color profile password prompt by sudo rm /usr/share/polkit-1/actions/org.freedesktop.color.polic and to improve xrdp smoothness, I edited the xrdp.ini and sesman.ini with these values:

Policy=UBDI
max_bpp=16
xserverbpp=16
use_compression = yes
crypt_level=medium
KillDisconnected=true
DisconnectedTimeLimit=0
tcp_send_buffer_bytes=4194304

Tweak for TCP (2x request buffer size):
sudo sysctl -w net.core.wmem_max=8388608

On VPS2, I tried installing xfce4 but it only ran once then reverted back to ubuntu-desktop on its own. I use the same values above in xrdp.ini and sesman.ini and deleted the password prompt too. But when logging in from a different client, the previous session will get disconnected which is actually what I want to be able to do on VPS1. However, after a little while of disconnection, when I log in again, the session seems to have been cleared and all the apps/browsers that were open are now closed, which is definitely not desirable on either VPS’s.

I’m also trying to install box86_64 to run wine and windows app on VPS2 (ARM64) and been hitting a bick wall. But I should probably be asking question about that in a separate thread.

Can any one help me out with some pointers, specific codes are much appreciated as I’m still pretty novice with Linux. Thank you in advance.

Score:0
pg flag

Upon reading this thread and some extra tinkering, I changed my xrdp.ini and sesman.ini from above values to below:

Policy=default
max_bpp=16
xserverbpp=16
use_compression=yes
crypt_level=medium
KillDisconnected=false
DisconnectedTimeLimit=0
tcp_send_buffer_bytes=4194304

Tweak for TCP (2x request buffer size):
sudo sysctl -w net.core.wmem_max=8388608

And that seems to do the trick for VPS2 at least. I can’t test on VPS1 yet. And will update this when I do.

Edit: confirmed to work as intended for both VPS’s. Sessions now maintained and can be accessed from different devices (only 1 at a time by 1 user). Also performance is acceptable via different clients with native RDP app on Windows takes the cake after changing the connection speed to “lan…”

ar flag
Welcome to Ask Ubuntu. I am happy that you found a solution. This is a question answer site. Please don't put the answer inside the question. Click on the **Answer Your Own Question** button below and write a detailed answer. Then accept your answer as correct by clicking on the grey check mark ✔️.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.