-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrun.sh
More file actions
executable file
·34 lines (27 loc) · 861 Bytes
/
Copy pathrun.sh
File metadata and controls
executable file
·34 lines (27 loc) · 861 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
IMAGE="mso5000_live"
# Detect display server
if [[ $XDG_SESSION_TYPE == "wayland" ]]; then
echo "🧠 Wayland detected – enabling XWayland bridge"
# Allow access
xhost +si:localuser:root
docker run -it --rm \
--env WAYLAND_DISPLAY=$WAYLAND_DISPLAY \
--env XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR \
--env DISPLAY=$DISPLAY \
--volume $XDG_RUNTIME_DIR/$WAYLAND_DISPLAY:/tmp/$WAYLAND_DISPLAY \
--volume /tmp/.X11-unix:/tmp/.X11-unix \
--volume $HOME/oszi_csv:/app/oszi_csv \
--network host \
$IMAGE
else
echo "🖥️ X11 detected"
# Allow X11 connections
xhost +local:root
docker run -it --rm \
--env DISPLAY=$DISPLAY \
--volume /tmp/.X11-unix:/tmp/.X11-unix \
--volume $HOME/oszi_csv:/app/oszi_csv \
--network host \
$IMAGE
fi