Compare commits
2 Commits
b265f764b0
...
65895230e3
| Author | SHA1 | Date | |
|---|---|---|---|
| 65895230e3 | |||
| 73c2cb2d21 |
@ -20,3 +20,10 @@ _Note: if you are using wsl2 you should see wsl=true line in terminal_
|
|||||||
### If video sink is not visible on the screen:
|
### If video sink is not visible on the screen:
|
||||||
1. Make sure that wsl2 is active.
|
1. Make sure that wsl2 is active.
|
||||||
2. Make sure that WSLg is supported (should be built-in on windows 11)
|
2. Make sure that WSLg is supported (should be built-in on windows 11)
|
||||||
|
|
||||||
|
### Authorization issue
|
||||||
|
> Authorization required, but no authorization protocol specified docker
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ xhost +local:
|
||||||
|
```
|
||||||
|
|||||||
55
run.sh
55
run.sh
@ -8,28 +8,29 @@ usage() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
build=False
|
build=False
|
||||||
|
wsl=False
|
||||||
container_name="gstreamer-base"
|
container_name="gstreamer-base"
|
||||||
|
|
||||||
while getopts ":bhc:" opt; do
|
while getopts ":bhc:" opt; do
|
||||||
case $opt in
|
case $opt in
|
||||||
b)
|
b)
|
||||||
build=True
|
build=True
|
||||||
;;
|
;;
|
||||||
h)
|
h)
|
||||||
usage
|
usage
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
c)
|
c)
|
||||||
container_name=$OPTARG
|
container_name=$OPTARG
|
||||||
;;
|
;;
|
||||||
\?)
|
\?)
|
||||||
echo "Invalid option: -$OPTARG" >&2
|
echo "Invalid option: -$OPTARG" >&2
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
:)
|
:)
|
||||||
echo "Option -$OPTARG requires an argument (getopts)" >&2
|
echo "Option -$OPTARG requires an argument (getopts)" >&2
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -43,15 +44,15 @@ wslgPath=""
|
|||||||
uname -a | grep -qi wsl && wsl=True
|
uname -a | grep -qi wsl && wsl=True
|
||||||
|
|
||||||
if [ $wsl = "True" ]; then
|
if [ $wsl = "True" ]; then
|
||||||
echo "wsl=true"
|
echo "wsl=true"
|
||||||
wslgPath="-v /mnt/wslg:/mnt/wslg"
|
wslgPath="-v /mnt/wslg:/mnt/wslg"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
docker run --rm -it \
|
docker run --rm -it \
|
||||||
--network=host \
|
--network=host \
|
||||||
-v /tmp/.X11-unix:/tmp/.X11-unix $wslgPath \
|
-v /tmp/.X11-unix:/tmp/.X11-unix $wslgPath \
|
||||||
-v $HOME/.Xauthority:/root/.Xauthority \
|
-v $HOME/.Xauthority:/root/.Xauthority \
|
||||||
-e DISPLAY \
|
-e DISPLAY \
|
||||||
-e WAYLAND_DISPLAY \
|
-e WAYLAND_DISPLAY \
|
||||||
-e XDG_RUNTIME_DIR \
|
-e XDG_RUNTIME_DIR \
|
||||||
$container_name bash
|
$container_name bash
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user