Posts WSL2에서 우분투 GUI 프로그램 실행하기
Post
Cancel

WSL2에서 우분투 GUI 프로그램 실행하기

How it works

WSL2 에서는 우분투에서 제공하는 GUI툴을 실행 시킬수 있다. 우분투에서 제공하는 GUI 툴을 실행 해 보자.

X Server 설치 및 환경 세팅

1. X Server 설치

  • 다운로드 사이트 : https://sourceforge.net/projects/vcxsrv/

Desktop View

2. X Server 환경 세팅

  • 설치된 X Server를 실행하여 환경 세팅하자

Desktop View

Desktop View

Desktop View

Desktop View

Desktop View

3. 앞에서 저장한 config.xlaunch파일을 시작프로그램에 등록해 준다

  • 시작프로그램 폴더 실행 Desktop View

  • 폴더에 설정파일 복사 붙여넣기 Desktop View

4. /etc/resolv.conf에 아래 내용 추가

1
2
3
#For WSL 2 only (Using IP from route (vEthernet))
VETHER_IP=$(/sbin/route -n | /bin/grep "^0.0.0.0" | /bin/tr -s ' ' | /bin/cut -d' ' -f2)
export DISPLAY=$VETHER_IP:0.0

5. Firefox 실행

1
2
$ sudo apt install firefox
$ firefox

Desktop View

  • 성공

Desktop View

This post is licensed under CC BY 4.0 by the author.