{"id":2037,"date":"2024-01-21T11:37:24","date_gmt":"2024-01-21T09:37:24","guid":{"rendered":"http:\/\/192.168.1.213:8088\/?p=2037"},"modified":"2024-08-18T17:17:17","modified_gmt":"2024-08-18T15:17:17","slug":"optimizing-rdp-performance-xrdp-lessons-learned-with-ubuntu-22-04","status":"publish","type":"post","link":"http:\/\/192.168.1.213:8088\/optimizing-rdp-performance-xrdp-lessons-learned-with-ubuntu-22-04\/","title":{"rendered":"Optimizing RDP Performance (xrdp): Lessons Learned with Ubuntu 22.04"},"content":{"rendered":"\t\t
In the dynamic world of system engineering, the choice between proprietary and open-source software often hinges on practicality and expertise. I’m a big supporter of open-source solutions, recognizing their potential in the right scenarios. However, this preference isn’t without its challenges. Open-source systems demand a deeper understanding, requiring time and effort that might not always be available, especially when deep-diving into complicated configuration files.<\/p>
Currently, I’m gearing up for an upcoming session at Cisco Live. This preparation includes setting up a shared environment for users. Traditionally, I’ve relied on a Windows Jumphost for user connections. But, as many of us have experienced, Windows struggles with handling multiple RDP sessions. The alternative? Setting up a Windows Server with a terminal server role \u2013 a task that I quickly discarded.<\/p>
In search of efficiency, I turned to Ubuntu 22.04, installing and initiating XRDP<\/strong>. My anticipation for a smooth performance was met with a stark reality. The experience was frustratingly slow, challenging the practicality of this open-source solution in a user-shared environment.<\/span><\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t After searching through various sites and wasting a couple of hours I got a workable solution and the user experience through RDP is okay. Below you will find the customizations:\u00a0\u00a0<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t Isn’t that a bit confusing? What is a window and display manager?<\/p> Display Manager<\/strong>:<\/p> Window Manager<\/strong>:<\/p> This makes sense to adjust for a better experience!<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t If you want a user to automatically load XFCE, place a text file called .xfce4-session in the home directory with the following content:<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t Let’s take a look at the xrdp service as there are some ways to optimize the performance.\u00a0<\/p> tcp_nodelay=true<\/strong><\/p> tcp_keepalive=true<\/strong><\/p> tcp_send_buffer_bytes=4194304<\/strong><\/p> crypt_level=low<\/strong><\/p> max_bpp=16<\/strong><\/p> Please change the following values in the \/etc\/xrp\/xrp.ini:<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t KillDisconnected=true<\/strong><\/p> DisconnectedTimeLimit=0<\/strong><\/p> Please change the following values in the \/etc\/xrp\/seman.ini:<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t Disable the composition which is responsible for advanced graphical features like transparency, shadows, and animations.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t I also had the annoying message “System program problem detected<\/strong>” after a login.\u00a0 To disable this pop-up change the file as shown below.\u00a0\u00a0<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t While open-source software offers flexibility, control, and cost-effectiveness, it also demands a deeper technical understanding and a readiness to tackle hands-on configuration challenges.<\/p> This experience serves as a reminder that in the realm of system engineering, especially when dealing with shared user environments, the choice between open-source and proprietary software isn’t just about preference, but also about practicality and efficiency.\u00a0<\/p> While out-of-the-box systems offer convenience and immediate functionality, they frequently require performance tuning to meet specific operational needs. This tuning is essential to optimize the system’s efficiency and ensure it aligns with the unique demands of its intended environment.<\/p> Still, one open issue is the creation of a default user profile. Everyone who logs in should get the same environment but that is a problem for the next article. \ud83d\ude1c<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t Table of Contents Introduction In the dynamic world of system engineering, the choice between proprietary and open-source software often hinges on practicality and expertise. I’m a big supporter of open-source solutions, recognizing their potential in the right scenarios. However, this preference isn’t without its challenges. Open-source systems demand a deeper understanding, requiring time and effort […]<\/p>\n","protected":false},"author":2,"featured_media":2038,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[13,1],"tags":[],"class_list":["post-2037","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-open-source","category-uncategorized"],"_links":{"self":[{"href":"http:\/\/192.168.1.213:8088\/wp-json\/wp\/v2\/posts\/2037"}],"collection":[{"href":"http:\/\/192.168.1.213:8088\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/192.168.1.213:8088\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/192.168.1.213:8088\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/192.168.1.213:8088\/wp-json\/wp\/v2\/comments?post=2037"}],"version-history":[{"count":11,"href":"http:\/\/192.168.1.213:8088\/wp-json\/wp\/v2\/posts\/2037\/revisions"}],"predecessor-version":[{"id":2088,"href":"http:\/\/192.168.1.213:8088\/wp-json\/wp\/v2\/posts\/2037\/revisions\/2088"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/192.168.1.213:8088\/wp-json\/wp\/v2\/media\/2038"}],"wp:attachment":[{"href":"http:\/\/192.168.1.213:8088\/wp-json\/wp\/v2\/media?parent=2037"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/192.168.1.213:8088\/wp-json\/wp\/v2\/categories?post=2037"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/192.168.1.213:8088\/wp-json\/wp\/v2\/tags?post=2037"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}Customizations<\/h5>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
Display- and window- manager<\/h6>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
In short, XFCE is a lightweight window manager which does exactly what I wanted. I don’t need any fancy styles or animations.\u00a0<\/li>
LightDM, created by Canonical, stands out for its lack of GNOME dependencies. This display manager is not only highly customizable but also notably lightweight, making it an ideal choice for Linux systems. Its release cycle aligns with Ubuntu’s, ensuring concurrent support within the same timeframe.<\/li><\/ul>\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
XRDP customazations <\/h6>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
true<\/code>, it disables Nagle’s algorithm, which means that packets are sent as soon as possible without waiting to fill up the full TCP segment. This can reduce latency in a network connection.<\/li>
low<\/code> means minimal encryption is used.<\/li>
\n\t\t\t\t
\n\t\t\t\t\t
true<\/code> means that the XRDP server will automatically terminate a session once it gets disconnected. This can be useful for freeing up system resources that would otherwise be occupied by inactive sessions.<\/li><\/ul><\/li>
0<\/code> effectively means that there is no time limit. The session will remain disconnected indefinitely until some other action or policy terminates it. This setting is particularly relevant when
KillDisconnected<\/code> is set to
false<\/code>, allowing disconnected sessions to persist for manual reconnection or administrative handling.<\/li><\/ul><\/li><\/ol>
\n\t\t\t\t
\n\t\t\t\t\t
User session changes<\/h6>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
Conclusion<\/h5>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
Ressources<\/h5>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t