sudo apt update
sudo apt install wget -y
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
cd ~/Downloads
sudo dpkg -i ./google-chrome-stable_current_amd64.deb
sudo dpkg -i ~/Downloads/.deb
mkdir ~/.config/chrome-remote-desktop
sudo usermod -a -G chrome-remote-desktop <username>
/opt/google/chrome-remote-desktop/chrome-remote-desktop --stop
sudo cp /opt/google/chrome-remote-desktop/chrome-remote-desktop /opt/google/chrome-remote-desktop/chrome-remote-desktop.orig
echo $DISPLAY
sudo gedit /opt/google/chrome-remote-desktop/chrome-remote-desktop
# echo $DISPLAY 입력 후 나오는 숫자를 아래 변수에 입력
FIRST_X_DISPLAY_NUMBER = 0
...
@staticmethod
def get_unused_display_number():
"""Return a candidate display number for which there is currently no
X Server lock file"""
display = FIRST_X_DISPLAY_NUMBER
# 아래 두 줄 주석처리
# while os.path.exists(X_LOCK_FILE_TEMPLATE % display):
# display += 1
return display
...
def launch_session(self, server_args, backoff_time):
"""Launches process required for session and records the backoff time
for inhibitors so that process restarts are not attempted again until
that time has passed."""
logging.info("Setting up and launching session")
self._init_child_env()
self.setup_audio()
self._setup_gnubby()
# 아래 내용 주석처리
# self._launch_server(server_args)
# if not self._launch_pre_session():
# # If there was no pre-session script, launch the session immediately.
# self.launch_desktop_session()
# self.server_inhibitor.record_started(MINIMUM_PROCESS_LIFETIME,
# backoff_time)
# self.session_inhibitor.record_started(MINIMUM_PROCESS_LIFETIME,
# backoff_time)
# 두 줄 추가
display = self.get_unused_display_number()
self.child_env["DISPLAY"] = ":%d" % display
/opt/google/chrome-remote-desktop/chrome-remote-desktop --start
[1] https://webnautes.tistory.com/1691
[2] https://askubuntu.com/questions/1410256/how-do-i-use-the-x-window-manager-instead-of-wayland-on-ubuntu-22-04
This guy is correct