aboutsummaryrefslogtreecommitdiff
path: root/datastudio/run
diff options
context:
space:
mode:
Diffstat (limited to 'datastudio/run')
-rwxr-xr-xdatastudio/run30
1 files changed, 0 insertions, 30 deletions
diff --git a/datastudio/run b/datastudio/run
deleted file mode 100755
index ec07fb9..0000000
--- a/datastudio/run
+++ /dev/null
@@ -1,30 +0,0 @@
1#!/bin/bash
2
3if [ -z "$DISPLAY" ]; then
4 echo "\$DISPLAY is not set"
5 DISPLAYS=( $(netstat -lnt | awk '/127.0.0.1:60/ { split($4,a,":"); print "localhost:" substr(a[2],3) ".0" }') )
6
7 if [ "${#DISPLAYS[@]}" = 0 ]; then
8 echo "No X11 ports available"
9 exit 1
10 fi
11
12 if [ "${#DISPLAYS[@]}" > 1 ]; then
13 echo "More than 1 X11 port available. Which one do you want?"
14 for i in "${DISPLAYS[@]}"; do
15 echo "export DISPLAY=\"$i\""
16 done
17 exit 1
18 else
19 export DISPLAY="${DISPLAYS[0]}"
20 fi
21fi
22
23docker run -ti --rm --net=host \
24 -e DISPLAY \
25 -e XAUTHORITY=$HOME/.Xauthority \
26 -v /usr/share/zoneinfo/America/Los_Angeles:/etc/localtime:ro \
27 -v $HOME/.Xauthority:$HOME/.Xauthority:ro \
28 -v $HOME/share:$HOME/share \
29 -v $HOME/.datastudio:$HOME/.datastudio \
30 datastudio "$@"