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, I introduce the conclusion first. Say you want to control a desktop running Ubuntu from your Mac.
- Install the Chrome Remote Desktop Extention in both browsers;
- The extension will automatically download the corresponding Chrome Remote Desktop application and call it;
- Enjoy your free remote control.
Please do not break the license of Chrome Remote Desktop.
Details
The installations are fully graph interfaced and user-friendly. However, I encounter the following problems when firstly use this tool.
- It opens another independent GUI;
- It only shows the wallpaper, no sidebars;
- The resolution is not proper;
After some research, I find the solutions. We should refactor some codes. The codes are in Python and are quite easy to understand.
1). Firstly stop chrome-remote-desktop applicaiton;
/opt/google/chrome-remote-desktop/chrome-remote-desktop --stop
2). Refactor codes (you may want to back it up first);
Bach up.
Backup the original configuration:
sudo cp /opt/google/chrome-remote-desktop/chrome-remote-desktop /opt/google/chrome-remote-desktop/chrome-remote-desktop.orig
Refactor codes.
# vim /opt/google/chrome-remote-desktop/chrome-remote-desktop
# Change this to the size you want, typically "1920x1080".
DEFAULT_SIZES = "1920x1080"
# 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:
FIRST_X_DISPLAY_NUMBER = 0
# Comment this out so it doesn't increment for a new desktop
"""
while os.path.exists(X_LOCK_FILE_TEMPLATE % display):
display += 1
"""
# 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:
def launch_session(self, x_args):
self._init_child_env()
self._setup_pulseaudio()
self._setup_gnubby()
#self._launch_x_server(x_args)
#self._launch_x_session()
display = self.get_unused_display_number()
self.child_env["DISPLAY"] = ":%d" % display
3). Start chrome-remote-desktop application again;
/opt/google/chrome-remote-desktop/chrome-remote-desktop --start
Or you can just use GUI.
- Enjoy your free remote control.