docker 환경에서 opencv 를 이용하여 새로운 창을 띄울 경우 아래와 같은 에러가 발생한다.
cannot connect to X server unix:0
이는 도커를 만들 때 설정해주고,
docker가 돌고있는 로컬 환경에서 아래와 같은 명령어를 통해 해결한다.
해결법 1.
$ xhost local:root
출처 1 :
https://askubuntu.com/questions/175611/cannot-connect-to-x-server-when-running-app-with-sudo
Cannot connect to X Server when running app with sudo
When I am running some software using sudo command it showing error like cannot connect to X server For example if I run the following command: $ sudo gedit /etc/profile I am getting follow...
askubuntu.com
출처 2 :
https://eungbean.github.io/2018/12/04/EOD-cannot-connect-to-X-server-0.0/
[EOD]cannot connect to X server :0.0
docker local image 정리 docker에서 opencv를 사용하려고 했는데, 이미지를 띄우는 과정에서 오류가 났습니다. No protocol specified : cannot connect to X server :1 검색을 통해 구한 해결책은 다음과 같습니다. 현재 컨테이너 Commit하기 docker는 컨테이너를 띄운 상태에서 옵션을 변경할 수 없다. 따라서 새로운 옵션을 추가해서 새로 컨테이너를 띄워야 한다. 먼저 현재 띄워져 있는 컨테이
eungbean.github.io
해결법 2.
$ xhost local:root
$ apt install x11-xserver-utils
출처 2 :
https://github.com/lvm/docker-kdenlive/issues/1
kdenlive: cannot connect to X server unix:0 · Issue #1 · lvm/docker-kdenlive
Hi! I'm testing this docker container on a *buntu 14.04 based system. But i'm getting this error. # docker run -it -v /tmp/.X11-unix:/tmp/.X11-unix -v $HOME/Videos:/videos -e DISPLAY=unix$D...
github.com
'삽질 기록' 카테고리의 다른 글
[TensorFlow] AssertionError: Bad argument number for Name: 3, expecting 4 (0) | 2019.09.20 |
---|---|
[TensorFlow] Allocator (GPU_0_bfc) ran out of memory trying to allocate (0) | 2019.09.19 |
[Git] fatal: Authentication failed (4) | 2019.05.31 |
terminate called after throwing an instance of 'nvinfer1::CudaError' (0) | 2019.05.21 |
No such file or directory # include "opencv2/xfeatures2d/cuda.hpp" (0) | 2019.04.10 |