{"id":5815,"date":"2021-04-19T09:15:33","date_gmt":"2021-04-19T09:15:33","guid":{"rendered":"https:\/\/linuxways.net\/?p=5815"},"modified":"2021-04-19T09:15:33","modified_gmt":"2021-04-19T09:15:33","slug":"how-to-setup-xrdp-over-xorg-in-linux-with-multi-sessions","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/centos\/how-to-setup-xrdp-over-xorg-in-linux-with-multi-sessions\/","title":{"rendered":"How to Setup Xrdp over Xorg in Linux with Multi Sessions"},"content":{"rendered":"<p>In today\u2019s article, we are going to setup Xrdp over Xorg protocol along with some of its most useful tweaks that uses session\u2019s manager for Graphical users.<\/p>\n<p>Xorg an open-source and free to use software application to remotely access X Window System developed by X.Org. Xorg is considered to be most secure than the other tools which uses VNC protocols. It is generally used for the Linux\/Unix platforms as the base for GNOME, KDE, and CDE desktop environments. Moreover, the Xorg is a client-server communication protocol to allow its secure communication over the same or different systems.<\/p>\n<p>On the server side we will install xrdp and xorg Xrdp provides the graphical login interface to access the remote servers with GUI.<\/p>\n<h2>Prerequisites:<\/h2>\n<p>The prerequisites of this article is to have a remote Linux system running with GUI with sudo rights and a client system to connect with the remote server over xorg. The remote server also requires to have the internet access to install required packages.<\/p>\n<h2>Step 1: Installing Xorg and Xrdp packages:<\/h2>\n<p>Xorg and Xrdp both packages come within the default repositories whether you are using the latest Ubuntu or CentOS\/RHEL Operating System.<\/p>\n<p>As a demonstration, we are using the CentOS 7 Desktop. Let\u2019s login to your system&#8217;s terminal or get its shell access using putty to run the command below.<\/p>\n<pre># yum install xorg-x11-server-Xorg<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1314\" height=\"786\" class=\"wp-image-5816\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/04\/word-image-179.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/04\/word-image-179.png 1314w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/04\/word-image-179-300x179.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/04\/word-image-179-1024x613.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/04\/word-image-179-768x459.png 768w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/04\/word-image-179-501x300.png 501w\" sizes=\"auto, (max-width: 1314px) 100vw, 1314px\" \/><\/p>\n<p>This will install xrdp and the required xorg packages along with other dependencies. Type \u2018y\u2019 and hit enter to continue the installation.<\/p>\n<h2>Step 2: Configure XRDP over Xorg<\/h2>\n<p>After installing the packages, we need to configure Xrdp over Xorg protocol. Open the configuration file of Xrdp using any of your favorite editor the make the changes as shown below.<\/p>\n<pre># vim \/etc\/xrdp\/xrdp.ini\r\n\r\n[Xorg]\r\n\r\nname=Xorg\r\n\r\nlib=libxup.so\r\n\r\nusername=ask\r\n\r\npassword=ask\r\n\r\nip=127.0.0.1\r\n\r\nport=-1\r\n\r\ncode=20<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"766\" height=\"447\" class=\"wp-image-5817\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/04\/word-image-180.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/04\/word-image-180.png 766w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/04\/word-image-180-300x175.png 300w\" sizes=\"auto, (max-width: 766px) 100vw, 766px\" \/><\/p>\n<p>Comment out Xvnc parameters and uncomment Xorg settings as shown. Save and close the configurations and restart xrdp service.<\/p>\n<pre># systemctl restart xrdp<\/pre>\n<p>After restarting the xrdp service, check its status or running service and port \u20183389\u2019 in listening state.<\/p>\n<pre># netstat \u2013tlnp<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"996\" height=\"401\" class=\"wp-image-5818\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/04\/word-image-181.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/04\/word-image-181.png 996w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/04\/word-image-181-300x121.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/04\/word-image-181-768x309.png 768w\" sizes=\"auto, (max-width: 996px) 100vw, 996px\" \/><\/p>\n<h2>Step 3: Accessing Remote XRDP Session<\/h2>\n<p>As we have made the required changes, now let\u2019s make the Xrdp session over Xorg from your X windows system using it\u2019s built in remote desktop protocol.<\/p>\n<h1><img loading=\"lazy\" decoding=\"async\" width=\"929\" height=\"702\" class=\"wp-image-5819\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/04\/word-image-182.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/04\/word-image-182.png 929w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/04\/word-image-182-300x227.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/04\/word-image-182-768x580.png 768w\" sizes=\"auto, (max-width: 929px) 100vw, 929px\" \/><\/h1>\n<h2>Step 4: Enabling Multiple Sessions using SEMAN:<\/h2>\n<p>In Xrdp, the default behavior of Linux GUI sessions manager using single user login is to share the session. But in most cases this creates a hurdle where multiple individual sessions are required using the standard credentials.<\/p>\n<p>In order to enable multiple sessions, let\u2019s open the sesman configuration file and update the session allocation policy from \u2018Default\u2019 to \u2018UDBC\u2019.<\/p>\n<pre># vim \/etc\/xrdp\/sesman.ini\r\n\r\nPolicy=UBDC<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"837\" height=\"238\" class=\"wp-image-5820\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/04\/word-image-183.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/04\/word-image-183.png 837w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/04\/word-image-183-300x85.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/04\/word-image-183-768x218.png 768w\" sizes=\"auto, (max-width: 837px) 100vw, 837px\" \/><\/p>\n<p>Save the configuration file and restart \u2018xrdp\u2019 service.<\/p>\n<pre># systemctl restart xrdp<\/pre>\n<h2>Step 5: Testing Multi Sessions in XRDP<\/h2>\n<p>At this point we have done with all the required configurations to be able to run Xrdp over Xorg with multi sessions enabled, now let\u2019s see how it works.<\/p>\n<p>Open the remote desktop connections and login using the same user password.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1100\" height=\"952\" class=\"wp-image-5821\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/04\/word-image-184.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/04\/word-image-184.png 1100w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/04\/word-image-184-300x260.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/04\/word-image-184-1024x886.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/04\/word-image-184-768x665.png 768w\" sizes=\"auto, (max-width: 1100px) 100vw, 1100px\" \/><\/p>\n<p>Here you can see that we have a separate individual session under the same credentials, just like we have in new putty or terminal sessions.<\/p>\n<h2>Conclusion:<\/h2>\n<p>At the end of this article, you should be able to run Xrdp over Xorg protocol, which far most secure and recommended over the XVNC protocols. We have also covered the sessions manager that how you can manage your remote connections by tweaking its configuration parameters which sometimes come in a challenging phase.<\/p>","protected":false},"excerpt":{"rendered":"<p>In today\u2019s article, we are going to setup Xrdp over Xorg protocol along with some of its most useful tweaks that uses session\u2019s manager for Graphical users. Xorg&hellip;<\/p>","protected":false},"author":1,"featured_media":5844,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[234,276,275,175],"class_list":["post-5815","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-centos","tag-centos-7","tag-remote-session","tag-xorg","tag-xrdp"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/5815","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=5815"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/5815\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/5844"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=5815"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=5815"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=5815"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}