Ubuntu Chrome Remote 연결 - 검은 화면(Black Screen) 문제 해결
Ubuntu chrome remote 연결 관련 설치 안내는 앞 게시글 참고
https://starrymind.tistory.com/161
우분투에 chrome remote desktop을 설치하고 관련 설정을 했는데도 막상 원격을 실행하면 black screen과 커서만 보이는 경우가 있다. 이 문제는 우분투 pc에 설치한 gpu가 크롬과 호환이 안되는 것을 의미하며, 크게 2가지의 해결 방법이 있다.
크롬 setting에 들어가서 하드웨어 가속 Off 설정
크롬 원격 설정 파일 수정
만일 위와 같은 방법으로 시도했는데도 잘 되지 않을 경우 이 방법으로 시도해보기
1. 사용자 계정을 chrome-remote-desktop 그룹에 추가 (username은 로그인 시 계정 이름)
sudo usermod -a -G chrome-remote-desktop {username}
이때 만일 usermod: group 'chrome-remote-desktop' does not exist 라는 에러 메시지가 뜬다면 무시하고 넘어가도 된다.
2. 실행 중인 크롬 원격을 중지
/opt/google/chrome-remote-desktop/chrome-remote-desktop --stop
3) 크롬 원격 설정 파일을 변경하기 전에 원본 먼저 백업. 나중에 잘못되면 여기서 백업한 파일 사용하면 됨
sudo cp /opt/google/chrome-remote-desktop/chrome-remote-desktop /opt/google/chrome-remote-desktop/chrome-remote-desktop.orig
4) 현재 디스플레이 숫자 확인
echo $DISPLAY
>>> :0
5) 설정 편집을 위해 편집툴로 크롬 원격 설정 파일 오픈
sudo vim /opt/google/chrome-remote-desktop/chrome-remote-desktop
6) 4)에서 확인한 현재 디스플레이 숫자(0)를 FIRST_X_DISPLAY_NUMBERS에 넣어준다
FIRST_X_DISPLAY_NUMBER = 0
7) 다음 코드를 찾아 아래와 같이 주석처리한다.
# while os.path.exists(X_LOCK_FILE_TEMPLATE % display):
# display += 1
@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
8) launch_session 함수를 찾아서 아래와 같이 주석처리하고, 바로 밑에 2줄 코드를 추가로 입력
def launch_session(self, x_args):
self._init_child_env()
self._setup_pulseaudio()
self._setup_gnubby()
# self._launch_x_server(x_args)
# if not self._launch_pre_session():
# If there was no pre-session script, launch the session immediately.
# self.launch_x_session()
# 여기 아래 2줄 추가
display = self.get_unused_display_number()
self.child_env["DISPLAY"] = ":%d" % display
9) 파일에서 나온 후 아래 명령어로 크롬 원격을 다시 시작해주면 된다.
/opt/google/chrome-remote-desktop/chrome-remote-desktop --start
'Ubuntu' 카테고리의 다른 글
Ubuntu Chrome Remote 연결 (0) | 2021.09.24 |
---|---|
conda activate 오류 (해결) (0) | 2021.09.08 |
[Linux] vim 에서 개행문자만 있는 공백 줄(빈 줄) 지우기 (0) | 2021.09.08 |
Rufus로 부팅 가능한 usb 디스크 만들기 - 우분투(Ubuntu 설치용) (0) | 2021.09.05 |
Ubuntu 18.04 데스크탑 버전 다운로드 (0) | 2021.09.05 |