Skip to content

Commit

Permalink
Bugfixes to init scripts and docker setup
Browse files Browse the repository at this point in the history
  • Loading branch information
Egil committed Feb 5, 2020
1 parent 83a8107 commit 79d674f
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
22 changes: 22 additions & 0 deletions glass-config-init/glass_config_init/session.sh
Original file line number Diff line number Diff line change
@@ -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
9 changes: 8 additions & 1 deletion run-in-docker.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -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"

6 changes: 6 additions & 0 deletions xinitrc
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 79d674f

Please sign in to comment.