{"id":317,"date":"2019-02-14T23:06:15","date_gmt":"2019-02-15T07:06:15","guid":{"rendered":"http:\/\/35.243.195.209\/?p=317"},"modified":"2019-04-07T12:20:54","modified_gmt":"2019-04-07T19:20:54","slug":"remote-desktop-application","status":"publish","type":"post","link":"https:\/\/nanzhou.cc\/index.php\/2019\/02\/14\/remote-desktop-application\/","title":{"rendered":"Remote Desktop Application"},"content":{"rendered":"<h2>Summary<\/h2>\n<p>In this post, I will introduce a solution for remote desktop control. It is totally free and has great performance. <\/p>\n<p><strong>Note<\/strong>: It seems Google Chrome Remote Desktop does not support gdm. But I am quite sure it works if you use lightdm which is also the default display manager in Ubuntu.  <\/p>\n<h2>Conclusion<\/h2>\n<p>As usual, I introduce the conclusion first. Say you want to control a desktop running Ubuntu from your Mac. <\/p>\n<ol>\n<li>Install the Chrome Remote Desktop Extention in both browsers;<\/li>\n<li>The extension will automatically download the corresponding Chrome Remote Desktop application and call it;<\/li>\n<li>Enjoy your free remote control.<br \/>\nPlease do not break the license of Chrome Remote Desktop. <\/li>\n<\/ol>\n<h2>Details<\/h2>\n<p>The installations are fully graph interfaced and user-friendly. However, I encounter the following problems when firstly use this tool. <\/p>\n<ol>\n<li>It opens another independent GUI;<\/li>\n<li>It only shows the wallpaper, no sidebars;<\/li>\n<li>The resolution is not proper;<\/li>\n<\/ol>\n<p>After some research, I find the solutions. We should refactor some codes. The codes are in Python and are quite easy to understand. <\/p>\n<p>1). Firstly stop chrome-remote-desktop applicaiton;<\/p>\n<pre><code class=\"language-bash\">\/opt\/google\/chrome-remote-desktop\/chrome-remote-desktop --stop<\/code><\/pre>\n<p>2). Refactor codes (you may want to back it up first);<br \/>\nBach up. <\/p>\n<pre><code>Backup the original configuration:\nsudo cp \/opt\/google\/chrome-remote-desktop\/chrome-remote-desktop \/opt\/google\/chrome-remote-desktop\/chrome-remote-desktop.orig<\/code><\/pre>\n<p>Refactor codes.<\/p>\n<pre><code class=\"language-python\"># vim \/opt\/google\/chrome-remote-desktop\/chrome-remote-desktop\n# Change this to the size you want, typically &quot;1920x1080&quot;.\nDEFAULT_SIZES = &quot;1920x1080&quot;\n# Set the X display number to the current display number (obtain it with echo $DISPLAY from any terminal). On Ubuntu 17.10 and lower, this is usually 0, and on Ubuntu 18.04, this is usually 1:\nFIRST_X_DISPLAY_NUMBER = 0\n\n# Comment this out so it doesn&#039;t increment for a new desktop\n&quot;&quot;&quot;\nwhile os.path.exists(X_LOCK_FILE_TEMPLATE % display):\n    display += 1\n&quot;&quot;&quot;\n\n# Reuse the existing X session instead of launching a new one. Alter launch_session() by commenting out launch_x_server() and launch_x_session() and instead setting the display environment variable, so that the function definition ultimately looks like the following:\ndef launch_session(self, x_args):\n    self._init_child_env()\n    self._setup_pulseaudio()\n    self._setup_gnubby()\n    #self._launch_x_server(x_args)\n    #self._launch_x_session()\n    display = self.get_unused_display_number()\n    self.child_env[&quot;DISPLAY&quot;] = &quot;:%d&quot; % display<\/code><\/pre>\n<p>3). Start chrome-remote-desktop application again;<\/p>\n<pre><code class=\"language-bash\">\/opt\/google\/chrome-remote-desktop\/chrome-remote-desktop --start<\/code><\/pre>\n<p>Or you can just use GUI. <\/p>\n<ol start=\"4\">\n<li>Enjoy your free remote control.  <\/li>\n<\/ol>\n<h2>Reference<\/h2>\n<p><a href=\"https:\/\/superuser.com\/questions\/778028\/configuring-chrome-remote-desktop-with-ubuntu-gnome-14-04\">This Q&amp;A<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Summary In this post, I will introduce a solution for remote desktop control. It is totally free and has great performance. Note: It seems Google Chrome Remote Desktop does not support gdm. But I am quite sure it works if you use lightdm which is also the default display manager in Ubuntu. Conclusion As usual,&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16,21,22],"tags":[],"class_list":["post-317","post","type-post","status-publish","format-standard","hentry","category-linux","category-mac-os","category-operation-systems"],"_links":{"self":[{"href":"https:\/\/nanzhou.cc\/index.php\/wp-json\/wp\/v2\/posts\/317","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nanzhou.cc\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nanzhou.cc\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nanzhou.cc\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nanzhou.cc\/index.php\/wp-json\/wp\/v2\/comments?post=317"}],"version-history":[{"count":7,"href":"https:\/\/nanzhou.cc\/index.php\/wp-json\/wp\/v2\/posts\/317\/revisions"}],"predecessor-version":[{"id":434,"href":"https:\/\/nanzhou.cc\/index.php\/wp-json\/wp\/v2\/posts\/317\/revisions\/434"}],"wp:attachment":[{"href":"https:\/\/nanzhou.cc\/index.php\/wp-json\/wp\/v2\/media?parent=317"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nanzhou.cc\/index.php\/wp-json\/wp\/v2\/categories?post=317"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nanzhou.cc\/index.php\/wp-json\/wp\/v2\/tags?post=317"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}