From 9728d1e997ca040aa2645a2d840666bfe9aba72e Mon Sep 17 00:00:00 2001 From: Alejandro Penedo Ramos Date: Wed, 14 Dec 2016 20:54:14 +0100 Subject: [PATCH] Add option to change screen resolution using an environment variable --- Dockerfile | 1 + README.md | 2 ++ supervisord.conf | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 1fff3a3..68b0926 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,6 +15,7 @@ ENV LC_ALL C.UTF-8 ENV LANG en_US.UTF-8 ENV LANGUAGE en_US.UTF-8 ENV TZ=Europe/Zurich +ENV SCREEN_RESOLUTION 1024x768 RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone # Add the octave repo diff --git a/README.md b/README.md index 0dfd8db..33f7fb9 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,8 @@ The Octave GUI have to be accessed through a browser in a noVNC windows. * `firefox http://localhost:8083` * octave is launched, just run some script e.g. my_sombrero.m +Adding the parameter `-e SCREEN_RESOLUTION=x` the screen size displayed is adjusted to the one in the environment variable. By default it is 1024x768. + ### Manual Build * `docker build -t epflsti/octave-x11-novnc-docker:latest .` diff --git a/supervisord.conf b/supervisord.conf index f451e14..3d50bd3 100644 --- a/supervisord.conf +++ b/supervisord.conf @@ -2,7 +2,7 @@ nodaemon=true [program:X11] -command=/usr/bin/Xvfb :0 -screen 0 1024x768x24 +command=/usr/bin/Xvfb :0 -screen 0 %(ENV_SCREEN_RESOLUTION)sx24 autorestart=true [program:x11vnc]