{"id":548,"date":"2018-10-17T16:01:24","date_gmt":"2018-10-17T16:01:24","guid":{"rendered":"https:\/\/www.appservgrid.com\/paw92\/?p=548"},"modified":"2018-10-17T16:27:16","modified_gmt":"2018-10-17T16:27:16","slug":"how-to-connect-ubuntu-linux-remotely-from-windows-via-rdp","status":"publish","type":"post","link":"https:\/\/www.appservgrid.com\/paw92\/index.php\/2018\/10\/17\/how-to-connect-ubuntu-linux-remotely-from-windows-via-rdp\/","title":{"rendered":"How to Connect Ubuntu Linux Remotely from Windows via RDP"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linoxide.com\/wp-content\/uploads\/2018\/10\/xrdp-linux-desktop-remote-rdp.png\" alt=\"xrdp linux desktop remote rdp\" width=\"713\" height=\"341\" \/><\/p>\n<p>How often do you access Linux Desktop? What tools do you use to access remote desktop?<\/p>\n<p><a href=\"http:\/\/www.xrdp.org\/\" target=\"_blank\" rel=\"noopener\">Xrdp<\/a> is an open source tool which allows users to access the Linux remote desktop via Windows RDP. Apart from Windows RDP, xrdp tool also accepts connections from other RDP clients like FreeRDP, rdesktop and NeutrinoRDP<\/p>\n<h3>Xrdp Requirement<\/h3>\n<ul>\n<li>xrdp and xorgxrdp packages<\/li>\n<li>Listens on 3389\/tcp. Make sure your firewall accepts connections<\/li>\n<\/ul>\n<p>In this article, I will show how you can remotely connect to Ubuntu Desktop from a Windows machine using Xrdp tool.<\/p>\n<h2>1) Installation on Linux<\/h2>\n<h3>on Ubuntu 18.04<\/h3>\n<p>First, you need to install Xrdp on Ubuntu<\/p>\n<p># apt install xrdp<br \/>\nReading package lists&#8230; Done<br \/>\nBuilding dependency tree<br \/>\nReading state information&#8230; Done<br \/>\nThe following additional packages will be installed:<br \/>\nxorgxrdp<br \/>\nSuggested packages:<br \/>\nguacamole xrdp-pulseaudio-installer<br \/>\nThe following NEW packages will be installed:<br \/>\nxorgxrdp xrdp<br \/>\n0 upgraded, 2 newly installed, 0 to remove and 256 not upgraded.<br \/>\nNeed to get 498 kB of archives.<br \/>\nAfter this operation, 3,303 kB of additional disk space will be used.<br \/>\nDo you want to continue? [Y\/n] y<\/p>\n<p>You have to configure the polkit rule to avoid an authenticate popup after inputting the username and password at the xrdp login screen on windows<\/p>\n<p># vim \/etc\/polkit-1\/localauthority.conf.d\/02-allow-colord.conf<\/p>\n<p>polkit.addRule(function(action, subject) {<br \/>\nif ((action.id == \u201corg.freedesktop.color-manager.create-device\u201d || action.id == \u201corg.freedesktop.color-manager.create-profile\u201d || action.id == \u201corg.freedesktop.color-manager.delete-device\u201d || action.id == \u201corg.freedesktop.color-manager.delete-profile\u201d || action.id == \u201corg.freedesktop.color-manager.modify-device\u201d || action.id == \u201corg.freedesktop.color-manager.modify-profile\u201d) &amp;&amp; subject.isInGroup(\u201c\u201d))<br \/>\n{<br \/>\nreturn polkit.Result.YES;<br \/>\n}<br \/>\n});<\/p>\n<p>restart the xrdp service<\/p>\n<p># systemctl restart xrdp<\/p>\n<p>Then make sure that the service is running<\/p>\n<p># systemctl status xrdp<br \/>\n\u25cf xrdp.service &#8211; xrdp daemon<br \/>\nLoaded: loaded (\/lib\/systemd\/system\/xrdp.service; enabled; vendor preset: en<br \/>\nActive: active (running) since Tue 2018-10-16 02:05:21 WAT; 11min ago<br \/>\nDocs: man:xrdp(8)<br \/>\nman:xrdp.ini(5)<br \/>\nMain PID: 2654 (xrdp)<br \/>\nTasks: 1 (limit: 2290)<br \/>\nCGroup: \/system.slice\/xrdp.service<br \/>\n\u2514\u25002654 \/usr\/sbin\/xrdp<\/p>\n<p>Now make sure to automatically start the service at the system startup<\/p>\n<p># systemctl enable xrdp<br \/>\nSynchronizing state of xrdp.service with SysV service script with \/lib\/systemd\/systemd-sysv-install.<br \/>\nExecuting: \/lib\/systemd\/systemd-sysv-install enable xrdp<\/p>\n<p>Now you will need to check your ip address because you will need it for the connection<\/p>\n<p># ip add<br \/>\n1: lo: &lt;LOOPBACK,UP,LOWER_UP&gt; mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000<br \/>\nlink\/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00<br \/>\ninet 127.0.0.1\/8 scope host lo<br \/>\nvalid_lft forever preferred_lft forever<br \/>\ninet6 ::1\/128 scope host<br \/>\nvalid_lft forever preferred_lft forever<br \/>\n2: ens33: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc fq_codel state UP group default qlen 1000<br \/>\nlink\/ether 00:0c:29:ef:f6:9b brd ff:ff:ff:ff:ff:ff<br \/>\ninet 172.16.8.177\/24 brd 172.16.8.255 scope global dynamic noprefixroute ens33<\/p>\n<p>My ip address is 172.16.8.177. So keeps yours it in your mind.<\/p>\n<p>Xrdp works with port 3389 so make sure to open it. UFW is disabled by default so you will need to enable the firewall and create a rule for xrdp<\/p>\n<p># ufw enable<br \/>\n# ufw allow 3389\/tcp<\/p>\n<p>Now you can continue the configuration on windows side<\/p>\n<h3>On Centos\/Redhat 7<\/h3>\n<p>Make sure to install the Epel repositories before<\/p>\n<p># rpm -Uvh https:\/\/dl.fedoraproject.org\/pub\/epel\/epel-release-latest-7.noarch.rpm<\/p>\n<p>Now install xrdp packages<\/p>\n<p># yum update &amp;&amp; yum -y install xrdp tigervnc-server<\/p>\n<p>Add a rule in the firewall. On Centos\/RedHat is not ufw but firewalld to configure<\/p>\n<p># firewall-cmd &#8211;permanent &#8211;zone=public &#8211;add-port=3389\/tcp<\/p>\n<p>Then reload the firewall<\/p>\n<p># firewall-cmd &#8211;reload<\/p>\n<p>Now enable and restart the xrdp service<\/p>\n<p># systemctl enable xrdp &amp;&amp; systemctl restart xrdp<\/p>\n<p>Check your ip address for the remote connection on Windows<\/p>\n<h2>2) Connect from Windows<\/h2>\n<p>On your windows machine such as windows 10 in our case, launch the default remote desktop connection tool.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linoxide.com\/wp-content\/uploads\/2018\/10\/01-rdp-win-tools.png\" alt=\"\" width=\"388\" height=\"347\" \/><\/p>\n<p>You will need to enter the ip address of your machine and you will be asked to enter the username<\/p>\n<h3>Access Remote desktop of Ubuntu\/CentOS<\/h3>\n<p>Enter the ip address and the username<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linoxide.com\/wp-content\/uploads\/2018\/10\/02-rdp-win-connection.png\" alt=\"\" width=\"442\" height=\"488\" \/><\/p>\n<p>Now confirm the information and launch the connection. If you are not logged out in local, the remote login would fail.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linoxide.com\/wp-content\/uploads\/2018\/10\/03-rdp-win-confirm.png\" alt=\"\" width=\"444\" height=\"141\" \/><\/p>\n<p>Now you will be asked for your password<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linoxide.com\/wp-content\/uploads\/2018\/10\/04-rdp-win-credential-login.png\" alt=\"\" width=\"360\" height=\"442\" \/><\/p>\n<p>Now confirm your credentials. You can see the IP address of my Ubuntu on the top and the login page. Enter your password and enjoy<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linoxide.com\/wp-content\/uploads\/2018\/10\/05-rdp-win-ubuntu-connection-ok.jpg\" alt=\"\" width=\"511\" height=\"538\" \/><\/p>\n<p>Are you aware of any other tools? Please advise us on the comments<\/p>\n<h3>Read Also:<\/h3>\n<ul>\n<li><a href=\"https:\/\/linoxide.com\/linux-how-to\/tools-enable-remote-desktop-access-rhel-centos-7\/\" target=\"_blank\" rel=\"noopener\">5 Tools to Enable Remote Desktop Access on RHEL\/CentOS 7<\/a><\/li>\n<li><a href=\"https:\/\/linoxide.com\/linux-how-to\/screen-remote-ssh\/\" target=\"_blank\" rel=\"noopener\">How to Use Linux Screen Command For Remote SSH<\/a><\/li>\n<\/ul>\n<p><a href=\"https:\/\/linoxide.com\/linux-how-to\/xrdp-connect-ubuntu-linux-remote-desktop-via-rdp-from-windows\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>How often do you access Linux Desktop? What tools do you use to access remote desktop? Xrdp is an open source tool which allows users to access the Linux remote desktop via Windows RDP. Apart from Windows RDP, xrdp tool also accepts connections from other RDP clients like FreeRDP, rdesktop and NeutrinoRDP Xrdp Requirement xrdp &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.appservgrid.com\/paw92\/index.php\/2018\/10\/17\/how-to-connect-ubuntu-linux-remotely-from-windows-via-rdp\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;How to Connect Ubuntu Linux Remotely from Windows via RDP&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-548","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/548","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/comments?post=548"}],"version-history":[{"count":1,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/548\/revisions"}],"predecessor-version":[{"id":577,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/548\/revisions\/577"}],"wp:attachment":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/media?parent=548"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/categories?post=548"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/tags?post=548"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}