Guacamole and Wine – Running Small Legacy Windows Apps Via a Browser

A sketch some time ago of Accessing GUI Apps Via a Browser from a Container Using Guacamole.

Today, we’re faced with trying to keep an old, old Windows app:

a) running;
b) across various platforms

for another couple of presentations / another year of a course…

So what to do?

I had a look at the dockerfile from the above sketch, installed wine, and tweaked the launch script as per the embedded gist at the end of the post. Image is on dockerhub for now as psychemedia/robtolab/.

Here’s it running on Digital Ocean via DockerCloud…

First select the app (I need to figure how to allow selection of different ones…)

Then run it…

And in action…

UPDATE: out of the can, images for changing the simulator background can be found here: Z:\opt\Apps\RobotLab\images

So… University of the Cloud, right?!

PS the next step is to see if I can get something like the above running via binderhub under nbserverproxy eg as per https://github.com/betatim/openrefineder See maybe https://github.com/jupyterhub/binder/issues/87

FROM hurricane/dockergui:x11rdp1.3
#Use an updated build
#FROM psychemedia/dockergui
#########################################
## ENVIRONMENTAL CONFIG ##
#########################################
# Set environment variables
# User/Group Id gui app will be executed as default are 99 and 100
ENV USER_ID=99
ENV GROUP_ID=100
# Gui App Name default is "GUI_APPLICATION"
ENV APP_NAME="Robotlab"
# Default resolution, change if you like
ENV WIDTH=1280
ENV HEIGHT=720
# Use baseimage-docker's init system
CMD ["/sbin/my_init"]
#########################################
## REPOSITORIES AND DEPENDENCIES ##
#########################################
#echo 'deb http://archive.ubuntu.com/ubuntu trusty main universe restricted' > #/etc/apt/sources.list
#echo 'deb http://archive.ubuntu.com/ubuntu trusty-updates main universe restricted' >> #/etc/apt/sources.list
# Install packages needed for app
#########################################
## GUI APP INSTALL ##
#########################################
# Install steps for X app
RUN dpkg --add-architecture i386
RUN apt-add-repository 'https://dl.winehq.org/wine-builds/ubuntu/'
RUN wget https://dl.winehq.org/wine-builds/Release.key && sudo apt-key add Release.key
RUN apt update && apt install -y winehq-stable
# Copy X app start script to right location
COPY startapp.sh /startapp.sh
COPY Apps/ /opt/Apps
#########################################
## EXPORTS AND VOLUMES ##
#########################################
# Place whater volumes and ports you want exposed here:
#Trying to expose /nobody and running with -v "${PWD}/files":/nobody doesn't seem to work?
RUN mkdir -p /share
VOLUME /share
EXPOSE 3389
view raw Dockerfile hosted with ❤ by GitHub
export WINEDLLOVERRIDES="mscoree,mshtml="
DISPLAY=:1 wine /opt/Apps/RobotLab/RobotLab.exe
view raw startapp.sh hosted with ❤ by GitHub

Author: Tony Hirst

I'm a Senior Lecturer at The Open University, with an interest in #opendata policy and practice, as well as general web tinkering...