From 79d674f4be5e89afb6d6076dbe7da30e6fdc6162 Mon Sep 17 00:00:00 2001 From: Egil Date: Wed, 5 Feb 2020 16:48:30 +0100 Subject: [PATCH] Bugfixes to init scripts and docker setup --- Dockerfile | 2 +- .../glass_config_init/session.sh | 22 +++++++++++++++++++ run-in-docker.sh | 9 +++++++- xinitrc | 6 +++++ 4 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 glass-config-init/glass_config_init/session.sh mode change 100644 => 100755 run-in-docker.sh diff --git a/Dockerfile b/Dockerfile index 79e9a68..8e9578b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,7 +23,7 @@ RUN apt install -y x11-xkb-utils RUN apt install -y rofi RUN apt install -y xterm -RUN echo Version 1 +RUN echo Version 2 ADD . /InfiniteGlass diff --git a/glass-config-init/glass_config_init/session.sh b/glass-config-init/glass_config_init/session.sh new file mode 100644 index 0000000..eccbff7 --- /dev/null +++ b/glass-config-init/glass_config_init/session.sh @@ -0,0 +1,22 @@ +# Shell script sourced by the startup scripts before any components come up. + +# Main usage is to set environment variables. Below is a set of +# example variables and values that you can uncomment. + +# See DEBUGGING.md for more information + +# export GLASS_DEBUG_renderer=1 +# export GLASS_DEBUG_renderer_property=0 +# export GLASS_DEBUG_renderer_property_c_property_load_prop_changed=1 + +# export GLASS_DEBUG_glass_ghosts=1 +# export GLASS_DEBUG_glass_input=1 + +# The eventlog is a newline separated JSON file that can be used to +# generate statistics of X events to the renderer and their processing +# time. +# export GLASS_EVENTLOG_renderer=1 + +# Error paths work just like debug paths, but are =1 by default. You +# can disable all error reporting by uncommenting the following line +# export GLASS_ERROR_renderer=0 diff --git a/run-in-docker.sh b/run-in-docker.sh old mode 100644 new mode 100755 index 3c72ec4..784ea4d --- a/run-in-docker.sh +++ b/run-in-docker.sh @@ -1,5 +1,12 @@ #! /bin/bash +IMAGE=redhogorg/glass:0.0.2 + +if [ "$(docker images -q $IMAGE)" == "" ]; then + docker build -t $IMAGE . +fi + +mkdir -p ~/.config/glass xauth nlist :0 | sed -e 's/^..../ffff/' > /tmp/.docker.xauth -docker run -ti -v /tmp/.X11-unix:/tmp/.X11-unix -v /tmp/.docker.xauth:/tmp/.docker.xauth -e XAUTHORITY=/tmp/.docker.xauth -e DISPLAY=:0 redhogorg/glass:0.0.1 /bin/bash -c "su -c \"bash -c 'cd /InfiniteGlass; make run'\" glass" +docker run -ti -v ~/.config/glass:/home/glass/.config/glass -v /tmp/.X11-unix:/tmp/.X11-unix -v /tmp/.docker.xauth:/tmp/.docker.xauth -e XAUTHORITY=/tmp/.docker.xauth -e DISPLAY=:0 $IMAGE /bin/bash -c "su -c \"bash -c 'cd /InfiniteGlass; make run'\" glass" diff --git a/xinitrc b/xinitrc index ae7a72b..499847c 100644 --- a/xinitrc +++ b/xinitrc @@ -11,5 +11,11 @@ fi export PATH=$(pwd)/build:$PATH +ulimit -c unlimited + +if [ -e ~/.config/glass/session.sh ]; then + source ~/.config/glass/session.sh +fi + glass-config-init glass-ghosts