1 minute read

1-1. 크롬 설치를 위한 환경설치

sudo apt-get update &&
sudo apt-get install -f &&
sudo apt-get install xvfb xserver-xorg-video-dummy xbase-clients libutempter0

1-2. 크롬설치

sudo dpkg -i chrome-remote-desktop_current_amd64.deb
  1. 편한 설정을 위한 gedit 설치
sudo apt install -y gedit
  1. 원본 파일 들어가기
sudo gedit /opt/google/chrome-remote-desktop/chrome-remote-desktop

4-1. FIRST_X_DISPLAY_NUMBER 확인 및 수정

printenv DISPLAY

이게 :0이라면

FIRST_X_DISPLAY_NUMBER = 0

4-2. get_unused_display_number 함수 수정

    #while os.path.exists(X_LOCK_FILE_TEMPLATE % display):
    #  display += 1

을 수정해준다. ( 1457~1458 줄 )

 @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

4-3. def get_unused_display_number 함수 아래의 while문 두 줄을 주석 처리

  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._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()
    display = FIRST_X_DISPLAY_NUMBER
    self.child_env["DISPLAY"] = ":%d" % display
    self.server_inhibitor.record_started(MINIMUM_PROCESS_LIFETIME,
                                      backoff_time)
    self.session_inhibitor.record_started(MINIMUM_PROCESS_LIFETIME,
                                     backoff_time)

이제 재부팅 해면 된다.

만약 여기서 다음의 오류가 나온다면

base) zang@zang-K:~$ sudo systemctl status chrome-remote-desktop@$USER.service

[sudo] zang 암호: 

× chrome-remote-desktop@zang.service - Chrome Remote Desktop instance for jun>

     Loaded: loaded (/usr/lib/systemd/system/chrome-remote-desktop@.service; en>

     Active: failed (Result: exit-code) since Tue 2025-12-02 15:00:10 KST; 1min>

   Duration: 3.400s

    Process: 2391 ExecStart=/opt/google/chrome-remote-desktop/chrome-remote-des>

   Main PID: 2391 (code=exited, status=1/FAILURE)

        CPU: 6ms

12월 02 15:00:07 zang-K systemd[1]: Started chrome-remote-desktop@zang.serv>

12월 02 15:00:07 zang-K (-desktop)[2391]: pam_unix(chrome-remote-desktop:sess>

12월 02 15:00:10 zang-K systemd[1]: chrome-remote-desktop@zang.service: Mai>

12월 02 15:00:10 zang-K systemd[1]: chrome-remote-desktop@zang.service: Fai>

원격에서 devian으로 등록하는 절차를 안했다는 것이다.

참고 사이트:

https://velog.io/@openjr/%EC%9A%B0%EB%B6%84%ED%88%AC-22.04-%ED%81%AC%EB%A1%AC-%EC%9B%90%EA%B2%A9-%EB%8D%B0%EC%8A%A4%ED%8A%B8%ED%86%B1-%EC%84%A4%EC%A0%95

우분투 22.04 크롬 원격 데스트톱 설정

https://foxheadstudio.tistory.com/64

우분투에 Chrome Remote Desktop 설치하기

Comments