Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I Can't display camera #22

Open
DanielLondonoS opened this issue Apr 11, 2021 · 4 comments
Open

I Can't display camera #22

DanielLondonoS opened this issue Apr 11, 2021 · 4 comments

Comments

@DanielLondonoS
Copy link

Whenever I run the command umt -camera -display it tells me that it cannot open the display.

What can be?

WhatsApp Image 2021-04-10 at 20 22 47

@IotGod
Copy link

IotGod commented Apr 11, 2021

Open another terminal and type : xhost +

@cesare-montresor
Copy link

Open another terminal and type : xhost +

I'm having the same issue. I've tried "xhost +" in all the consoles I could try, but I'm keep getting the very same error as DanielLondonoS.

@DanielLondonoS
Copy link
Author

Get the same result :'(

@cesare-montresor
Copy link

Ok, I managed to solve it by adding the following params to the docker run

 --env="DISPLAY" --net=host

This is what I use for my dockerized umt (/home/pi/umt/ )

umt.sh

#!/bin/bash

export UMT_PATH=/home/pi/umt/ 
export UMT_OUT=${UMT_PATH}/out 

mkdir -p ${UMT_PATH}
mkdir -p ${UMT_OUT}
cd ${UMT_PATH}

docker run --rm --env="DISPLAY" --net=host -it --privileged --mount type=bind,src=${UMT_OUT},dst=/root umt umt "$@"

start-camera.sh

#!/bin/bash

xhost +; ./umt.sh -camera -display   

That's how it looks my directory structure

pi@raspberrypi:~/umt $ pwd
/home/pi/umt
pi@raspberrypi:~/umt $ ls
docker-bash.sh  highway_01.mp4  rpi-urban-mobility-tracker  umt.sh
get-docker.sh   out             start-camera.sh             video-test.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants